Data processing methods, apparatus, electronic equipment, media and program products

By storing and processing component status data of regional cluster product instances in the status database, the problem of low efficiency in product status data query in the prior art is solved, and efficient product status data acquisition and query is achieved.

CN118733853BActive Publication Date: 2026-11-17TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310341288.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2026-11-17
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

When querying product status data deployed on the cluster, it is necessary to call multiple application interfaces to obtain status data and perform complex concatenation, resulting in low data query efficiency.

Method used

By obtaining the component status data of the associated components of the product instances deployed on the regional cluster, determining the data type and processing it, generating product status data, and storing it in the status database, the system can directly respond to query requests from the database.

Benefits of technology

It enables real-time monitoring and efficient querying of product status data, simplifies the data acquisition process, and improves query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733853B_ABST
    Figure CN118733853B_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, electronic device, medium, and program product. The method includes: acquiring component status data of associated components of product instances in one or more regional clusters; determining one or more data types of the component status data of associated components of product instances in each regional cluster, and determining a data processing method corresponding to one or more data types; processing the component status data of associated components of product instances in each regional cluster based on the data processing method corresponding to one or more data types to obtain product status data of product instances in each regional cluster; storing the product status data of product instances in each regional cluster in a status database; and if a query request for product status data of a specified product instance is obtained, retrieving the requested product status data from the status database in response to the query request, thereby improving the query efficiency of product status data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, medium, and program product. Background Technology

[0002] Currently, querying product status data for products deployed on a cluster typically requires calling the corresponding APIs of each application within the product to obtain the status data for that application. Furthermore, after obtaining the status data from each application, it's necessary to concatenate the status data to obtain the final product status data. This concatenation process is usually complex and computationally demanding. Therefore, this method of obtaining product status data not only requires calling multiple APIs but also involves complex and computationally difficult concatenation operations, resulting in low efficiency in querying product status data. Summary of the Invention

[0003] This application provides a data processing method, apparatus, electronic device, medium, and program product that can improve the efficiency of querying product status data.

[0004] In a first aspect, embodiments of this application provide a data processing method, including:

[0005] Retrieve component status data of the associated components of the product instances deployed on each of one or more regional clusters;

[0006] Determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and determine the data processing method corresponding to each of the one or more data types;

[0007] Based on the data processing methods corresponding to the one or more data types, the status data of the associated components of the product instances deployed on each regional cluster is processed according to the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster.

[0008] The product status data of the product instances deployed on each regional cluster is stored in the status database;

[0009] If a query request for product status data of a specified product instance is obtained, the system will respond to the query request by searching the status database for the requested product status data.

[0010] Secondly, embodiments of this application provide a data processing apparatus, including:

[0011] The acquisition unit is used to acquire component status data of the associated components of the product instances deployed on each regional cluster in one or more regional clusters.

[0012] The determining unit is used to determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and to determine the data processing method corresponding to each of the one or more data types.

[0013] The processing unit is used to process the status data of the associated components of the product instance deployed on each regional cluster according to the data processing method corresponding to the one or more data types, so as to obtain the product status data of the product instance deployed on each regional cluster.

[0014] A storage unit is used to store the product status data of product instances deployed on each regional cluster in a status database.

[0015] The query unit is used to, in response to a query request for product status data of a specified product instance, retrieve the requested product status data from the status database.

[0016] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory, wherein the processor is used to perform the method described in the first aspect.

[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing program instructions that, when executed, implement the method described in the first aspect.

[0018] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes program instructions that, when executed by a processor, implement the method described in the first aspect.

[0019] In this embodiment, component status data of associated components of product instances deployed on each of one or more regional clusters can be obtained. One or more data types of the component status data of associated components of product instances deployed on each regional cluster can be determined. Further, data processing methods corresponding to one or more data types can be determined. Based on the data processing methods corresponding to one or more data types, the status data under the corresponding data type in the component status data of associated components of product instances deployed on each regional cluster is processed to obtain the product status data of the product instances deployed on each regional cluster. Furthermore, the product status data of the product instances deployed on each regional cluster can be stored in a status database. If a query request for the product status data of a specified product instance is obtained, the system can respond to the query request by retrieving the requested product status data from the status database. Through the above method, the product status data of product instances deployed on multiple regional clusters can be monitored in real time, and the status information of all associated components under a product instance can be calculated in real time to obtain the corresponding product status data. By storing the product status data in a status database, in subsequent query tasks, all status data under a product can be obtained at once without assembly, thereby effectively improving data query efficiency. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1a This is a schematic diagram of the architecture of a data processing system provided in an embodiment of this application;

[0022] Figure 1b This is a schematic diagram of the architecture of another data processing system provided in an embodiment of this application;

[0023] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application;

[0024] Figure 3a This is a schematic diagram of a process for deploying a product configuration file provided in an embodiment of this application;

[0025] Figure 3b This is a flowchart illustrating another data processing method provided in an embodiment of this application;

[0026] Figure 4This is a flowchart illustrating another data processing method provided in an embodiment of this application;

[0027] Figure 5a This is a schematic diagram of a process for handling changes in product status data provided in an embodiment of this application;

[0028] Figure 5b This is a schematic diagram of a configuration change processing method provided in an embodiment of this application;

[0029] Figure 5c This is a schematic diagram of another configuration change processing method provided in an embodiment of this application;

[0030] Figure 6 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0031] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] Cloud technology refers to a managed technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.

[0034] Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.

[0035] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go.

[0036] This application can store the product status data obtained from data processing in the "cloud". The product status data in the cloud can be retrieved and expanded at any time as needed. For example, after determining the product status data of a product instance, the product status data of the product instance can be associated and stored in the "cloud". When querying the product status data of a product instance, the product status data of that product instance can be retrieved from the "cloud".

[0037] In the application embodiments, products can be highly abstracted. For example, commonalities between different products can be found on top of applications, and an Open Product Model (OPM) can be built through a series of capabilities (such as cloud-native capabilities). The Open Product Model can be understood as a standard specification for defining cloud-native products. Among these, the CRD (Custom Resource Definition) in cloud-native capabilities is a custom resource definition based on the Kubernetes cluster. Simply put, a CRD is a built-in resource type in the Kubernetes cluster, through which various resources (such as CRs) can be deployed and accessed within the Kubernetes cluster. For example, the CRD resources defined within the Kubernetes cluster can be viewed using the kubectlget command. In this application embodiment, resources can be product instance resources deployed on the cluster. These product instance resources can refer to product status data. For example, product status data can include status data for various associated components, and product instance resources can include resources for each associated component. Associated components can include applications, containers, middleware, virtual machines, etc., and the resources of associated components can refer to application resources, middleware resources, etc.

[0038] For ease of understanding, the following explanations of relevant terms are provided. A product instance refers to the entity after a product has been deployed; multiple instances of a product can be deployed. A product is a collection of closely related applications that work together to provide unified functionality. An application is the smallest independently deployable and maintainable unit that can also provide services; it is part of a product, meaning a product can include 1 to n applications.

[0039] In the open product model, "open" can be understood as supporting heterogeneous platforms, container operation, scheduling systems, cloud providers, hardware configurations, etc., in short, it is independent of the underlying layer; "product" can be understood as a product that includes 1 to n applications and includes the cluster information to which the product belongs; "model" can be understood as defining standards to make it independent of the underlying platform.

[0040] As mentioned earlier, the open product model can describe product instances running in a cluster based on cloud-native capabilities. It's important to understand that, leveraging the watch capabilities supported by cloud-native capabilities, the open product model can monitor all product-related resources and calculate the current product status in real time. Secondly, cloud-native capabilities also provide tuning capabilities oriented towards the final state. Real-time computation can be understood as the product instance's status undergoing real-time calculation and generating corresponding results when information about associated components (such as applications) changes. Tuning strategies can be understood as guiding resources on the cluster (such as a Kubernetes cluster) towards the user's desired target state, which can be understood as the result the user wants. Based on this, it can be seen that the open product model allows for a series of real-time computations and tuning strategies for product instances deployed in the cluster. It should be noted that the open product model proposed in this application's embodiments can be continuously improved by refining the current CRD definition for products. For example, the commonalities between different products can be highly abstracted to ensure that the open product model is not limited to the real-time computation of product status data proposed in this application.

[0041] In this application embodiment, under the specific scenario of utilizing OPM, this application embodiment proposes a product instance real-time calculation service for real-time calculation of product status data of product instances. Through this product instance real-time calculation service, the management of product status data of product instances on a multi-region cluster can be realized. Such management may include monitoring, real-time calculation, etc.

[0042] Based on the above description, this application provides an architectural diagram of a data processing system. For example, see... Figure 1a As shown, the architecture of this data processing system involves three parts: real-time computing services for product instances, backend services, and business scenarios.

[0043] In one embodiment, the product instance real-time computing service can be deployed on a primary regional cluster within one or more regional clusters. This service can be implemented through a controller deployed on the primary regional cluster, which manages the resources deployed across the one or more regional clusters. Alternatively, a unified controller can be used to manage resources across one or more regional clusters, or a single controller can manage resources deployed on a single regional cluster. It should be noted that, for multiple regional clusters, the regional cluster where the product instance real-time computing service is deployed can be referred to as the primary regional cluster, and the other regional clusters within the multiple regional clusters can be referred to as backup regional clusters. The primary regional cluster can be any one of the one or more regional clusters. Therefore, the controller can monitor Application resources, Pod resources, Component resources, etc., under the product instance on both the primary and backup regional clusters.

[0044] In one embodiment, the component status data of the associated components of a product instance deployed on a regional cluster may involve one or more data types. Status data under one data type can be processed using a data processing method to obtain product status data under that data type, and the product status data under various data types can constitute the product status data of the product instance. For example, the one or more data processing methods may include data processing methods for calculating product health status, data processing methods for calculating product resource usage, data processing methods for calculating application health status, data processing methods for tracing modifications to product configuration, and so on. Based on the above description, it can be seen that the controller can obtain the product status data of the product instance through one or more data processing methods.

[0045] In one embodiment, the processing of a data processing method can be integrated into a state processing unit (or a calculation unit). The controller can then invoke the state processing unit to perform real-time calculations of product state data. For example, one or more state processing units can be invoked to calculate the product state data of a product instance. Exemplarily, these one or more state processing units may include a state processing unit for calculating product health status, a state processing unit for calculating product resource usage, a state processing unit for calculating application health status, a state processing unit for tracking modifications to product configuration, and so on.

[0046] The calculation results for real-time product status data can be recorded on the main regional cluster, such as in a database (e.g., a status database) on the main regional cluster. This database can be used to store the product status data of product instances. In one embodiment, the calculation results for real-time product status data can be used to update the product status data of product instances recorded on the main regional cluster. The product status data of product instances recorded on the main regional cluster can be used for subsequent query tasks; that is, users can directly initiate query requests to the main regional cluster to find the product status data corresponding to the query request.

