Data processing method and device for application cluster, electronic equipment and storage medium

By acquiring and standardizing the resource data of multiple types of registry centers, determining the correspondence between services and clusters, the problem of inconsistent registry API specifications in the prior art is solved, and an automated service status abnormality detection mechanism is realized, which improves detection efficiency and accuracy.

CN119597615APending Publication Date: 2025-03-11CHINA TOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411535319.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The API specifications of different types of registry centers in existing application clusters are not unified, which leads to special adaptation of operation and maintenance personnel when configuring the service status abnormality detection mechanism, which increases the workload and difficulty.

Method used

A data processing method and device are provided, which can obtain resource data of various types of registration centers, perform standardized processing, and determine the correspondence between the service and the cluster based on standardized data, thereby building a service status abnormality detection mechanism.

Benefits of technology

It realizes the corresponding relationship between the service and the cluster, reduces the difficulty and quantity of operation and maintenance personnel, and improves the efficiency and accuracy of service status abnormality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597615A_ABST
    Figure CN119597615A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device for an application cluster, equipment and a computer program product. The method comprises the following steps: acquiring resource data of various types of registration centers; and carrying out standardization processing on the resource data of the multiple types of registration centers. And determining services in the application cluster and clusters corresponding to the services based on the standardized resource data of the various types of registration centers. And constructing a service state anomaly detection mechanism according to the determined service and the cluster corresponding to the service. According to the application, the corresponding relationship between the service and the cluster can be automatically sorted for application clusters of various types of registration centers, so that operation and maintenance personnel are assisted to construct a service state anomaly detection mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, equipment and computer program product for an application cluster. Background Art

[0002] An application cluster is an application system that connects multiple physically independent computers through a network and is composed of specific hardware and software to provide functions such as high availability, load balancing, and fault recovery. Each computer detects the status of other computers through heartbeat signals. Once a computer fails, the application on it will automatically switch to other computers to continue running, thereby ensuring the high availability and stability of the entire business system.

[0003] Application clusters involve multiple services, which need to be registered through the application registration center. In layman's terms, the registration center provides registration, creation and discovery for services in the application cluster. At present, most application clusters are configured with different types of registration centers, which do not use a unified specification to provide API (Application Programming Interface). This results in the need for special adaptation when any microservice RPC (Remote Procedure Call) framework uses a certain type of registration center.

[0004] When performing anomaly detection on the services of an application cluster, it is necessary to sort out the correspondence between the services and the clusters in order to configure the relevant service status anomaly mechanism. This requires operation and maintenance personnel to retrieve the resource data of these registration centers for query and analysis. However, the API specifications of these registration centers are different, which not only requires a large workload but also has high difficulty. Summary of the invention

[0005] The purpose of this application is to provide a method, device, equipment and computer program product for judging illegal web pages, which can automatically sort out the correspondence between services and clusters for application clusters of various types of registration centers, thereby assisting operation and maintenance personnel in building a service status anomaly detection mechanism.

[0006] In order to achieve the above purpose, the embodiment of the present application is implemented as follows: In a first aspect, a data processing method for an application cluster is provided, wherein the application cluster is provided with multiple types of registration centers, and the method comprises: Acquire resource data of the multiple types of registration centers; Standardizing resource data of the multiple types of registration centers; Determine the services in the application cluster and the clusters corresponding to the services based on the standardized resource data of the multiple types of registration centers; A service status anomaly detection mechanism is constructed according to the determined services and the clusters corresponding to the services.

[0007] In a second aspect, a data processing device for an application cluster is provided, wherein the application cluster is provided with multiple types of registration centers, and the device includes: A resource data acquisition module, which acquires resource data of the multiple types of registration centers; A resource data standardization module, which performs standardization processing on the resource data of the multiple types of registration centers; A relationship combing module, which determines the services in the application cluster and the clusters corresponding to the services based on the standardized resource data of the multiple types of registration centers; The detection mechanism building module builds a service status anomaly detection mechanism according to the determined service and the cluster corresponding to the service.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the method described in the first aspect.

[0009] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the method described in the first aspect when executed by a processor.

[0010] The embodiment of the present application obtains resource data of various types of registration centers in an application cluster to standardize the resource data; then, based on the standardized resource data of various types of registration centers, the services in the application cluster and the clusters corresponding to the services are analyzed and determined to sort out the relationship between the services and the clusters, thereby assisting operation and maintenance personnel in building a suitable service status anomaly detection mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 This is a schematic diagram of a first flow chart of a data processing method for an application cluster according to an embodiment of the present application.