[0047] In summary, based on the definition of the open product model, the controller design enables real-time observation and calculation of various data related to resource consumption, operational status, and applications of product instances across multiple regional clusters. Furthermore, the real-time product instance calculation service proposed in this application is compatible with multiple versions and backward compatibility. As described above, the real-time calculation of product instance status data only depends on the regional cluster (such as a K8s cluster) and related components (such as applications). Therefore, historically deployed versions will not affect real-time calculation; simply deploying the real-time product instance calculation service to the environment (i.e., the regional cluster) immediately enables real-time calculation of product status data.

[0048] In one embodiment, the background services may include a query service (such as DawnService), a product status sync service, and a data storage service for a data engine. In one embodiment, the product status sync service can retrieve product status data (or product instance data, product instance status, etc.) from the environment and synchronize this data to the data engine, i.e., synchronize real-time calculated product status data to the data engine. The query service can integrate the product status data of product instances in the data engine and provide a query interface for product status data. The data engine can be understood as a status database. This status database is different from the status database mentioned above for the main regional cluster; both status databases can provide data query services for product status data. Both status databases can be deployed, or only one of them can be deployed; there is no limitation on this.

[0049] In one embodiment, based on the real-time computing service capability of product instances, the product status data stored in the status database can provide data query services for various business scenarios, such as change scenarios, data collection scenarios, real-time data visualization scenarios, and anomaly alarm scenarios.

[0050] For example, in a change scenario, the application version information contained in the product status data stored in the status database can be used to determine the real-time version of the application that needs to be used.

[0051] For example, in data acquisition scenarios, the required product status data can be obtained from the status database based on the user's actual needs. Specifically, in this embodiment, data acquisition capabilities can be achieved based on the Watch mechanism provided by the product instance real-time computing service. For instance, it is possible to combine the product's own market data and real-time data in the environment to collect information such as the version information and deployment time of the applications deployed on the product.

[0052] For example, in real-time data visualization scenarios, such as product-related pages, the necessary product status data (such as health status, application readiness percentage, application status data, etc.) can be retrieved from the status database to visualize the product on the page. In this embodiment, dual-channel real-time product status data preview can be implemented. For instance, product status data can be previewed directly using the kubectl command, and product status data collection rules can be modified; real-time product status data can also be previewed through the product marketplace interface (i.e., the terminal interface).

[0053] For example, in anomaly alerting scenarios, when the controller detects an anomaly in the product status, it can trigger an alert, such as by directly pushing a message to the front end. An anomaly in the product status data can refer to a data point that is abnormal. For instance, this abnormal data could mean that the data differs from the planned data for the product. For example, the product plan specifies the deployment of 5 applications, but only 3 applications are actually deployed. In this case, an alert can also be triggered. That is, in this embodiment, the alerting capability for product status anomalies can be introduced based on the Watch mechanism provided by the product instance real-time computing service.

[0054] In summary, this embodiment simplifies the process of acquiring real-time product status data. It eliminates the need to rely on the interface capabilities of each application within the product to separately obtain their status data and then concatenate them to obtain the final product status data. Instead, it directly retrieves all product status data calculated by the real-time computing service of the product instance from the status database. Furthermore, it enables unified management of products deployed on one or more regional clusters without requiring cross-regional cluster queries. Users do not need to consider acquiring product status data when the product is deployed across multiple regional clusters; this issue can be resolved directly at the Controller layer, allowing real-time calculation of product status data for product instances on backup regional clusters within the primary regional cluster.

[0055] In one implementation, such as Figure 1b The diagram shown is an architectural schematic of another data processing system provided in an embodiment of this application. For example, see... Figure 1b As shown:

[0056] In the real-time product instance computing service, the controller can monitor product instance resources across multiple regional clusters. For example, it can monitor application resources (App CR) and middleware resources (Comp CR) under product instances on the primary and backup regional clusters. If operations such as deletion, updating, or creation of application or middleware resources are detected, the product status data can be recalculated, and the calculation results can be synchronized to the data engine. In one embodiment, the calculation of product status data can be implemented by calling multiple status processing units, such as a product health calculation unit, a product application status data calculation unit, a product configuration real-time monitoring calculation unit, and so on.

[0057] In one embodiment, when synchronizing product status data, a product status synchronization service can be invoked to retrieve the product status data of the product instance and synchronize it to the data engine, enabling the insertion or updating of the original product status data stored in the data engine. Users can select the desired product status data of the product instance from the data engine through a query service. This query service can also provide users with the service of creating product instances on the primary region cluster. For example, if a user needs to create new product instances (such as product instance 1, product instance 2, product instance 3, and product instance 4 created in the primary region cluster), they can perform relevant operations on the operation interface provided by the query service to achieve the creation of product instances.

[0058] It should be noted that the controller's functions can be integrated and run on an electronic device, which can be a server. The server mentioned here can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc.

[0059] Based on the above description, embodiments of this application provide a data processing method that is applied to an electronic device and can be executed by a controller on the electronic device. Please refer to... Figure 2 The data processing method includes, but is not limited to, the following steps:

[0060] S201, obtain the component status data of the associated components of the product instances deployed on each of the one or more regional clusters.

[0061] The number of product instances deployed on a regional cluster can be one or more; this application embodiment uses one as an example for explanation. Associated components under a product instance can include applications, middleware, virtual machines, etc., within the product. A regional cluster can be understood as a cluster located in a specific region or area. Typically, each region deploys a Kubernetes cluster, and multiple regional networks can communicate with each other under the same cloud.

[0062] In one implementation, for any one of one or more regional clusters, the product instance on that regional cluster is pre-deployed (apply). It's important to understand that when deploying a product, the first step is to create cluster resources (such as a Kubernetes cluster) for the product instance to be used for real-time calculation of subsequent product status data; that is, the product instance needs to be deployed on the cluster first. It is understood that product instances can be deployed on clusters in different regions; therefore, in this embodiment, the cluster can also be referred to as a regional cluster. The following describes the deployment of product instances: to deploy product instances on a regional cluster, the product configuration file of the product instance must be deployed on the regional cluster. This product configuration file can contain relevant configuration information for the product instance. The product configuration file can be a .ymal file.

[0063] As mentioned above, the embodiments of this application can utilize the Open Product Model (OPM) to complete the real-time calculation of product status data. In the Open Product Model, the product configuration file of the product instance can include the following configuration information of the product instance: the API version (APIVersion) corresponding to the product instance; the resource object (which can be referred to as kind) corresponding to the product instance. In this embodiment, the resource object is identified as the product instance (ProductInstance); the metadata of the product instance; the description information of the product instance (which can be referred to as Spec); and so on.

[0064] The metadata for a product instance can include: the product name (name). If the product is deployed on a cluster across multiple regions, the product name can be followed by the region ID (regionID), such as 50010002. The metadata can also include relevant tag definitions for the product instance, facilitating related searches using the Kubernetes cluster API. For example, tag definitions can include tags for the product version (e.g., 1.0.0); the region ID (RegionID) (e.g., 50000001); the product code (productCode) (e.g., dawn); and the product instance name (productInstanceName) (e.g., dawn-1).

[0065] The description information of a product instance may include: product number, product instance name, product region, namespace of the application in the product (appNameSpace), list of state processing units required for product status data (this list of state processing units can be called rules), and so on.

[0066] For example, the product instance description information might include the product ID "dawn," the product instance name "dawn-1," and the product's region as 50000001. The status processing unit list might enumerate the following: product real-time resource usage calculation unit (or productResource), product health status calculation unit (or productHealthy), application status information calculation unit under the product (or productApps), middleware information calculation unit under the product (or productServiceInstances), and application configuration update monitoring calculation unit (or applicationUpdateMonitor). Other status processing units may also be included, without limitation.

[0067] It's important to note that when configuring rules, you can control whether the state processing unit is enabled, and the corresponding product state calculation rules, etc., by controlling the input parameters. For example, configuring state processing units in rules involves setting the `params` parameter and the `isOpen` parameter. `params` represents the input parameter map, which can be a key-value pair mapping, meaning the input parameter can be represented as `key:value`, where the data type of the key and value can be string. In general, the input parameter map can be understood as `key:value map[string]string`. `isOpen` indicates whether the state processing unit is enabled; `isOpen` is a boolean variable. It's worth noting that by default, all state processing units in the product development model are enabled. If a user needs to use a specific state processing unit to calculate product state data, it can be defined in `params`.

[0068] In one implementation, the process for deploying product configuration files for product instances on a regional cluster can be found in [reference needed]. Figure 3a As shown; Figure 3a As shown, developers can perform relevant operations on the front end (or product market front end) to enable the front end to call target interfaces (such as the StartOperationSheet interface) to obtain query services (or operations and maintenance center). For example, the front end can provide an operation interface with a deployment control for a product instance. Developers can trigger (press, click, etc.) the deployment control, and after the deployment control is triggered, the front end can call the target interface to obtain query services for subsequent operations.

[0069] Then, relevant descriptive information about the product instance can be retrieved from the database through a query service. This information may include the product name, product number, and region information (i.e., the region where the product instance is deployed). The database here can be the aforementioned status database or another database; there are no restrictions. After obtaining the relevant descriptive information, a product configuration file corresponding to the product instance can be created based on this information. Optionally, this product configuration file can be generated by developers writing code based on the relevant descriptive information; alternatively, the product configuration file can be automatically generated using a preset configuration file template based on the obtained descriptive information. This configuration file module can be pre-configured. This automatic generation method can effectively improve the file generation speed, thereby increasing the deployment speed of the product instance.

[0070] Once the product configuration file is created, it can be deployed on the regional cluster, thereby enabling the deployment of product instances within the regional cluster. In summary, the creation and updating of product instance resources can be written in the StartOperationSheet interface and can be deployed along with product deployments or updates; for example, in a Kubernetes cluster-based scenario, the go package in the Kubernetes cluster can be used to deploy product instance resources on the main regional cluster.

[0071] It should be noted that when deploying product configuration files, they can be deployed on the required regional clusters. If a product instance needs to be deployed on one or more regional clusters, its corresponding product configuration file can also be deployed on these same clusters. In other words, during the creation of product instance resources, there is no distinction between primary and backup regional clusters. However, within one or more regional clusters, there can be a primary regional cluster and a backup regional cluster. The primary regional cluster deploys a real-time product instance computing service, which monitors all regional clusters and performs real-time calculations of product status data.

[0072] In one implementation, the primary regional cluster can be any one of one or more regional clusters. This primary regional cluster can be randomly selected from the one or more regional clusters, or it can be selected from the one or more regional clusters according to a preset selection rule. For example, the preset selection rule could refer to selecting based on the performance parameters of each regional cluster, and choosing the regional cluster with the best performance parameters as the primary regional cluster. In this case, the specific implementation of selecting the primary regional cluster from one or more regional clusters based on the preset selection rule could be: obtaining the performance parameters of each regional cluster, which may include one or more of computing power and security coefficients, where the security coefficient measures the probability that the regional cluster's data can be successfully stolen; after obtaining the performance parameters of each regional cluster, the primary regional cluster can be selected from one or more regional clusters based on these performance parameters. It should be noted that performance parameters can also include other parameters; here, computing power and security coefficients are used as examples.

[0073] Optionally, assuming performance parameters include computing power, the computing power of each regional cluster can be obtained, and the regional cluster with the highest computing power can be selected as the primary regional cluster. It is understood that a real-time computing service for product instances is deployed on the primary regional cluster. This service needs to provide real-time computing; therefore, to improve computing speed and thus the storage speed of product status data, ensuring the accuracy and reliability of subsequent query services, the regional cluster with the highest computing power can be selected as the primary regional cluster to improve computing speed. The computing power of a regional cluster can be evaluated using the MIPS (Million Instructions Per Second) parameter. The MIPS parameter indicates the number of instructions that can be executed per second; a higher MIPS value corresponds to higher computing power. Other methods can also be used to determine the computing power of a regional cluster, and this application does not limit the methods used.

[0074] Optionally, assuming the performance parameters include a security factor, the security factor for each regional cluster can be obtained, and the regional cluster with the highest security factor can be selected as the primary regional cluster. It should be understood that the product status data of the product instances calculated in real time can be stored on the primary regional cluster. Therefore, to ensure the reliability of product status data storage, a regional cluster with the highest security performance can be selected as the primary regional cluster. A specific implementation method for determining the security factor of a regional cluster can be: calculating the amount of product status data stored and the amount of product status data successfully stolen, and using the ratio between the amount of product status data successfully stolen and the amount of product status data stored as the security factor. Other methods can also be used to determine the security factor of a regional cluster, and this application does not limit this method.

[0075] Optionally, assuming the performance parameters include computing power and security factor, the computing power and security factor of each regional cluster can be obtained. After obtaining these parameters, each regional cluster can be sorted from highest to lowest computing power to obtain a ranking result based on computing power, and similarly, it can be sorted from highest to lowest security factor to obtain a ranking result based on security factor. Based on these ranking results, a primary regional cluster can be selected from one or more regional clusters. For example, the ranking of each regional cluster in the computing power ranking result and its ranking in the security factor ranking result can be obtained. For any given regional cluster, the sum of its ranking in the computing power ranking result and its ranking in the security factor ranking result can be used as its target ranking. After obtaining the target rankings of each regional cluster, the regional cluster with the highest target ranking can be selected as the primary regional cluster. It can be seen that this method combines multiple dimensions to select regional clusters with both superior computing power and security factor as the primary regional cluster.

[0076] It's important to understand that currently, in scenarios where the business layer (such as dawn-service) handles multi-region clusters, this is usually accomplished by requesting the Ingress (an Ingress is a URL that can be configured to make services within a cluster accessible from the external network) of the application management (app-manager) under different regional clusters. As you can see, obtaining product status data under multiple regional clusters requires the involvement of different Ingresses, which is quite cumbersome.

[0077] Based on the above considerations, this application embodiment aims to help upper layers (such as the business layer) isolate the adaptation problem of multi-region clusters, so as to realize the adaptation problem of multi-region clusters at the controller (operator) layer. In a specific implementation, a product instance real-time computing service can be deployed in a main regional cluster, and real-time status calculation of product instances on each regional cluster can be performed based on the product instance real-time computing service. This real-time status calculation is to calculate the product status data of the product instances in real time. The function of the product instance real-time computing service is implemented through the controller. That is, the controller can monitor multiple regional clusters and update the product instance resources on the main regional cluster. The product instance resources are the product status data of the product instances, thereby realizing the synchronization of data across multiple regional clusters. That is, data processing for multiple regional clusters is implemented at the controller layer provided by the product instance real-time computing service. Then the business layer does not need to consider the ingress information of multiple regional clusters, or all upper-layer services using the product instance real-time computing service do not need to consider ingress information, thus effectively simplifying the processing of multi-region clusters.

[0078] In one implementation, the specific process for using a controller to monitor multiple regional clusters can be as follows: Figure 3b As shown. For example, see Figure 3b As shown: First, obtain the authentication configuration files (e.g., authentication configuration files, KubeConfig, etc.) for each regional cluster, and store these configuration files in a database. This database can be the aforementioned status database or another database; there are no restrictions. The authentication configuration file for any given regional cluster is used to configure the controller's management permissions for that cluster, enabling the controller to monitor and perform real-time calculations on the product instances deployed on that cluster.

[0079] After storing the authentication configuration files for each regional cluster in the database, a medium for interacting with the regional cluster can be created. This medium could be an access link to the regional cluster, allowing the controller to retrieve relevant component status data from the corresponding cluster based on the access link. This access link can be called a client, and the access links for each regional cluster can be stored in a map, such as in the form of client.Client.

[0080] By deploying the authentication configuration file and creating access links for each regional cluster, the controller is initialized, thus enabling it to monitor each regional cluster. In one embodiment, the real-time computing service for product instances deployed on the primary regional cluster can use the controller to manage the product instance resources (i.e., product status data) deployed on the primary and backup regional clusters. It can also tune the product instance resources on the primary regional cluster; that is, while monitoring the product instance resources deployed on the primary and backup regional clusters, it can call the status processing unit to calculate the product status data of the product instances and update the product instance data on the primary regional cluster based on the calculated data.

[0081] In summary, the embodiments of this application can store the client.Client of each regional cluster in a map, and monitor the applications, middleware, etc. under the product instance based on the client.Client of each regional cluster, and can coordinate the product status data of the product instance on the main regional cluster based on the monitoring results (i.e., product status data).

[0082] In one implementation, there may be a corresponding triggering condition for obtaining the component status data of the associated components of the product instance deployed on the regional cluster. That is, when the triggering condition is met, the process of obtaining the component status data of the associated components of the product instance deployed on the regional cluster can be executed, and the product status data for the product instance can be further determined based on the obtained component status data.

[0083] Optionally, the example illustrates a target product instance deployed on each regional cluster, where the target product instance is any one of the product instances deployed on each regional cluster. The triggering condition can be: detecting a target operation on the target product instance that affects component status data. This target operation can include one or more of the following: modification, deletion, and addition operations. In other words, if a target operation on component status data is detected on the target product instance, the step of obtaining the component status data of the associated components of the target product instance can be triggered. Considering that the final product status data of the product instance can be synchronously stored in the status database, this acquisition method allows for real-time updates of the product status data stored in the status database based on changes in the product status data of the product instances on the regional cluster, ensuring the accuracy and reliability of data storage.

[0084] Optionally, the triggering condition can be: detecting that the current time is a preset acquisition time. This preset acquisition time can be pre-set and can be a periodic time, meaning it can be a time within the data acquisition cycle of the target product instance. The data acquisition cycle can indicate the time interval for acquiring the component status data of the associated components of the target product instance, and the time interval indicated by the data acquisition cycle is not specifically limited. Based on this, it can be seen that the component status data of the associated components of the product instance can be acquired periodically, so that the product status data of the product instance stored in the status database can be updated periodically, ensuring the real-time nature of the data in the status database. In other words, if the current time is detected as the preset acquisition time, the step of acquiring the component status data of the associated components of the target product instance can be triggered.

[0085] In one embodiment, the data acquisition period for each product instance can be the same or different. For example, the data acquisition period for each product instance can be determined based on the product status data of the product instances requested by historical query requests. Specifically, historical query requests within a historical time period can be obtained; where the historical time period refers to the time period preceding the current time and with a preset time interval (e.g., 7 days) from the current time, and the current time can refer to the moment when a storage requirement for product status data for a product instance is detected; the number of historical query requests can be multiple. Therefore, the data acquisition period for a product instance can be determined based on multiple historical query requests.

[0086] Optionally, historical query requests can include instance identifiers indicating the product instance to be queried. This allows us to identify all instance identifiers contained in multiple historical query requests and count the number of each instance identifier, which can be referred to as the identifier count. After counting the identifier counts for each instance identifier, we can determine the data acquisition cycle for each product instance deployed on each regional cluster based on the identifier counts. Specifically, the data acquisition cycle for each product instance can be set according to the idea that the data acquisition cycle is negatively correlated with the identifier count; that is, if a product instance has a higher identifier count, its corresponding data acquisition cycle can be shorter, and vice versa. This setting method allows for shorter data acquisition cycles for frequently queried product instances to ensure timely updates to the product status data in the status database, improving query accuracy, while longer data acquisition cycles for less frequently queried product instances can reduce computational overhead.

[0087] As mentioned earlier, the data acquisition period for each product instance is determined on a per-product-instance basis. In another embodiment, the data acquisition period for each product instance can also be determined on a regional cluster basis, meaning that all product instances deployed on a regional cluster have the same data acquisition period. In this case, the data acquisition period for each regional cluster can also be determined using multiple historical query requests. In a specific implementation, after obtaining multiple historical query requests within a historical time period, it can be determined which regional cluster's product instance each historical query request requests, i.e., the regional cluster corresponding to each historical query request is determined; for example, the historical query request can carry a cluster identifier, which can be used to indicate the requested regional cluster.

[0088] Based on this, we can count the number of identifiers corresponding to each cluster identifier included in multiple historical query requests. After obtaining the number of identifiers for each cluster identifier, we can determine the data acquisition cycle for each regional cluster based on the number of identifiers for each cluster identifier. Specifically, we can set the data acquisition cycle for each regional cluster according to the idea that the data acquisition cycle is negatively correlated with the number of identifiers for a cluster identifier; that is, if a regional cluster has more identifiers, the corresponding data acquisition cycle can be shorter, and vice versa. This setting method allows for setting shorter data acquisition cycles for regional clusters with high query frequency, enabling timely updates of product status data for product instances on that regional cluster in the status database, thus improving query accuracy. Conversely, setting longer data acquisition cycles for regional clusters with low query frequency can reduce computational overhead.

[0089] In one implementation, a real-time calculation can be performed when the product configuration file (such as a ymal file) is deployed to the regional cluster, so that subsequent updates can be made based on the product status data obtained from the initial calculation, and historical traceability is also facilitated.

[0090] S202, determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and determine the data processing method corresponding to one or more data types respectively.

[0091] The data types may include: a first data type for resource usage, a second data type for component running status, a third data type for application status data of associated components, a fourth data type for middleware status data of associated components, and so on. This application uses the above four data types as examples to illustrate the determination of product status data for product instances.

[0092] It's important to understand that the first data type regarding resource usage can be understood as: the component status data of the associated components of a product instance includes data related to resource usage. For example, the number of Central Processing Units (CPUs), memory size, and storage size can all be understood as data related to resource usage. Therefore, for any one of one or more regional clusters, if data regarding resource usage is detected in the component status data of the associated components of a product instance deployed on that regional cluster, it can be determined that the data type of the component status data of the associated components of the product instance deployed on that regional cluster includes the first data type.