[0013] Figure 2 This is a second flow chart of the data processing method for application clusters according to an embodiment of the present application.

[0014] Figure 3 It is a structural diagram of a data processing device for application clusters according to an embodiment of the present application.

[0015] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] As mentioned above, when performing service anomaly detection on application clusters of multiple types of registry centers, it is necessary to sort out the correspondence between services and clusters in order to configure the relevant service status anomaly mechanism. Different types of registry centers have different API specifications. If the operation and maintenance personnel manually retrieve the resource data of these registry centers for query and analysis, not only will the workload be large, but the work will also be difficult.

[0017] To this end, this application aims to propose a data processing solution for application clusters, which can obtain resource data of various types of registration centers in the application cluster to standardize the resource data; then, based on the resource data of various types of registration centers after standardization, analyze and determine the services in the application cluster and the clusters corresponding to the services, so as to sort out the relationship between the services and the clusters, thereby assisting operation and maintenance personnel to build a suitable service status anomaly detection mechanism.

[0018] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0019] An embodiment of the present application provides a data processing method for an application cluster (registration centers of various types). Figure 1 It is a flow chart of the data processing method, which includes the following steps: S102, obtaining resource data of various types of registration centers; In this embodiment, the resource data of the registration center, namely the services, applications, implementation object, etc. registered with the registration center, are used to determine the relevant information of the services in the application cluster and the clusters corresponding to the services.

[0020] As an exemplary introduction, the types of registration centers commonly used in application clusters may include: Eureka type, Consul type, and Nacos type.

[0021] This embodiment is aimed at different types of registration centers to perform unified adaptation of the calling interface, thereby achieving: 1) Call the / eureka / apps / interface of the Eureka type registry to obtain the resource data of the Eureka type registry.

[0022] 2) Call the / v1 / agent / services interface of the Consul type registry to obtain the resource data of the Consul type registry.

[0023] 3) Call the / nacos / v1 / console / namespaces interface of the Nacos type registry to obtain the resource data of the Nacos type registry.

[0024] S104, standardizing resource data of various types of registration centers.

[0025] As mentioned above, different types of registries have different API specifications, so the corresponding resource data fed back also uses different languages. Therefore, the resource data of these registries need to be standardized.

[0026] Specifically, this embodiment can set information items for sorting out the correspondence between services and clusters based on each type of registration center, as well as a standardized method of converting these information items into a unified expression, so as to extract information from resource data according to the information items and perform standardized processing according to the standardized method corresponding to the information items.

[0027] S106: Determine services in the application cluster and clusters corresponding to the services based on the standardized resource data of various types of registration centers.

[0028] As an example introduction: For a Eureka-type registration center, the resource data of the Eureka-type registration center includes microservices registered by the Eureka-type registration center and instance objects of the microservices; this embodiment can determine the microservices registered by the Eureka-type registration center as clusters in an application cluster, and determine the instance objects of the microservices as services corresponding to the cluster in the application cluster.

[0029] For a Consul-type registry, the resource data of the Consul-type registry includes applications registered with the Consul-type registry and application objects of the applications; this embodiment can determine the applications registered with the Consul-type registry as clusters in an application cluster, and determine the application objects of the applications as services in the application cluster corresponding to the cluster.

[0030] For a Nacos-type registration center, the resource data of the Nacos-type registration center includes application services registered by the Nacos-type registration center and instance objects of application services; in this embodiment, the application services registered by the Nacos-type registration center can be defined as clusters in an application cluster, and the instance objects of application services can be determined as services corresponding to the cluster in the application cluster.

[0031] S108: Building a service status anomaly detection mechanism according to the determined services and the clusters corresponding to the services.

[0032] It should be understood that only when the corresponding relationship between services and clusters is correctly found can a suitable service status anomaly detection mechanism be configured. For example, if an incorrect cluster is determined for a microservice, when the status anomaly detection machine is performed on the microservice, the cluster data detected is from other services, which results in the loss of semantics for the anomaly detection of the microservice.

[0033] In practical applications, assuming that the application cluster is set with Eureka type, Consul type and Nacos type registration center, the specific process of the method in this embodiment is as follows Figure 2 As shown, first, through the unified adaptation collection thread, by issuing getServiceInfo(), the / eureka / apps / interface of the Eureka type registry, the / v1 / agent / services interface of the Consul type registry, and the / nacos / v1 / console / namespaces interface of the Nacos type registry are called to obtain resource data. Then, the resource data of each type of registry is standardized to analyze the correspondence between services and clusters. The specific analysis process is as follows: 1. Eureka resource data analysis 1) Traverse the application object from the Document 2) Get the registered microservice. There may be multiple instances of the same microservice. If the number of instances is 0, the application status is determined to be abnormal.

[0034] 3) Traverse the instance object and obtain the instance id, instance ip, port, and status.

[0035] 4) Understand the above microservices as application clusters and instances as application services, so that the relationship between application clusters and application services can be established.

[0036] 2. Consul resource data analysis 1) Traverse the application object from Data.

[0037] 2) Traverse the registered application data to obtain the name and status of the application; encapsulate it into the concept of application cluster.

[0038] 3) Encapsulate the IP and port obtained from the application into an application service object, and call the / v1 / agent / checks interface to obtain the activity status.

[0039] 4) Encapsulate the application service object into the application cluster, thus establishing the relationship between the application cluster and the application service.

[0040] 3. Nacos resource data analysis 1) Get all namespace data and loop through the namespace to get the services corresponding to the namespace.

[0041] 2) Call the / nacos / v1 / ns / catalog / services?namespaceId=xx interface to obtain the service set.

[0042] 3) Encapsulate the cluster. If the number of healthy instances is equal to the number of normal instances, the cluster is considered normal.

[0043] 4) Call the / nacos / v1 / ns / catalog / instances?serviceName=xx interface to obtain the instance object and encapsulate the instance as an application service.

[0044] 5) Encapsulate the application service object into the application cluster, thus establishing the relationship between the application cluster and the application service.

[0045] In addition, corresponding to Figure 1 The method shown, another embodiment of this embodiment also provides a data processing device for application clusters (registration centers of various types). Figure 3 3 is a schematic diagram of the structure of the data processing device 300, comprising: The resource data acquisition module 310 acquires the resource data of the multiple types of registration centers.

[0046] A resource data standardization module 320 performs standardization processing on the resource data of the multiple types of registration centers; The relationship combing module 330 determines the services in the application cluster and the clusters corresponding to the services based on the standardized resource data of the multiple types of registration centers.

[0047] The detection mechanism building module 340 builds a service status anomaly detection mechanism according to the determined service and the cluster corresponding to the service.

[0048] Optionally, the resource data of the Eureka-type registry includes the microservices registered by the Eureka-type registry and the instance objects of the microservices; the resource data standardization module 320 determines the services in the application cluster and the clusters corresponding to the services, including: determining the microservices registered by the Eureka-type registry as the clusters in the application cluster, and determining the instance objects of the microservices as the services corresponding to the clusters in the application cluster. The resource data acquisition module 310 acquires the resource data of the multiple types of registries, including: calling the / eureka / apps / interface of the Eureka-type registry to acquire the resource data of the Eureka-type registry.

[0049] Optionally, the multiple types of registries include a Consul type registry; the resource data of the Consul type registry includes applications registered with the Consul type registry and application objects of the applications; the resource data standardization module 320 determines the services in the application cluster and the clusters corresponding to the services, including: determining the applications registered with the Consul type registry as clusters in the application cluster, and determining the application objects of the applications as services corresponding to the clusters in the application cluster. The resource data acquisition module 310 acquires the resource data of the multiple types of registries, including: calling the / v1 / agent / services interface of the Consul type registry to acquire the resource data of the Consul type registry.

[0050] Optionally, the multiple types of registration centers include a Nacos type registration center; the resource data of the Nacos type registration center includes the application services registered by the Nacos type registration center and the instance objects of the application services; the resource data standardization module 320 determines the services in the application cluster and the clusters corresponding to the services, including: defining the application services registered by the Nacos type registration center as the clusters in the application cluster, and determining the instance objects of the application services as the services corresponding to the clusters in the application cluster. The resource data acquisition module 310 acquires the resource data of the multiple types of registration centers, including: calling the / nacos / v1 / console / namespaces interface of the Nacos type registration center to acquire the resource data of the Nacos type registration center.

[0051] It should be noted that the data processing device of this embodiment can be used as Figure 1 The execution subject of the method shown can thus realize Figure 1 The steps and functions in the method shown.

[0052] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0053] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0054] The memory is used to store the computer program. Specifically, the computer program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides the computer program to the processor.