[0093] The second data type regarding component runtime status can be understood as follows: the component runtime status of associated components included in the component status data of the product instance. For example, the application's application status and the middleware's runtime status can both be understood as component runtime status for associated components. Therefore, if the component runtime status of associated components is detected in the component status data of a product instance deployed on any regional cluster, it can be determined that the data type of the component runtime data of associated components for that product instance deployed on that regional cluster includes the second data type.

[0094] The third data type for application state data associated with a product instance can be understood as follows: the component state data of the associated components of a product instance includes application state data. For example, the application name, application running status, application version, and application version update time can all be considered application-specific state data. Therefore, if application-specific state data is detected in the component state data of the associated components of a product instance deployed on any regional cluster, it can be determined that the data type of the component state data of the associated components of that product instance deployed on that regional cluster includes the third data type.

[0095] The fourth data type for middleware status data associated with a product instance can be understood as follows: the component status data of the associated components of a product instance includes middleware status data. For example, middleware name, middleware type, and middleware running status can all be considered middleware status data. Therefore, if middleware status data is detected in the component status data of an associated component of a product instance deployed on any regional cluster, it can be determined that the data type of the component status data of the associated components of that product instance deployed on that regional cluster includes the fourth data type.

[0096] Among them, the data processing method corresponding to the first data type can be the first data processing method that processes the resource usage of the product instance, the data processing method corresponding to the second data type can be the second data processing method that processes the running health of the product instance, the data processing method corresponding to the third data type can be the third data processing method that statistically analyzes the status data of the application under the product instance, and the data processing method corresponding to the fourth data type can be the fourth data processing method that statistically analyzes the status data of the middleware under the product instance.

[0097] Based on the above description, in one implementation, for any one of one or more regional clusters, the data type involved in the component status data of the associated components of the product instance deployed on that regional cluster can be directly determined based on the component status data of the associated components. After determining the data type, the data processing method corresponding to that data type can be further determined. For example, if the determined data types include a first data type, a second data type, and a third data type, then the data processing method corresponding to the first data type can be determined as the first data processing method, the data processing method corresponding to the second data type as the second data processing method, and the data processing method corresponding to the third data type as the third data processing method.

[0098] S203, based on the data processing methods corresponding to one or more data types, processes the status data of the associated components of the product instances deployed on each regional cluster under the corresponding data type, to obtain the product status data of the product instances deployed on each regional cluster.

[0099] In one implementation, after obtaining the component status data of the associated components of the product instances deployed on each regional cluster, the product status data of the product instances deployed on each regional cluster can be determined based on the component status data of the associated components of the product instances deployed on each regional cluster, thus obtaining the product status data of the product instances deployed on each regional cluster. Optionally, for any one of the one or more regional clusters, one or more data processing methods corresponding to different data types can be used to process the status data of the associated components of the product instances deployed on that regional cluster under the corresponding data type to obtain the product status data of that product instance. The product status data may include product health status, product resource usage, number of product applications, number of middleware, real-time status information of middleware, etc.

[0100] As mentioned earlier, the component status data of the associated components of a product instance can include status data under one or more data types, and the status data under any data type can be processed using a data processing method. For example, the data processing method can include the aforementioned data processing method for processing the resource usage of the product instance, the data processing method for processing the operational health of the product instance, the data processing method for statistically analyzing the status data of applications under the product instance, and so on.

[0101] As can be seen, in this embodiment of the application, different data processing methods can be used to process the state data of the associated components of product instances deployed on a regional cluster under different data types to obtain product state data of the corresponding data types. The product state data of a product instance can include product state data under these different data types. This method effectively distinguishes the processing of data under different data types, ensuring the accuracy and reliability of data processing. Furthermore, when processing state data of corresponding data types using multiple data processing methods, parallel processing can be used to effectively improve the state data processing speed, thereby improving the speed of determining product state data. The determined product state data needs to be stored in a state database, and the data in the state database can be used to provide query services. Therefore, while improving the speed of determining product state data, the accuracy and reliability of queries can also be improved.

[0102] In one implementation, considering computational overhead, status data for certain data types can be processed to obtain product status data for those specific data types. This product status data then constitutes the product status data for a product instance. It's understandable that when relevant personnel query product status data, they can query all product status data included in a product instance, or they can query only product status data for certain data types. For example, they can query only the resource usage status data and the operational health status data within a product instance; or they can query only the application status data within a product instance; and so on. Therefore, for data types with high query frequency, timely processing can be performed to obtain the corresponding product status data, facilitating subsequent query services. This approach ensures real-time computation while minimizing computational overhead.

[0103] Therefore, the data type of the status data to be processed can be determined based on the data type requested in the historical query requests. Optionally, the historical query requests can carry type identifiers, which can be used to indicate the data type, and thus indicate the data type of the status data to be queried. In specific implementation, multiple historical query requests within a historical time period can be obtained, and the number of identifiers corresponding to each type identifier included in the multiple historical query requests can be counted. After obtaining the number of identifiers for each type identifier, the data type to be processed can be determined based on the number of identifiers for each type identifier. For example, the type identifiers can be sorted in descending order of the number of identifiers to obtain the corresponding sorting result; after obtaining the sorting result, the data type to be processed can be determined based on the sorting result. For example, the data type indicated by the first N type identifiers can be determined as the data type to be processed; where N can be 1, 2, etc., and its specific value is not limited.

[0104] S204 stores the product status data of product instances deployed on each regional cluster in the status database.

[0105] In one implementation, the state database can store product status data of product instances deployed on each regional cluster, so as to provide the business layer with a data source for product instance status data. Optionally, the product status data of product instances deployed on each regional cluster determined in step S203 can be stored in the state database to ensure real-time updates of product status data in the state database.

[0106] As mentioned earlier, in one embodiment, the product status data of product instances deployed on each regional cluster can be recorded on the main regional cluster to enable updates to product instance resources on the main regional cluster, or in other words, real-time updates to the product status data of product instances. Specifically, when recording the product status data of product instances on the main regional cluster, it can be stored in the status database of that main regional cluster. In another embodiment, the product status data of product instances deployed on each regional cluster can also be stored in a separate status database, distinct from the status database for the main regional cluster.

[0107] In one implementation, product status data of product instances in each regional cluster can be obtained through polling and synchronized to the status database. Specifically, this polling method could refer to periodically retrieving product status data of product instances in each regional cluster.

[0108] S205, if a query request for product status data of a specified product instance is obtained, then in response to the query request, the product status data requested by the query request is retrieved from the status database.

[0109] In one implementation, the query request may carry an instance identifier of a specified product instance. This instance identifier can be used to indicate the specified product instance, so that the product status data corresponding to the specified product instance can be found in the status database based on the instance identifier. The specified product instance can be any product instance, and the query request can be directed to the status database on the primary regional cluster, or it can be directed to another status database; there is no limitation on this.

[0110] As mentioned earlier, product status data can include product health status, product resource usage, number of applications, number of middleware, and real-time status information of middleware. By searching the product status data of a product instance in the status database, all product status information under the product can be obtained at once. Compared to obtaining the status data of each application by separately calling the application management (app-manager) interface of each application under the product instance and then concatenating the status data of each application to obtain the product status data for the product, the embodiments of this application can simplify the process of obtaining real-time product status data. It does not need to rely on the interface capabilities of the application management interface. It only needs to obtain the real-time calculated product status data directly through a unified query interface, achieving one-time acquisition without the need for assembly, thereby effectively improving data query efficiency.

[0111] Furthermore, when obtaining the health status of a product, there is no need to perform temporary calculations on the product's health status when making requests using the business layer interface. This application embodiment can be used for real-time calculation of the health status of this product instance. In addition, it avoids the problem of slow acquisition speed caused by multiple interface calls that first request the application list and then request the application details interface. This application embodiment can directly obtain the product's health status from the status database through the business layer without multiple interface calls, which can also effectively improve data query efficiency.

[0112] In one implementation, the query request can also undergo security verification to prevent the leakage of product status data in the status database and improve the security of the product status data. Optionally, the query request can carry an object identifier, which can be used to indicate the object (user) initiating the query request. Based on this, in one embodiment, the query request can be security verified based on the object identifier; in a specific implementation, it can be determined whether the object identifier exists in a preset object identifier set. Each preset object identifier in the preset object identifier set is only allowed to respond to the query request corresponding to the preset object identifier and perform a search operation after it has been successfully registered in the status database.

[0113] If the object identifier exists in the preset object identifier set, the query request is considered successfully validated, and the step of retrieving the requested product status data from the status database in response to the query request is triggered. If the object identifier does not exist in the preset object identifier set, the query request is considered to have failed, and a query request failure message is output.

[0114] In one implementation, differentiated storage can be used when storing product status data for different product instances in the status database. For example, when storing product status data for product instances with confidentiality requirements, corresponding query permissions can be set for them, while for product status data for product instances without confidentiality requirements, no query permissions need to be set for them. The criteria for which product instances have confidentiality requirements or not can be pre-defined, such as based on actual business needs, without specific limitations.

[0115] The specific process of setting query permissions for a product instance can be as follows: If an object wants to have query permissions for the product status data of that product instance, it can register an object identifier in the status database. This object identifier is used to uniquely identify the object. If the object identifier is successfully registered in the status database, it indicates that the object has the query permission to query the product status data of that product instance. Based on this, it can be seen that for a product instance with query permissions, this product instance can also be associated with a corresponding set of reference object identifiers. This set of reference object identifiers can include one or more reference object identifiers, with each reference object identifier indicating an object. The object indicated by the reference object identifier in the set of reference object identifiers is the object with query permissions. As described above, setting query permissions can also improve the security of product status data.

[0116] In this scenario, after obtaining a query request for the product status data of a specified product instance, it can be determined whether the instance identifier of the specified product instance carried in the query request exists in the preset instance identifiers. The preset instance identifier set may include one or more preset instance identifiers, with each preset instance identifier indicating a product instance; the product instance indicated by the preset instance identifier in the preset instance identifier set is a product instance with query permissions.

[0117] If the instance identifier does not exist in the preset instance identifiers, the step of retrieving the requested product status data from the status database in response to the query request can be directly triggered. If the instance identifier exists in the preset instance identifiers, it can be further determined whether there is permission to query product status data for the specified product instance based on the object identifier carried in the query request. Optionally, it can be determined whether the object identifier exists in the reference object identifier set corresponding to the specified product instance.

[0118] If the object identifier exists in the reference object identifier set corresponding to the specified product instance, the step of retrieving the requested product status data from the status database in response to the query request can be triggered. If the object identifier does not exist in the reference object identifier set corresponding to the specified product instance, a query request failure message can be output.

[0119] In this embodiment, cloud-native capabilities can be used to uniformly manage products deployed across multiple regional clusters, and product instances deployed across multiple regional clusters can be monitored in real time. The component status data of associated components of each product instance can be calculated to obtain the corresponding product status data, which can include all status data under the product. By synchronizing the determined product status data to the status database in real time, a data source can be provided for subsequent business layers. Furthermore, data retrieval from the status database can be performed in a single step, without the need for assembly or multiple interface calls. All product status data can be directly obtained through a unified query interface, thereby effectively improving data query efficiency.

[0120] Based on the above embodiments, this application provides another data processing method, which can be executed by the controller mentioned above. Please refer to... Figure 4 The data processing method includes, but is not limited to, the following steps:

[0121] S401: Obtain access links to various regional clusters in one or more regional clusters.

[0122] In one implementation, as described above, the controller and each regional cluster can communicate via access links corresponding to each regional cluster. To obtain component status data of associated components related to a product instance deployed on any one of the one or more regional clusters, the access link of that regional cluster can be obtained first. The access link for any regional cluster is created after configuring the controller's management permissions for that regional cluster. The access links for each regional cluster can be stored in a designated storage area so that the controller can directly obtain the required access link from that designated storage area when it needs to access the regional cluster.

[0123] S402: Based on the access links of each regional cluster, obtain the component status data of the associated components of the product instances deployed on the corresponding regional clusters.

[0124] In one implementation, for any one of one or more regional clusters, the system can access that regional cluster based on the access link corresponding to that regional cluster to obtain the component status data of the associated components of the deployed product instance from that regional cluster.

[0125] The specific implementations of steps S401 and S402 can be found in the description of step S201 above, and will not be repeated here. For example, the triggering condition mentioned in step S201 can be understood as the triggering condition for obtaining the access link, and so on.

[0126] S403, determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and determine the data processing method corresponding to one or more data types respectively.

[0127] The specific implementation of this step can be referred to the description in step S202 above, and will not be repeated here.

[0128] S404, based on the data processing methods corresponding to one or more data types, processes the status data of the associated components of the product instances deployed on each regional cluster under the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster.

[0129] In one implementation, when the controller determines the product status data of a product instance, the specific implementation of a data processing method can be integrated into a single state processing unit (or computation unit). That is, closely related data can be processed by a unified state processing unit, while different data can be processed by different state processing units. The determination of product status data for a product instance will be specifically explained below in conjunction with data processing methods and state processing units. Considering that the principle for determining the product status data of product instances deployed on various regional clusters is consistent, the following explanation will focus on the target regional cluster as an example to illustrate the process of determining the product status data of a product instance.

[0130] In one implementation, when the component status data of the associated components of the product instance deployed on the target region cluster includes one or more data types, such as a first data type related to resource usage, the data processing method corresponding to the first data type can be a first data processing method that processes the resource usage of the product instance. In this case, the specific implementation of step S404 can be:

[0131] First, resource usage data for each associated component under the product instance can be obtained from the component status data of the associated components of the product instance deployed on the target region cluster. Any associated component can be an application, middleware, or virtual machine under the product instance. For any associated component, the resource usage data can include one or more of the following: the number of Central Processing Units (CPUs), the amount of memory, and the amount of storage. For example, if any associated component is middleware, the obtained resource usage data for that middleware could be: CPU: 1, memory: 2Gi, storage: 10G.

[0132] Then, the first processing unit can be invoked to determine the resource usage data of the product instance based on the resource usage data of each associated component. This resource usage data reflects the real-time resource usage of the product. For example, the resource usage data of the product instance may include one or more of the maximum and minimum resource usage. The maximum resource usage may be the maximum usage of one or more of CPU, memory, storage, etc., and the minimum resource usage may be the minimum usage of one or more of CPU, memory, storage, etc. In one embodiment, taking the maximum and minimum CPU usage as examples, the sum of the maximum CPU usages of each associated component can be used as the maximum CPU usage of the product instance, and the sum of the minimum CPU usages of each associated component can be used as the minimum CPU usage of the product instance.

[0133] Finally, the resource usage data of product instances can be used as product status data regarding resource usage of product instances deployed on the target region cluster.

[0134] For example, product status data regarding resource usage for a product instance may include: limits (maximum usage): CPU is 2, memory is 2 Gi; requests (minimum usage): CPU is 8, memory is 16 Gi.

[0135] As mentioned above, the first data processing method can be integrated into a state processing unit. This state processing unit can be referred to as the first processing unit, meaning the state processing unit corresponding to the first data type can be a first processing unit that processes the resource usage of product instances. This first processing unit can also be called a product real-time resource usage calculation unit. In this case, the specific implementation of step S404 can be:

[0136] First, the first processing unit can be invoked to obtain the resource usage data of each associated component among all associated components of the product instance deployed on the target region cluster, from the component status data of the associated components. Then, the first processing unit can be invoked to determine the resource usage data of the product instance based on the resource usage data of each associated component. This resource usage data of the product instance reflects the real-time resource usage of the product. Finally, the resource usage data of the product instance can be used as the product status data of the product instance deployed on the target region cluster regarding resource usage.

[0137] In one implementation, when the component status data of the associated components of the product instance deployed on the target region cluster includes one or more data types, such as a second data type related to the component's running status, the data processing method corresponding to the second data type can be a second data processing method that processes the running health status of the product instance. In this case, the specific implementation of step S404 can be:

[0138] First, the component running status of each associated component under all associated components of the product instance can be obtained from the component status data of the associated components of the product instance deployed on the target region cluster.

[0139] Then, reference components to be deployed under the product instance can be obtained, where the reference components to be deployed can refer to the components planned to be deployed under the product instance. Further, the running status of the product instance can be determined based on the component running status of each associated component and the parameter components to be deployed under the product instance. In one embodiment, product status calculation rules can be used, and the running status of the product instance can be determined based on the component running status of each associated component and the parameter components to be deployed under the product instance. Finally, the running status of the product instance can be used as product status data for the operational health of the product instance deployed on the target region cluster.

[0140] The running status of a product instance can reflect the health status of the product; that is, the running status of a product instance can also be referred to as the health status of the product instance. For example, the running status (health status) of a product instance can be any of the following: Healthy, Unhealthy, or Undeployed.

[0141] The specific implementation of determining the running status of a product instance using product status calculation rules, based on the component running status of each associated component and the parameter components that need to be deployed under that product instance, can be described as follows. These product status calculation rules indicate how to determine the running status of the corresponding product instance based on the component running status of each associated component and the parameter components that need to be deployed under that product instance.

[0142] In one embodiment, if all associated components under a product instance are consistent with the reference component to be deployed, and the ratio between the number of first components of associated components with a healthy running status and the number of second components of all associated components is greater than or equal to a preset ratio, then the running status of the product instance can be determined to be healthy.

[0143] Understandably, if all associated components under the product instance are consistent with the reference components to be deployed, for example, if the reference components to be deployed include: Component 1, Component 2, and Component 3, then the associated components obtained in the actual environment will also include: Component 1, Component 2, and Component 3. This indicates that all the components planned under the product instance have been deployed in the actual environment.

[0144] The preset ratio can be pre-set, such as 1 or 0.9. In practical scenarios, the preset ratio can be set to a larger value, such as 1 if possible. A preset ratio of 1 indicates that all associated components within the product instance must be in a healthy state. It's understandable that if some associated components in the product instance are not in a healthy state, it may affect the normal use of the product. Therefore, to more accurately determine the operating status of the product instance, the preset ratio can be set to 1. Based on this, if all planned components under the product instance have been deployed in the actual environment, and the operating status of each associated component is healthy, then the product instance can be determined to be in a healthy state.

[0145] In one embodiment, as described above, if all associated components under a product instance are consistent with the reference component to be deployed, and the ratio between the number of first components of associated components with healthy running status and the number of second components of all associated components is less than a preset ratio, then the product instance can be determined to be in an unhealthy running status.

[0146] In one embodiment, if all associated components under a product instance are inconsistent with the reference components to be deployed, the product instance's running state can be determined to be unhealthy or undeployed. It is understandable that if all associated components under a product instance are inconsistent with the reference components to be deployed—for example, the reference components to be deployed include Component 1, Component 2, and Component 3, but only Component 1 and Component 3 are obtained in the actual environment—it indicates that not all planned components under the product instance have been deployed in the actual environment. It is easy to understand that if not all planned components under the product are deployed in the actual environment, some functions of the product may not be usable, indicating that the product is unhealthy. Therefore, the product instance's running state can be determined to be either unhealthy or undeployed.

[0147] As mentioned above, the second data processing method can be integrated into a state processing unit. This state processing unit can be referred to as the second processing unit; that is, the state processing unit corresponding to the second data type can be a second processing unit that processes the operational health status of the product instance. This second processing unit can also be called a product health status calculation unit. In this case, the specific implementation of step S404 can be:

[0148] First, the second processing unit can be invoked to retrieve the component running status of each associated component among all associated components of the product instance deployed on the target region cluster. Then, the second processing unit can be invoked to retrieve the reference components to be deployed under the product instance, where the reference components to be deployed can refer to the components planned to be deployed under the product instance. Further, the second processing unit can be invoked to determine the running status of the product instance based on the component running status of each associated component and the parameter components to be deployed under that product instance. Finally, the running status of the product instance can be used as the product status data for the operational health of the product instance deployed on the target region cluster.

[0149] In one implementation, an alarm mechanism is triggered when the product instance is determined to be in an unhealthy state (e.g., unhealthy or not deployed). For example, an alarm can be sent to relevant personnel so that they can be informed of the product's health status in a timely manner and take appropriate action when the product instance is in an unhealthy state to ensure the healthy operation of the product instance.

[0150] Optionally, if the product instance is determined to be in an unhealthy state, the abnormal factor (cause) causing this unhealthy state and its corresponding abnormality level can be further determined. Then, the mapping relationship between reference abnormality levels and reference alarm methods can be obtained, and the alarm method corresponding to the abnormality level can be determined based on this mapping relationship. For example, a reference abnormality level that matches the abnormality level can be found from the mapping relationship, and the reference alarm method corresponding to the found reference abnormality level can be determined as the alarm method corresponding to the abnormality level. Finally, an alarm can be issued based on this alarm method.

[0151] The mapping relationship between reference anomaly levels and reference alarm methods can be preset. When setting this relationship, it can be based on the idea that the severity of the anomaly at the reference anomaly level is positively correlated with the alarm severity of the reference alarm method. That is, the higher the severity of the anomaly at the reference anomaly level, the higher the alarm severity of the reference alarm method can be set; conversely, the lower the severity of the anomaly at the reference anomaly level, the lower the alarm severity of the reference alarm method can be set. For example, reference alarm methods can include telephone, email, and SMS, with the alarm severity decreasing sequentially from telephone to email to SMS. As mentioned earlier, differentiated alarm methods can be implemented based on the different degrees of anomaly at the anomaly level, improving user experience.