[0055] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming the above-mentioned Figure 3 The data processing device shown. Correspondingly, the processor executes the program stored in the memory and is specifically used to perform the following operations: The resource data of the multiple types of registration centers are obtained.

[0056] The resource data of the multiple types of registration centers are standardized.

[0057] Based on the standardized resource data of the multiple types of registration centers, services in the application cluster and clusters corresponding to the services are determined.

[0058] A service status anomaly detection mechanism is constructed according to the determined services and the clusters corresponding to the services.

[0059] The above is as in this manual Figure 1The data processing method for application clusters disclosed in the illustrated embodiment can be applied to a processor and implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0060] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0061] In addition, an embodiment of the present application also proposes a computer-readable storage medium, which stores one or more computer programs, and the one or more computer programs include instructions.

[0062] When the above instructions are executed by a portable electronic device including multiple application programs, the portable electronic device can execute Figure 1 The steps in the method shown include: The resource data of the multiple types of registration centers are obtained.

[0063] The resource data of the multiple types of registration centers are standardized.

[0064] Based on the standardized resource data of the multiple types of registration centers, services in the application cluster and clusters corresponding to the services are determined.

[0065] A service status anomaly detection mechanism is constructed according to the determined services and the clusters corresponding to the services.

[0066] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0067] The above are only embodiments of this specification and are not intended to limit this specification. For those skilled in the art, this specification may be subject to various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims of this specification. In addition, all other embodiments obtained by ordinary technicians in this field without creative work shall fall within the scope of protection of this document.

Claims

1. A data processing method for an application cluster, wherein the application cluster is provided with multiple types of registration centers, characterized in that: The method comprises: Acquire resource data of the multiple types of registration centers; Standardizing resource data of the multiple types of registration centers; Determine the services in the application cluster and the clusters corresponding to the services based on the standardized resource data of the multiple types of registration centers; A service status anomaly detection mechanism is constructed according to the determined services and the clusters corresponding to the services.

2. The method according to claim 1, characterized in that: The multiple types of registration centers include a Eureka type registration center; The resource data of the Eureka-type registration center includes the microservices registered by the Eureka-type registration center and the instance objects of the microservices; Determining the services in the application cluster and the clusters corresponding to the services includes: The microservice registered with the Eureka type registration center is determined as a cluster in the application cluster, and the instance object of the microservice is determined as a service corresponding to the cluster in the application cluster.

3. The method according to claim 2, characterized in that Obtain resource data of the multiple types of registration centers, including: Call the / eureka / apps / interface of the Eureka type registry to obtain the resource data of the Eureka type registry.

4. The method according to claim 1, characterized in that: The multiple types of registration centers include a Consul type registration center; The resource data of the Consul-type registry includes applications registered by the Consul-type registry and application objects of the applications; Determining the services in the application cluster and the clusters corresponding to the services includes: The application registered in the Consul type registry is determined as a cluster in the application cluster, and the application object of the application is determined as a service in the application cluster corresponding to the cluster.

5. The method according to claim 4, characterized in that Obtain resource data of the multiple types of registration centers, including: Call the / v1 / agent / services interface of the Consul type registry to obtain the resource data of the Consul type registry.

6. The method according to claim 1, characterized in that The multiple types of registration centers include a Nacos type registration center; The resource data of the Nacos type registration center includes the application services registered by the Nacos type registration center and the instance objects of the application services; Determining the services in the application cluster and the clusters corresponding to the services includes: The application service registered by the Nacos type registration center is defined as a cluster in the application cluster, and the instance object of the application service is determined as a service corresponding to the cluster in the application cluster.

7. The method according to claim 6, characterized in that Obtain resource data of the multiple types of registration centers, including: Call the / nacos / v1 / console / namespaces interface of the Nacos type registry to obtain the resource data of the Nacos type registry.

8. A data processing device for an application cluster, wherein the application cluster is provided with multiple types of registration centers, characterized in that: The device comprises: A resource data acquisition module, which acquires resource data of the multiple types of registration centers; A resource data standardization module, which performs standardization processing on the resource data of the multiple types of registration centers; A relationship combing module, which determines the services in the application cluster and the clusters corresponding to the services based on the standardized resource data of the multiple types of registration centers; The detection mechanism building module builds a service status anomaly detection mechanism according to the determined service and the cluster corresponding to the service.

9. An electronic device, comprising: processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer-readable storage medium storing a computer program, characterized in that: The computer program is operable to cause a computer to perform the method according to any one of claims 1 to 7.