[0152] For example, taking reference alarm methods including telephone, email, and SMS as examples, the mapping relationship between reference anomaly levels and reference alarm methods is explained. Reference anomaly levels include Level 1, Level 2, and Level 3, with the anomaly severity of Level 3 being higher than Level 2, and Level 2 being higher than Level 1. If the reference anomaly level is Level 3, the corresponding reference alarm method is telephone, meaning an alarm can be triggered via telephone, such as by making a phone call to a specified recipient. If the reference anomaly level is Level 2, the corresponding reference alarm method is email, meaning an alarm can be triggered via email, such as by sending an email to a specified recipient's mailbox. If the reference anomaly level is Level 1, the corresponding reference alarm method is SMS, meaning an alarm can be triggered via SMS, such as by sending an SMS to a specified recipient. The specified recipient can be one or more pre-defined users, without limitation.

[0153] The specific implementation method and its corresponding anomaly level can be predefined. For example, the following three specific implementation methods that cause this unhealthy state are used as examples to illustrate the anomaly levels. If the anomaly factor is Factor 1 (all associated components under the product instance are consistent with the reference component to be deployed, and the ratio between the number of first components of associated components in a healthy state and the number of second components of all associated components is less than a preset ratio), then the anomaly level is determined to be Level 1. If the anomaly factor is Factor 2 (all associated components under the product instance are inconsistent with the reference component to be deployed, and the ratio between the number of first components of associated components in a healthy state and the number of second components of all associated components is greater than or equal to a preset ratio), then the anomaly level is determined to be Level 2. If the anomaly factor is Factor 3 (all associated components under the product instance are inconsistent with the reference component to be deployed, and the ratio between the number of first components of associated components in a healthy state and the number of second components of all associated components is less than or equal to a preset ratio), then the anomaly level is determined to be Level 3.

[0154] It should be noted that the above exception level settings are merely illustrative examples, and exception levels can also be set in other ways, without limitation.

[0155] In one implementation, when the component state data of the associated components of the product instance deployed on the target region cluster includes one or more data types, such as a third data type for the state data of the associated component as an application, the data processing method corresponding to the third data type can be a third data processing method that statistically analyzes the state data of the application under the product instance. In this case, the specific implementation of step S404 can be:

[0156] First, the status data of each application within all applications of the product instance can be obtained from the component status data of the associated components of the product instance deployed on the target region cluster. The status data of any application can include one or more of the following: application name, application running status, application version, and application version update time; the application version update time can refer to the application's most recent update time. For example, the status data of an application might include: application name "dawn-xxx", application running status "Succeeded", application version 1.0.2, and application version update time "2022-12-29 22:51:58".

[0157] Then, based on the status data of each application within the product instance, the total number of applications under the product instance can be counted. This number can be referred to as the "first application count." For example, the first application count can be based on the application name. It's understood that an application can have one application name, so the number of application names is the same as the number of applications under the product instance. Similarly, it can be based on the application's running status. It's understood that an application can have one running status, so the number of running application statuses is the same as the number of applications under the product instance.

[0158] It can also count the number of applications in a healthy state; this number can be referred to as the second number of applications. For example, the number of applications in a healthy state can be determined from the application running status of each application. It should be noted that the application readiness ratio mentioned above can refer to the ratio between the second number of applications and the first number of applications.

[0159] Finally, the number of first applications, the number of second applications, and the status data of each application can be used as product status data for the application status data of the product instances deployed on the target region cluster.

[0160] As mentioned above, the third data processing method can be integrated into a state processing unit. This state processing unit can be referred to as the third processing unit, meaning the state processing unit corresponding to the third data type can be a third processing unit that statistically analyzes the state data of applications under a product instance. This third processing unit can also be called the application state information calculation unit under the product. In this case, the specific implementation of step S404 can be:

[0161] First, the third processing unit can be invoked to retrieve the status data of each application within all applications of the product instance deployed on the target region cluster from the component status data of the associated components. Then, based on the status data of each application within the product instance, the third processing unit can be invoked to count the number of first applications and the number of second applications with a healthy running status. Finally, the number of first applications, the number of second applications, and the status data of each application can be used as the product status data for the application status data of the product instance deployed on the target region cluster.

[0162] Based on the above description, the third processing unit can be used to summarize the application information corresponding to the applications (apps) included in the product instance. The application information here can refer to the number of the first application, the number of the second application, and the status data of each application.

[0163] In one implementation, when the component state data of the associated components of the product instance deployed on the target region cluster includes one or more data types, such as a fourth data type for the state data of middleware, the data processing method corresponding to the fourth data type can be a fourth data processing method that statistically analyzes the state data of the middleware under the product instance. In this case, the specific implementation of step S404 can be:

[0164] It can obtain the status data of each middleware in all middleware under the product instance from the component status data of the associated components of the product instance deployed on the target region cluster; and can use the status data of each middleware as the product status data of the product instance deployed on the target region cluster for the status data of the middleware.

[0165] The status data for any middleware may include one or more of the following: middleware name, middleware type, middleware running status, and middleware planning data. Middleware planning data refers to the resource usage data configured for any middleware. For example, the middleware type could be MariaDB, Redis, etc., and the middleware planning data can be understood as the service rules set for the middleware by the product instance, which may include settings for resource usage of one or more of CPU, memory, and storage.

[0166] For example, the status data of a middleware includes: middleware name is dawn-mariadb, middleware type is mariadb, middleware running status is Ready, number of CPUs is 1, memory size is 2Gi, and storage size is 10G. Among them, the number of CPUs, memory size, and storage size are middleware planning data.

[0167] As mentioned earlier, the fourth data processing method can be integrated into a state processing unit. This state processing unit can be referred to as the fourth processing unit; that is, the state processing unit corresponding to the fourth data type can be a fourth processing unit that statistically analyzes the state data of middleware under a product instance. This fourth processing unit can also be called a middleware information calculation unit under a product. In this case, the specific implementation of step S404 can be:

[0168] The fourth processing unit can be invoked to obtain the middleware status data of the product instance from the component status data of the associated components of the product instance deployed on the target region cluster; and the middleware status data can be used as the product status data of the product instance deployed on the target region cluster for the middleware status data.

[0169] In summary, the embodiments of this application can link the planning data of product instances, the status data of related components in the actual environment of the product instance (such as the status data of applications, middleware, virtual machines, etc.), and regional cluster resources (such as K8s CR) data, and aggregate and calculate real-time product status data using monitoring capabilities.

[0170] In one implementation, as mentioned earlier, based on cloud-native capabilities, specifically the support for Watch capabilities, the real-time computing service of product instances on the main regional cluster can monitor all product-related resources and calculate the current product status in real time. Therefore, based on the binding between the product instance and all applications and middleware under the current product (i.e., the Watch mechanism), as long as there is a target operation targeting an application or middleware under the product—such as any of the following—the product instance's status data will be recalculated to ensure the real-time nature of the product status data.

[0171] For example, see Figure 5a As shown, the real-time computing service (i.e., the controller) for product instances on the primary region cluster can monitor state changes of product instances on both the primary and backup region clusters. In one embodiment, if the real-time computing service for product instances on the primary region cluster detects that resources (such as application and middleware status data) on the primary region cluster have been deleted, added, or modified, it can call the status processing unit to calculate the product status data of the product instance based on the component status information of the associated components under the product instance; and can update the product status data recorded on the primary region cluster based on the calculated product status data. Simultaneously, the calculated product status data can also be synchronized to the status database.

[0172] Similarly, in one embodiment, if the real-time computing service of the product instance on the primary region cluster detects that resources (such as the status data of applications, middleware, etc.) on the backup region cluster have been deleted, added, or modified, it can call the status processing unit to calculate the product status data of the product instance based on the component status information of the associated components under the product instance; and can update the product status data recorded on the primary region cluster based on the calculated product status data. At the same time, the calculated product status data can also be synchronized to the status database.

[0173] In one implementation, the real-time computing service for product instances (i.e., the controller) can also monitor configuration updates for product instances. For example, once a modification to the product configuration is detected, such as deploying a new product configuration file (e.g., a YAML file) through the product interface, or compiling (editing) a new product configuration file in the environment using the kubectl command, a modification record can be inserted into the state database. This modification record can include a comparison between the old version configuration (i.e., the product configuration before the modification) and the new version configuration (i.e., the product configuration after the modification), so that the history of product configuration changes can be traced based on the data stored in the state database.

[0174] Optionally, if an update event is detected in the product configuration file of a product instance deployed on the target region cluster, the update time that generated the update event can be obtained. The target region cluster can be any one of one or more region clusters. The product configuration file can include the configuration information of the product instance deployed on the target region cluster. The update event can specifically modify information in the product configuration file, such as modifying the Spec field of the application, middleware, etc., in the product configuration file. After obtaining the update time, the product configuration file before and after the update can also be obtained. Furthermore, the update time, the product configuration file before the update, and the product configuration file after the update can be stored in a state database to facilitate the tracing of application configuration (YAML) change history based on the data stored in the state database. In one embodiment, in addition to directly obtaining the product configuration file before and after the update, it is also possible to obtain only the data (content) before the modification and the data after the modification specifically related to the modification operation in the product configuration file; this is not limited.

[0175] For example, the specific implementation of monitoring product configuration files can be found in [reference needed]. Figure 5b As shown. See also Figure 5bAs shown, the real-time computing service (i.e., the controller) of the product instance on the main regional cluster can monitor updates to the product configuration file. In one embodiment, when the real-time computing service of the product instance on the main regional cluster detects an update event of the description information of the associated components in the product configuration file on the main regional cluster, it can obtain the corresponding modification information (such as the update time, the product configuration file before the update, and the product configuration file after the update) and record it in the status database.

[0176] Similarly, in one embodiment, when the real-time computing service of the product instance on the primary region cluster detects an update event of the description information of the associated components in the product configuration file on the backup region cluster, it can obtain the corresponding modification information (such as the update time, the product configuration file before the update, and the product configuration file after the update) and record it in the status database.

[0177] In one implementation, the event handler in the ProductInstance Controller can be modified to enable the controller to handle update events. For example, when handling an Update event (such as when a Spec field of App or Comp is modified), the event handler can obtain a newObj object and an oldObj object. Both of these objects are Kubernetes' obj base classes. After obtaining these two objects, the relevant configuration can be modified, and the modified information can be recorded in the state database. The oldObj object can be understood as the data in the product configuration file before modification, and the newObj object can be understood as the data in the product configuration file after modification.

[0178] For example, the specific implementation of monitoring product configuration files can be found in [link to relevant documentation]. Figure 5c As shown. See also Figure 5c As shown. In one embodiment, the real-time computing service of the product instance on the primary regional cluster detects an update event of the product configuration file on the primary regional cluster; then, it can obtain the newObj and oldObj objects through the event handler, and use the newObj and oldObj objects to modify the product configuration file. It can also obtain the corresponding modification information and record it in the status database.

[0179] Similarly, in one embodiment, if the real-time computing service of the product instance on the primary region cluster detects an update event of the product configuration file on the backup region cluster, it can obtain the newObj and oldObj objects through the event handler and use them to modify the product configuration file. It can also obtain the corresponding modification information and record it in the status database.

[0180] In one implementation, the aforementioned monitoring function for configuration changes in product configuration files can be integrated into a status processing unit, which can be called a configuration change monitoring unit. This configuration change monitoring unit can monitor the configuration modifications of each associated component (such as applications, middleware, etc.) deployed on the regional cluster and record the new and old configuration content each time in the status database.

[0181] Through the aforementioned monitoring of configuration modifications, in product data visualization business scenarios, corresponding modification records can be directly retrieved from the status database, facilitating relevant personnel to trace configuration modification records. In change business scenarios, if it involves comparing the planned configuration with the actual environment configuration (such as product configuration files), and the configuration has been temporarily adjusted in the actual environment, it is also necessary to leverage traceability capabilities to inform relevant personnel where the configuration has been modified, enabling further judgment and adjustments.

[0182] In summary, in this embodiment, closely related data within a product instance can be processed by a single status processing unit. For example, as mentioned earlier, the real-time resource usage calculation unit can be used to statistically summarize the resource usage of applications, middleware, virtual machines, etc., associated with the product; the product health status calculation unit can be used to calculate the product's health status in real time based on the running status of components associated with the product and product status calculation rules; the application status information calculation unit can be used to statistically analyze the status data of applications associated with the product in real time, facilitating queries by upper-layer businesses; the middleware information calculation unit can be used to statistically analyze the status data of middleware associated with the product in real time, facilitating queries by upper-layer businesses; and the configuration change monitoring unit can be used to monitor configuration changes of products (such as applications under the product) in real time and generate comparison records stored in the status database.

[0183] Based on this design concept, the calculation of product status data for product instances is pluggable, configurable, and horizontally scalable. This means that the calculation units used to calculate product status data can be arbitrarily configured. Pluggable means that one or more state processing units can be removed to obtain product status data, or one or more state processing units can be added to obtain product status data. Configurable means that new state processing units can be configured to obtain product status data. Horizontally scalable means that the processing of a single state processing unit can involve more dimensions of data. For example, the middleware status data under a product instance can include the data described above (such as middleware name, middleware type, middleware running status, middleware planning data), and can also include other data.

[0184] S405 stores the product status data of product instances deployed on each regional cluster in the status database.

[0185] In one implementation, when storing product status data of product instances using a status database, the following data storage approach can be adopted. Different methods can be used to store the product status data determined by different status processing units. The following provides a detailed explanation of the storage of different product status data.

[0186] In one embodiment, when storing product status data regarding resource usage, each additional storage of product status data can store the corresponding record identifier, product instance identifier, product number, region identifier, product status data (such as product instance health status, product instance resource usage, etc.), application readiness status, creation time, update time, etc.

[0187] In one embodiment, when storing product status data for applications under a product instance, each additional storage of application status data can store the corresponding record identifier, application instance identifier, application instance name, application instance running status, application instance running version, product instance identifier, product number, creation time, update time, etc.

[0188] In one embodiment, when storing change records for product configuration files, each additional storage record for a configuration change record can store the corresponding record identifier, product configuration file content, K8s resource type to which the product configuration file belongs, application instance identifier, application instance name, application instance running version, update time, etc.

[0189] S406 If a query request for product status data of a specified product instance is obtained, the system responds to the query request by retrieving the requested product status data from the status database.

[0190] The specific implementation of steps S405 and S406 can be referred to the descriptions in steps S204 and S205 above, and will not be repeated here.

[0191] In this embodiment, cloud-native capabilities can be used to uniformly manage products deployed across multiple regional clusters and monitor product instances deployed across multiple regional clusters in real time. The component status data of associated components of a product instance can be processed using one or more data processing methods to obtain corresponding product status data. Furthermore, a specific implementation of a data processing method can be integrated into the processing of a single status processing unit; that is, the controller can call one or more status processing units to perform calculations and obtain the product status data of the corresponding product instance. By utilizing the parallel processing of one or more status processing units, data processing efficiency can be effectively improved. Moreover, by synchronizing the determined product status data to the status database in real time, a data source can be provided for subsequent business layers. When retrieving data from the status database, it can be obtained in one go, without the need for assembly or multiple interface calls. Only a unified query interface is needed to directly obtain all the product's status data, thereby effectively improving data query efficiency.

[0192] Based on the description of the above data processing method embodiments, this application also discloses a data processing apparatus, which can be a computer program (including program code) running on the aforementioned electronic device. This data processing apparatus can execute... Figure 2 or Figure 4 The method shown. Please refer to [link / reference]. Figure 6 The data processing device can operate the following units:

[0193] The acquisition unit 601 is used to acquire component status data of the associated components of the product instances deployed on each regional cluster in one or more regional clusters.

[0194] The determining unit 602 is used to determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and to determine the data processing method corresponding to the one or more data types respectively.

[0195] Processing unit 603 is used to process the status data of the associated components of the product instance deployed on each regional cluster according to the data processing methods corresponding to the one or more data types, so as to obtain the product status data of the product instance deployed on each regional cluster.

[0196] Storage unit 604 is used to store the product status data of the product instances deployed on each regional cluster in the status database;

[0197] The query unit 605 is used to retrieve the requested product status data from the status database in response to the query request if a query request for product status data of a specified product instance is obtained.

[0198] In one implementation, the acquisition unit 601 is specifically used for:

[0199] Obtain access links to each regional cluster in one or more regional clusters; the access link for any regional cluster is created after configuring the management permissions for that regional cluster.

[0200] Based on the access links of each regional cluster, obtain the component status data of the associated components of the product instances deployed on the corresponding regional clusters.

[0201] In one implementation, the acquisition unit 601 is specifically used for:

[0202] If a target operation targeting component state data is detected in the target product instance, the step of obtaining the component state data of the associated components of the target product instance is triggered; the target operation includes any one or more of the following: modification operation, deletion operation, and addition operation; or,

[0203] If the current time is detected to be the preset acquisition time, the step of acquiring the component status data of the associated components associated with the target product instance is triggered.

[0204] The target product instance is any one of the product instances deployed on each of the regional clusters.

[0205] In one implementation, the preset acquisition time is a time within the data acquisition cycle of the target product instance, and the data acquisition cycle indicates the time interval for acquiring component status data of associated components related to the target product instance; the acquisition unit 601 is further configured to:

[0206] Retrieve multiple historical query requests within a historical time period; each of the multiple historical query requests includes an instance identifier used to indicate a product instance;

[0207] Count the number of each instance identifier among all instance identifiers included in the multiple historical query requests;

[0208] Based on the number of identifiers for each instance, the data acquisition cycle for each product instance deployed on each regional cluster is determined.

[0209] In one implementation, the one or more data types include a first data type for resource usage, and the data processing method corresponding to the first data type is a first data processing method for processing the resource usage of product instances; the processing unit 603 is specifically used for:

[0210] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the resource usage data of each associated component in all associated components under the product instance; the target region cluster is any one of the one or more region clusters, and any associated component is any one of the application, middleware, and virtual machine under the product instance;

[0211] Based on the resource usage data of each associated component, the resource usage data of the product instance is determined, and the resource usage data of the product instance is used as the product status data of the product instance deployed on the target area cluster regarding resource usage.

[0212] In one implementation, the one or more data types are second data types related to the component's running state, and the data processing method corresponding to the second data type is a second data processing method for processing the running health status of the product instance; the processing unit 603 is specifically used for:

[0213] The component running status of each associated component under all associated components of the product instance is obtained from the component status data of the associated components of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters;

[0214] Obtain the reference components to be deployed under the product instance;

[0215] If all associated components under the product instance are consistent with the reference component to be deployed, and the ratio between the number of the first component of the associated component with a healthy running status and the number of the second component of all associated components is greater than or equal to a preset ratio, then the running status of the product instance is determined to be healthy.

[0216] The running status of the product instance is used as product status data for the operational health of the product instance deployed on the target region cluster.

[0217] In one implementation, the one or more data types are a third data type for the state data of the associated component of the application, and the data processing method corresponding to the third data type is a third data processing method that statistically analyzes the state data of the application under the product instance; the processing unit 603 is specifically used for:

[0218] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each application in all applications under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any application includes one or more of the following: application name, application running status, application version, and application version update time.

[0219] Based on the status data of each application in all applications under the product instance, count the number of first applications and the number of second applications whose application running status is healthy under the product instance.

[0220] The first number of applications, the second number of applications, and the status data of each application are used as the product status data for the application status data of the product instance deployed on the target area cluster.

[0221] In one implementation, the one or more data types are a fourth data type for the state data of the associated component being middleware, and the data processing method corresponding to the fourth data type is a fourth data processing method that statistically analyzes the state data of the middleware under the product instance; the processing unit 603 is specifically used for:

[0222] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each middleware in all middleware under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any middleware includes one or more of the following: middleware name, middleware type, middleware running status and middleware planning data, and the middleware planning data is the resource usage data configured for any middleware.

[0223] The status data of each middleware is used as the product status data of the middleware for the product instance deployed on the target region cluster.

[0224] In one implementation, the processing unit 603 is further configured to:

[0225] If an update event of the product configuration file of a product instance deployed on the target region cluster is detected, the update time that generated the update event is obtained; the product configuration file includes the configuration information of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters;

[0226] Get the product configuration file before the update and the product configuration file after the update;

[0227] The update time, the product configuration file before the update, and the product configuration file after the update are stored in the status database.

[0228] It is understood that the division of units in this embodiment is illustrative and merely a logical functional division; in actual implementation, there may be other division methods. The functional units in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.

[0229] Please see Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device described in this embodiment includes: a processor 701, a memory 702, and a network interface 703. The processor 701, the memory 702, and the network interface 703 can exchange data.

[0230] The processor 701 described above can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0231] The aforementioned memory 702 may include read-only memory and random access memory, and provides program instructions and data to the processor 701. A portion of memory 702 may also include non-volatile random access memory. The processor 701 executes the program instructions by calling them.

[0232] Retrieve component status data of the associated components of the product instances deployed on each of one or more regional clusters;

[0233] Determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and determine the data processing method corresponding to each of the one or more data types;

[0234] Based on the data processing methods corresponding to the one or more data types, the status data of the associated components of the product instances deployed on each regional cluster is processed according to the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster.

[0235] The product status data of the product instances deployed on each regional cluster is stored in the status database;

[0236] If a query request for product status data of a specified product instance is obtained, the system will respond to the query request by searching the status database for the requested product status data.

[0237] In one implementation, the processor 701 is specifically used for:

[0238] Obtain access links to each regional cluster in one or more regional clusters; the access link for any regional cluster is created after configuring the management permissions for that regional cluster.

[0239] Based on the access links of each regional cluster, obtain the component status data of the associated components of the product instances deployed on the corresponding regional clusters.

[0240] In one implementation, the processor 701 is specifically used for:

[0241] If a target operation targeting component state data is detected in the target product instance, the step of obtaining the component state data of the associated components of the target product instance is triggered; the target operation includes any one or more of the following: modification operation, deletion operation, and addition operation; or,

[0242] If the current time is detected to be the preset acquisition time, the step of acquiring the component status data of the associated components associated with the target product instance is triggered.

[0243] The target product instance is any one of the product instances deployed on each of the regional clusters.

[0244] In one implementation, the preset acquisition time is a time within the data acquisition cycle of the target product instance, wherein the data acquisition cycle indicates the time interval for acquiring component status data of associated components related to the target product instance; the processor 701 is further configured to:

[0245] Retrieve multiple historical query requests within a historical time period; each of the multiple historical query requests includes an instance identifier used to indicate a product instance;

[0246] Count the number of each instance identifier among all instance identifiers included in the multiple historical query requests;

[0247] Based on the number of identifiers for each instance, the data acquisition cycle for each product instance deployed on each regional cluster is determined.

[0248] In one implementation, the one or more data types include a first data type for resource consumption, and the data processing method corresponding to the first data type is a first data processing method for processing the resource consumption of product instances; the processor 701 is specifically used for:

[0249] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the resource usage data of each associated component in all associated components under the product instance; the target region cluster is any one of the one or more region clusters, and any associated component is any one of the application, middleware, and virtual machine under the product instance;

[0250] Based on the resource usage data of each associated component, the resource usage data of the product instance is determined, and the resource usage data of the product instance is used as the product status data of the product instance deployed on the target area cluster regarding resource usage.

[0251] In one implementation, the one or more data types are second data types related to the component's running state, and the data processing method corresponding to the second data type is a second data processing method for processing the running health status of the product instance; the processor 701 is specifically used for:

[0252] The component running status of each associated component under all associated components of the product instance is obtained from the component status data of the associated components of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters;

[0253] Obtain the reference components to be deployed under the product instance;

[0254] If all associated components under the product instance are consistent with the reference component to be deployed, and the ratio between the number of the first component of the associated component with a healthy running status and the number of the second component of all associated components is greater than or equal to a preset ratio, then the running status of the product instance is determined to be healthy.

[0255] The running status of the product instance is used as product status data for the operational health of the product instance deployed on the target region cluster.

[0256] In one implementation, the one or more data types are a third data type for the state data of the associated component of the application, and the data processing method corresponding to the third data type is a third data processing method that performs statistics on the state data of the application under the product instance; the processor 701 is specifically used for:

[0257] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each application in all applications under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any application includes one or more of the following: application name, application running status, application version, and application version update time.

[0258] Based on the status data of each application in all applications under the product instance, count the number of first applications and the number of second applications whose application running status is healthy under the product instance.

[0259] The first number of applications, the second number of applications, and the status data of each application are used as the product status data for the application status data of the product instance deployed on the target area cluster.

[0260] In one implementation, the one or more data types are a fourth data type for the state data of the associated component being middleware, and the data processing method corresponding to the fourth data type is a fourth data processing method that statistically analyzes the state data of the middleware under the product instance; the processor 701 is specifically used for:

[0261] From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each middleware in all middleware under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any middleware includes one or more of the following: middleware name, middleware type, middleware running status and middleware planning data, and the middleware planning data is the resource usage data configured for any middleware.

[0262] The status data of each middleware is used as the product status data of the middleware for the product instance deployed on the target region cluster.

[0263] In one implementation, the processor 701 is further configured to:

[0264] If an update event of the product configuration file of a product instance deployed on the target region cluster is detected, the update time that generated the update event is obtained; the product configuration file includes the configuration information of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters;

[0265] Get the product configuration file before the update and the product configuration file after the update;

[0266] The update time, the product configuration file before the update, and the product configuration file after the update are stored in the status database.

[0267] This application also provides a computer storage medium storing program instructions, which, when executed, may include, for example... Figure 2 or Figure 4 Some or all of the steps of the data processing method in the corresponding embodiments.

[0268] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0269] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0270] This application also provides a computer program product or computer program, which includes program instructions stored in a computer-readable storage medium. A processor of an electronic device reads the program instructions from the computer-readable storage medium and executes the program instructions, causing the electronic device to perform the steps described in the embodiments of the above methods.

[0271] The above provides a detailed description of a data processing method, apparatus, electronic device, medium, and program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized by, The method includes: Retrieve component status data of the associated components of the product instances deployed on each of one or more regional clusters; Determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and determine the data processing method corresponding to each of the one or more data types; Based on the data processing methods corresponding to the one or more data types, the status data under the corresponding data type in the component status data of the associated components of the product instance deployed on each regional cluster is processed to obtain the product status data of the product instance deployed on each regional cluster; wherein, if the one or more data types include a first data type for resource consumption, the processing method includes: obtaining the resource consumption data of each associated component in all associated components under the product instance from the component status data of the associated components of the product instance deployed on the target regional cluster; the target regional cluster is any one of the one or more regional clusters, and any associated component is any one of the application, middleware, and virtual machine under the product instance; based on the resource consumption data of each associated component, the resource consumption data of the product instance is determined, and the resource consumption data of the product instance is used as the product status data of the product instance deployed on the target regional cluster for resource consumption; The product status data of the product instances deployed on each regional cluster is stored in the status database; If a query request for product status data of a specified product instance is obtained, the system will respond to the query request by searching the status database for the requested product status data.

2. The method according to claim 1, characterized in that, The step of obtaining component status data of associated components related to product instances deployed on each of one or more regional clusters includes: Obtain access links to each regional cluster in one or more regional clusters; the access link for any regional cluster is created after configuring the management permissions for that regional cluster. Based on the access links of each regional cluster, obtain the component status data of the associated components of the product instances deployed on the corresponding regional clusters.

3. The method according to claim 1, characterized in that, The step of obtaining component status data of associated components related to product instances deployed on each of one or more regional clusters includes: If a target operation targeting component state data is detected in the target product instance, the step of obtaining the component state data of the associated components of the target product instance is triggered; the target operation includes any one or more of the following: modification operation, deletion operation, and addition operation; or, If the current time is detected to be the preset acquisition time, the step of acquiring the component status data of the associated components associated with the target product instance is triggered. The target product instance is any one of the product instances deployed on each of the regional clusters.

4. The method according to claim 3, characterized in that, The preset acquisition time is a time within the data acquisition cycle of the target product instance, and the data acquisition cycle is used to indicate the time interval for acquiring component status data of the associated components of the target product instance; it also includes: Retrieve multiple historical query requests within a historical time period; each of the multiple historical query requests includes an instance identifier used to indicate a product instance; Count the number of each instance identifier among all instance identifiers included in the multiple historical query requests; Based on the number of identifiers for each instance, the data acquisition cycle for each product instance deployed on each regional cluster is determined.

5. The method according to any one of claims 1-4, characterized in that, The one or more data types include a second data type for the component's running status, and the data processing method corresponding to the second data type is a second data processing method for processing the running health status of the product instance; The process, based on the data processing methods corresponding to the one or more data types, processes the status data of the associated components of the product instances deployed on each regional cluster under the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster, including: The component running status of each associated component under all associated components of the product instance is obtained from the component status data of the associated components of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters. Obtain the reference components to be deployed under the product instance; If all associated components under the product instance are consistent with the reference component to be deployed, and the ratio between the number of first components of the associated components whose running status is healthy and the number of second components of all associated components is greater than or equal to a preset ratio, then the running status of the product instance is determined to be healthy. The running status of the product instance is used as product status data for the operational health of the product instance deployed on the target region cluster.

6. The method according to any one of claims 1-4, characterized in that, The one or more data types include a third data type for the status data of the associated component of the application, and the data processing method corresponding to the third data type is a third data processing method that performs statistics on the status data of the application under the product instance. The process, based on the data processing methods corresponding to the one or more data types, processes the status data of the associated components of the product instances deployed on each regional cluster under the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster, including: From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each application in all applications under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any application includes one or more of the following: application name, application running status, application version, and application version update time. Based on the status data of each application in all applications under the product instance, the number of first applications and the number of second applications whose application running status is healthy are counted for all applications under the product instance. The first number of applications, the second number of applications, and the status data of each application are used as the product status data for the application status data of the product instance deployed on the target area cluster.

7. The method according to any one of claims 1-4, characterized in that, The one or more data types include a fourth data type for the status data of the associated component being middleware, and the data processing method corresponding to the fourth data type is a fourth data processing method that statistically analyzes the status data of the middleware under the product instance; The process, based on the data processing methods corresponding to the one or more data types, processes the status data of the associated components of the product instances deployed on each regional cluster under the corresponding data type to obtain the product status data of the product instances deployed on each regional cluster, including: From the component status data of the associated components of the product instance deployed on the target region cluster, obtain the status data of each middleware in all middleware under the product instance; the target region cluster is any one of the one or more region clusters, and the status data of any middleware includes one or more of the following: middleware name, middleware type, middleware running status and middleware planning data, and the middleware planning data is the resource usage data configured for any middleware. The status data of each middleware is used as the product status data of the middleware for the product instance deployed on the target region cluster.

8. The method according to any one of claims 1-4, characterized in that, The method further includes: If an update event of the product configuration file of a product instance deployed on the target region cluster is detected, the update time that generated the update event is obtained; the product configuration file includes the configuration information of the product instance deployed on the target region cluster; the target region cluster is any one of the one or more region clusters; Get the product configuration file before the update and the product configuration file after the update; The update time, the product configuration file before the update, and the product configuration file after the update are stored in the status database.

9. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire component status data of the associated components of the product instances deployed on each regional cluster in one or more regional clusters. The determining unit is used to determine one or more data types of component status data associated with the product instance deployed on each regional cluster, and to determine the data processing method corresponding to each of the one or more data types. The processing unit is configured to process the status data of the associated components of the product instance deployed on each regional cluster according to the data processing methods corresponding to the one or more data types, thereby obtaining the product status data of the product instance deployed on each regional cluster; wherein, if the one or more data types include a first data type for resource occupancy, the processing method includes: obtaining the resource occupancy data of each associated component among all associated components under the product instance from the component status data of the associated components of the product instance deployed on the target regional cluster; the target regional cluster is any one of the one or more regional clusters, and any associated component is any one of the application, middleware, and virtual machine under the product instance; based on the resource occupancy data of each associated component, determining the resource occupancy data of the product instance, and using the resource occupancy data of the product instance as the product status data of the product instance deployed on the target regional cluster for resource occupancy; A storage unit is used to store the product status data of product instances deployed on each regional cluster in a status database. The query unit is used to, in response to a query request for product status data of a specified product instance, retrieve the requested product status data from the status database.

10. An electronic device, characterized in that, The system includes a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed, implement the method as described in any one of claims 1-8.

12. A computer program product comprising program instructions that, when executed by a processor, are used to implement the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Life cycle management methods of distributed applications, managers, equipment and mediums

    CN108595316A

  • Communication method, device and system

    CN110463141A