A method and device for associating application services with middleware and updating association results

By automatically acquiring and synchronizing application service and middleware information from the Apollo configuration center to the CMDB, the lag problem of configuration information management under the microservice architecture is solved, the real-time and accuracy of CMDB data is improved, and the efficiency of IT service management is enhanced.

CN119440586BActive Publication Date: 2025-09-23E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411625087.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-09-23
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Existing technologies make it difficult to automatically and in real time manage the relationship between configuration information, business services, and middleware under a microservices architecture, resulting in delayed or inaccurate CMDB data, affecting the reliability and maintainability of IT services.

Method used

By obtaining the application service ID and IP address of the Apollo configuration center, resolving the middleware domain name and synchronizing it with the CMDB, automated configuration information association and synchronization is achieved, including system scanning, DNS resolution, and CMDB interface query, reducing manual operations.

Benefits of technology

It realizes the automatic acquisition and synchronization of configuration information, improves work efficiency, ensures the real-time and accuracy of CMDB data, and supports the efficient operation of IT service management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440586B_ABST
    Figure CN119440586B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for associating application services with middleware and updating the association results, belonging to the field of application service technology. The method comprises: obtaining the IP addresses corresponding to all application service IDs in the Apollo configuration center; obtaining the names corresponding to the IP addresses; associating and storing an information table corresponding to the IDs and names in a database; obtaining configuration data based on the IDs; filtering out the middleware domain names from the configuration data; obtaining the IP addresses corresponding to the middleware domain names; associating and storing an information table corresponding to the IDs, names, and IP addresses corresponding to the middleware domain names in a database; requesting a CMDB interface to query middleware host information based on the IP addresses corresponding to the middleware domain names; returning the middleware host information if the CMDB contains an IP address corresponding to the middleware domain name; and associating and storing an information table corresponding to the IDs, names, IP addresses corresponding to the middleware domain names, and middleware host information in a database. The present invention not only reduces manual operations but also improves work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of application services, and in particular relates to a method and device for associating application services with middleware and updating the association results. Background Art

[0002] With the increasing complexity of enterprise IT architectures and the widespread adoption of microservices and distributed systems, inter-service dependencies have become increasingly complex. In this context, effectively managing and maintaining configuration items and their relationships within IT infrastructure has become a major challenge for enterprises. Apollo, a widely used configuration center, provides strong support for configuration management within microservices architectures. However, Apollo primarily focuses on the centralized storage and distribution of configuration information, but is relatively weak in the automated association and management of configuration information with business services and middleware.

[0003] As a core component of IT service management, the configuration management database (CMDB) stores detailed information on all configuration items and their interrelationships within the IT infrastructure. The accuracy and real-time nature of the CMDB are crucial to ensuring the reliability and maintainability of IT services. However, traditional manual data entry or data synchronization methods based on limited automated tools often struggle to cope with the rapid changes in configuration information within large-scale microservice architectures, resulting in lagging or inaccurate data in the CMDB.

[0004] Therefore, from the perspective of enterprise automation and digital evolution, there is an urgent need for a technical solution that can automatically scan Apollo configuration information, intelligently associate the relationships between business services and middleware, and synchronize these relationships to the CMDB in real time. Such a technical solution can not only significantly improve the efficiency and accuracy of configuration management, but also provide a solid and comprehensive data foundation for subsequent IT service management. Currently, although some tools and platforms have attempted to integrate business service and middleware association information into the CMDB, most of them have the following shortcomings: Low automation: Most solutions still rely on manual entry or simple script execution, which makes it difficult to adapt to the rapid changes in configuration information in the microservice architecture; Incomplete association relationships: Some solutions can only synchronize basic configuration information, ignoring the complex relationships between configuration and business services and middleware; Poor real-time performance: Due to data synchronization delays, the data in the CMDB often cannot promptly reflect the current status of the IT infrastructure. Summary of the Invention

[0005] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a method and device for associating application services with middleware and updating the association results, so as to automatically complete the acquisition, association and synchronization of configuration information, significantly reduce manual operations and improve work efficiency.

[0006] A first aspect of the present invention provides a method for associating an application service with middleware and updating the association result, comprising:

[0007] Get all application service IP addresses corresponding to all application service IDs in the Apollo configuration center;

[0008] Get all application service names corresponding to all application service IPs;

[0009] Associate and store the corresponding information table of all application service IDs and all application service names in the database;

[0010] Get configuration data in JSON or XML format based on all application service IDs;

[0011] Filter out middleware domain names from configuration data;

[0012] Parse the middleware domain name to obtain the IP corresponding to the middleware domain name;

[0013] Associate and store all application service IDs, all application service names, and the IP corresponding information table of middleware domain names in the database;

[0014] Request the CMDB interface to query the middleware host information based on the IP address corresponding to the middleware domain name;

[0015] If there is an IP address corresponding to the middleware domain name in the CMDB, the middleware host information is returned;

[0016] Associate and store the corresponding information table of application service ID, application service name, middleware domain name corresponding IP and middleware host information in the database.

[0017] Furthermore, in the above method of associating application services with middleware and updating the association result, obtaining all application service IP addresses corresponding to all application service IDs in the Apollo configuration center includes:

[0018] The scanning system scans all application service IDs in the Apollo configuration center;

[0019] The Apollo configuration center returns all application service IP addresses corresponding to all application service IDs to the scanning system.

[0020] Furthermore, in the above method of associating application services with middleware and updating the association result, obtaining all application service names corresponding to all application service IPs includes:

[0021] The scanning system scans all application service IPs of the host or host container agent;

[0022] The host or host container agent returns all application service names corresponding to all application service IP addresses to the scanning system.

[0023] Furthermore, in the above method of associating application services with middleware and updating the association result, obtaining configuration data in JSON or XML format according to all application service IDs includes:

[0024] The scanning system scans all application service IDs in the Apollo configuration center;

[0025] The Apollo configuration center returns configuration data in JSON or XML format corresponding to all application service IDs to the scanning system.

[0026] Furthermore, in the above method of associating an application service with a middleware and updating the association result, filtering out the middleware domain name from the configuration data includes:

[0027] Filter out the middleware domain name from the configuration data according to the filtering rules;

[0028] After filtering out the middleware domain name from the configuration data, the method further includes: sending the middleware domain name to a DNS for resolution.

[0029] Furthermore, the above method of associating application services with middleware and updating the association result further includes:

[0030] If the IP address corresponding to the middleware domain name does not exist in the CMDB, add the IP address corresponding to the middleware domain name and the middleware host information to the CMDB.

[0031] Update the IP and middleware host information corresponding to the newly added middleware domain name into the database.

[0032] Furthermore, the above method of associating application services with middleware and updating the association result further includes:

[0033] The monitoring visualization system displays the corresponding information table of application service ID, application service name, IP corresponding to the middleware domain name, and middleware host information.

[0034] A second aspect of the present invention further provides a device for associating an application service with middleware and updating the association result, comprising:

[0035] The first acquisition module is used to obtain all application service IP addresses corresponding to all application service IDs in the Apollo configuration center;

[0036] The second acquisition module is used to obtain all application service names corresponding to all application service IPs;

[0037] The first association storage module is used to associate and store the corresponding information table of all application service IDs and all application service names in the database;

[0038] The third acquisition module is used to obtain configuration data in JSON or XML format according to all application service IDs in the corresponding information table;

[0039] Filtering module: used to filter out middleware domain names from configuration data;

[0040] Parsing module: used to parse the middleware domain name to obtain the IP corresponding to the middleware domain name;

[0041] The second association storage module is used to associate and store the IP corresponding information table of all application service IDs, all application service names and middleware domain names into the database;

[0042] Query module: used to query the middleware host information by requesting the CMDB interface based on the IP address corresponding to the middleware domain name;

[0043] Return module: used to return the middleware host information if there is an IP corresponding to the middleware domain name in the CMDB;

[0044] The third association storage module is used to associate and store the corresponding information table of application service ID, application service name, IP corresponding to the middleware domain name and middleware host information in the database.

[0045] A third aspect of the present invention further provides an electronic device, comprising: a processor and a memory;

[0046] The processor is configured to execute any one of the above methods for associating application services with middleware and updating the association result by calling a program or instruction stored in the memory.

[0047] In a fourth aspect, the present invention further proposes a computer-readable storage medium storing a program or instruction, wherein the program or instruction enables a computer to execute any one of the above methods for associating an application service with a middleware and updating the association result.

[0048] The beneficial effects of the present invention are as follows: the present invention obtains all application service IPs corresponding to all application service IDs of the Apollo configuration center; obtains all application service names corresponding to all application service IPs; associates and stores corresponding information tables of all application service IDs and all application service names in a database; obtains configuration data in JSON or XML format according to all application service IDs; filters out middleware domain names from the configuration data; parses the middleware domain name to obtain the IP corresponding to the middleware domain name; associates and stores corresponding information tables of all application service IDs, all application service names and the IP corresponding to the middleware domain name in a database; requests the CMDB interface to query the middleware host information according to the IP corresponding to the middleware domain name; if there is an IP corresponding to the middleware domain name in the CMDB, returns the middleware host information; associates and stores corresponding information tables of application service ID, application service name, IP corresponding to the middleware domain name and middleware host information in a database. The present invention not only automates the acquisition, association and synchronization of configuration information, but also significantly reduces manual operations and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference numerals represent the same components. Obviously, the drawings described below are only some of the embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings.

[0050] Figure 1 A method for associating application services with middleware and updating the association results provided in an embodiment of the present invention Figure 1 ;

[0051] Figure 2 A diagram of a method for obtaining all application service IP addresses provided by an embodiment of the present invention;

[0052] Figure 3 A diagram of a method for obtaining all application service names provided by an embodiment of the present invention;

[0053] Figure 4 A diagram of a method for obtaining configuration data provided by an embodiment of the present invention;

[0054] Figure 5 A method for associating application services with middleware and updating the association results provided in an embodiment of the present invention Figure 2 ;

[0055] Figure 6 A diagram of a device for associating an application service with middleware and updating the association result, provided in an embodiment of the present invention;

[0056] Figure 7A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present invention.

[0058] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0059] In the description of this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "mounted," "connected," and "connected" should be interpreted broadly, meaning, for example, fixed, removable, or integral; mechanical or electrical; direct or indirect through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this invention on a case-by-case basis.

[0060] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with certain aspects of the present invention, as detailed in the appended claims.

[0061] The present invention proposes a method, device, electronic device and storage medium for associating application services with middleware and updating the association results, which automatically completes the acquisition, association and synchronization of configuration information, significantly reduces manual operations and improves work efficiency.

[0062] Before introducing the embodiments of the present invention, the professional terms involved in the present invention are first introduced.

[0063] Apollo Configuration Center: Apollo is a distributed configuration center developed by Ctrip's framework department. It can centrally manage the configuration of applications in different environments and clusters, support dynamic updates and real-time push of configurations, and greatly improve the efficiency and flexibility of configuration management.

[0064] CMDB (Configuration Management Database): Configuration management database, used to record and manage the configuration information and relationships of all IT assets (such as hardware, software, middleware, etc.) in the IT environment.

[0065] Middleware: Middleware is software that sits between the operating system and applications, providing services to applications such as message queues and database connection pools.

[0066] App Service ID: Application identifier.

[0067] Method Example

[0068] Figure 1 A method for associating application services with middleware and updating the association results provided in an embodiment of the present invention Figure 1 .

[0069] The first aspect of the present invention provides a method for associating application services with middleware and updating the association results, combining Figure 1 , including ten steps from S1 to S10:

[0070] S1: Get all application service IP addresses corresponding to all application service IDs in the Apollo configuration center.

[0071] Specifically, in the embodiment of the present invention, all application service IP addresses corresponding to all application service IDs of the Apollo configuration center are obtained by scanning the system. The acquisition method is described in detail below.

[0072] S2: Get all application service names corresponding to all application service IPs.

[0073] Specifically, in the embodiment of the present invention, all application service names corresponding to all application service IPs are obtained by scanning the system. The obtaining method is described in detail below.

[0074] S3: Associate and store the corresponding information table of all application service IDs and all application service names in the database.

[0075] Specifically, in the embodiment of the present invention, after obtaining all application service IPs corresponding to all application service IDs and all application service names corresponding to all application service IPs, all application service IDs and all application service names are associated and stored in a database through all application service IPs.

[0076] S4: Get configuration data in JSON or XML format based on all application service IDs.

[0077] Specifically, in an embodiment of the present invention, the scanning system utilizes the RESTful API provided by the Apollo configuration center, and accesses the Apollo configuration center periodically or on demand based on the corresponding information table of all application service IDs and all application service names to obtain configuration data in JSON or XML format. The configuration data includes at least: database connection information, message queue configuration, and cache settings.

[0078] S5: Filter out the middleware domain name from the configuration data.

[0079] Specifically, in the embodiment of the present invention, the middleware domain name is filtered out from the configuration data according to the filtering rule.

[0080] S6: Parse the middleware domain name to obtain the IP address corresponding to the middleware domain name.

[0081] Specifically, in the embodiment of the present invention, the middleware domain name is resolved through DNS to obtain the IP corresponding to the middleware domain name.

[0082] S7: Associate and store all application service IDs, all application service names, and the IP corresponding information table of the middleware domain name in the database.

[0083] Specifically, in the embodiment of the present invention, after obtaining the IP corresponding to the middleware domain name, an information table of all application service IDs, all application service names and the IP corresponding to the middleware domain name is associated and stored in a database.

[0084] S8: Request the CMDB interface to query the middleware host information according to the IP address corresponding to the middleware domain name.

[0085] Specifically, in the embodiment of the present invention, the CMDB interface is requested according to the IP corresponding to the middleware domain name to query the middleware host information in the CMDB. The middleware host information includes at least: host specifications, middleware version and project label.

[0086] S9: If there is an IP address corresponding to the middleware domain name in the CMDB, the middleware host information is returned.

[0087] Specifically, in an embodiment of the present invention, the query result of requesting the CMDB interface to query the middleware host information in the CMDB according to the IP corresponding to the middleware domain name is that there is an IP corresponding to the middleware domain name in the CMDB, and the host specification, middleware version and project label are returned.

[0088] S10: Correlate and store the application service ID, application service name, IP corresponding to the middleware domain name, and a corresponding information table of the middleware host information in the database.

[0089] Specifically, in the embodiment of the present invention, after obtaining the middleware host information, the application service ID, application service name, the IP corresponding to the middleware domain name and the corresponding information table of the middleware host information are further associated and stored in the database.

[0090] Figure 2 A diagram of a method for obtaining all application service IP addresses provided by an embodiment of the present invention.

[0091] Furthermore, in the above method of associating application services with middleware and updating the association results, all application service IPs corresponding to all application service IDs in the Apollo configuration center are obtained, combined with Figure 2 , including two steps S21 to S22:

[0092] S21: The scanning system scans all application service IDs in the Apollo configuration center;

[0093] S22: The Apollo configuration center returns all application service IP addresses corresponding to all application service IDs to the scanning system.

[0094] Specifically, in an embodiment of the present invention, the scanning system scans the correspondence between all application service IDs and all application service IPs in the Apollo configuration center, and the Apollo configuration center returns all application service IPs corresponding to all application service IDs to the scanning system.

[0095] Figure 3 A diagram of a method for obtaining the names of all application services provided by an embodiment of the present invention.

[0096] Furthermore, in the above method of associating application services with middleware and updating the association result, all application service names corresponding to all application service IPs are obtained, and combined with Figure 3 , including two steps S31 to S32:

[0097] S31: The scanning system scans all application service IPs of the host or host container agent;

[0098] S32: The host or the host container agent returns all application service names corresponding to all application service IP addresses to the scanning system.

[0099] Specifically, in an embodiment of the present invention, after obtaining the application service IP, the host information in cmdb is associated with the application service IP to identify whether the application service IP is host deployed or container deployed. If it is host deployed, the service process running on the host is obtained through the agent to obtain the service name; if it is container deployed, the host container agent or script interface is used to trigger the Namespace information and Pod information commands, and the Controlled By field is searched in the Pod. The Controlled By field will display the Deployment to which the Pod belongs. The Deployment corresponds to the service name, and the service name is returned to the scanning system.

[0100] Figure 4 A diagram of a method for obtaining configuration data provided by an embodiment of the present invention.

[0101] Furthermore, in the above method of associating application services with middleware and updating the association result, configuration data in JSON or XML format is obtained according to all application service IDs, and combined with Figure 4 , including two steps S41 to S42:

[0102] S41: The scanning system scans all application service IDs in the Apollo configuration center;

[0103] S42: The Apollo configuration center returns configuration data in JSON or XML format corresponding to all application service IDs to the scanning system.

[0104] Specifically, in an embodiment of the present invention, the scanning system utilizes the RESTful API provided by the Apollo configuration center, and accesses the Apollo configuration center periodically or on demand based on the corresponding information table of all application service IDs and all application service names to obtain configuration data in JSON or XML format. The configuration data includes at least: database connection information, message queue configuration, and cache settings.

[0105] Furthermore, in the above method of associating an application service with a middleware and updating the association result, filtering out the middleware domain name from the configuration data includes:

[0106] Filter out the middleware domain name from the configuration data according to the filtering rules;

[0107] After filtering out the middleware domain name from the configuration data, the method further includes: sending the middleware domain name to a DNS for resolution.

[0108] Specifically, in an embodiment of the present invention, the filtering rules can be flexibly set according to actual conditions. For example, by filtering the key value according to the rules, the domain name of the rocketmq middleware can be filtered out, and the domain name of the rocketmq middleware can be sent to the DNS for resolution to obtain the specific IP of the middleware domain name.

[0109] Figure 5 A method for associating application services with middleware and updating the association results provided in an embodiment of the present invention Figure 2 .

[0110] Furthermore, the above method of associating application services with middleware and updating the association results is combined with Figure 5 , also includes two steps S51 to S52:

[0111] S51: If there is no IP corresponding to the middleware domain name in the CMDB, then add the IP corresponding to the middleware domain name and the middleware host information to the CMDB;

[0112] S52: Update the IP address and middleware host information corresponding to the newly added middleware domain name into the database.

[0113] Specifically, in the embodiment of the present invention, the IP corresponding to the middleware domain name in the CMDB and the middleware host information are associated and stored in the database.

[0114] Furthermore, the above method of associating application services with middleware and updating the association result further includes:

[0115] The monitoring visualization system displays the corresponding information table of application service ID, application service name, IP corresponding to the middleware domain name, and middleware host information.

[0116] Specifically, in an embodiment of the present invention, the monitoring visualization system displays a corresponding information table of the application service ID, application service name, IP corresponding to the middleware domain name, and middleware host information. When an abnormal alarm occurs in the redis cache middleware used, the operation and maintenance personnel can clearly understand the association between the application service ID, application service name, IP corresponding to the middleware domain name, and middleware host information through the visualization interface of the monitoring visualization system, and make corresponding fault recovery processing. The entire process is automatic, accurate and efficient.

[0117] Device embodiment

[0118] Figure 6 A diagram of a device for associating application services with middleware and updating the association results, provided by an embodiment of the present invention.

[0119] In a second aspect of the present invention, a device for associating application services with middleware and updating the association results is also proposed. Figure 6,include:

[0120] The first acquisition module 61 is used to obtain all application service IP addresses corresponding to all application service IDs of the Apollo configuration center.

[0121] Specifically, in the embodiment of the present invention, the first acquisition module 61 acquires all application service IPs corresponding to all application service IDs of the Apollo configuration center by scanning the system.

[0122] The second acquisition module 62 is used to acquire all application service names corresponding to all application service IPs.

[0123] Specifically, in the embodiment of the present invention, the second acquisition module 62 acquires all application service names corresponding to all application service IPs by scanning the system.

[0124] The first association storage module 63 is used to associate and store the corresponding information table of all application service IDs and all application service names in a database.

[0125] Specifically, in the embodiment of the present invention, after obtaining all application service IPs corresponding to all application service IDs and all application service names corresponding to all application service IPs, the first association storage module 63 associates all application service IDs and all application service names through all application service IPs and stores them in the database.

[0126] The third acquisition module 64 is configured to acquire configuration data in JSON or XML format according to all application service IDs in the corresponding information table.

[0127] Specifically, in an embodiment of the present invention, the scanning system utilizes the RESTful API provided by the Apollo configuration center, and accesses the Apollo configuration center periodically or on demand based on the corresponding information table of all application service IDs and all application service names. The third acquisition module 64 obtains configuration data in JSON or XML format, and the configuration data includes at least: database connection information, message queue configuration, and cache settings.

[0128] Filtering module 65: used to filter out middleware domain names from configuration data.

[0129] Specifically, in the embodiment of the present invention, the filtering module 65 filters out the middleware domain name from the configuration data according to the filtering rules.

[0130] The parsing module 66 is used to parse the middleware domain name to obtain the IP address corresponding to the middleware domain name.

[0131] Specifically, in the embodiment of the present invention, the resolution module 66 resolves the middleware domain name through DNS to obtain the IP address corresponding to the middleware domain name.

[0132] The second association storage module 67 is used to associate and store the IP correspondence information table corresponding to all application service IDs, all application service names and middleware domain names in the database.

[0133] Specifically, in the embodiment of the present invention, after obtaining the IP corresponding to the middleware domain name, the second association storage module 67 associates and stores all application service IDs, all application service names and the IP corresponding to the middleware domain name in the database.

[0134] Query module 68: used to query the middleware host information by requesting the CMDB interface according to the IP address corresponding to the middleware domain name.

[0135] Specifically, in the embodiment of the present invention, the query module 68 requests the CMDB interface to query the middleware host information in the CMDB according to the IP corresponding to the middleware domain name. The middleware host information includes at least: host specifications, middleware version and project label.

[0136] Return module 69: used to return the middleware host information if there is an IP corresponding to the middleware domain name in the CMDB.

[0137] Specifically, in an embodiment of the present invention, the query result of requesting the CMDB interface to query the middleware host information in the CMDB according to the IP corresponding to the middleware domain name is that there is an IP corresponding to the middleware domain name in the CMDB, and the return module 69 returns the host specification, middleware version and project label.

[0138] The third association storage module 610 is used to associate and store the corresponding information table of the application service ID, the application service name, the IP corresponding to the middleware domain name, and the middleware host information in the database.

[0139] Specifically, in the embodiment of the present invention, after obtaining the middleware host information, the third association storage module 610 further associates and stores the application service ID, application service name, the IP corresponding to the middleware domain name and the corresponding information table of the middleware host information in the database.

[0140] A third aspect of the present invention further provides an electronic device, comprising: a processor and a memory;

[0141] The processor is configured to execute any one of the above methods for associating application services with middleware and updating the association result by calling a program or instruction stored in the memory.

[0142] In a fourth aspect, the present invention further proposes a computer-readable storage medium storing a program or instruction, wherein the program or instruction enables a computer to execute any one of the above methods for associating an application service with a middleware and updating the association result.

[0143] Figure 7 This is a schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0144] like Figure 7 As shown, the electronic device includes: at least one processor 701, at least one memory 702 and at least one communication interface 703. The various components in the electronic device are coupled together through a bus system 704. The communication interface 703 is used to transmit information between external devices. It can be understood that the bus system 704 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 704 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus system 704 .

[0145] It can be understood that the memory 702 in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.

[0146] In some embodiments, the memory 702 stores the following elements, executable units or data structures, or a subset or an extended set thereof: an operating system and application programs.

[0147] The operating system includes various system programs, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and handle hardware-based tasks. The application program includes various application programs, such as media players and browsers, which are used to implement various application services. A program that implements any of the methods provided in the embodiments of the present invention for associating application services with middleware and updating the association results can be included in the application program.

[0148] In an embodiment of the present invention, the processor 701 calls a program or instruction stored in the memory 702, specifically, a program or instruction stored in an application program, and the processor 701 is used to execute the steps of each embodiment of a method for associating application services with middleware and updating association results provided in an embodiment of the present invention.

[0149] Get all application service IP addresses corresponding to all application service IDs in the Apollo configuration center;

[0150] Get all application service names corresponding to all application service IPs;

[0151] Associate and store the corresponding information table of all application service IDs and all application service names in the database;

[0152] Get configuration data in JSON or XML format based on all application service IDs in the corresponding information table;

[0153] Filter out middleware domain names from configuration data;

[0154] Parse the middleware domain name to obtain the IP corresponding to the middleware domain name;

[0155] Associate and store all application service IDs, all application service names, and the IP corresponding information table of middleware domain names in the database;

[0156] Request the CMDB interface to query the middleware host information based on the IP address corresponding to the middleware domain name;

[0157] If there is an IP address corresponding to the middleware domain name in the CMDB, the middleware host information is returned;

[0158] Associate and store the corresponding information table of application service ID, application service name, middleware domain name corresponding IP and middleware host information in the database.

[0159] Any of the methods provided in the embodiments of the present invention for associating an application service with a middleware and updating the association results can be applied to the processor 701 or implemented by the processor 701. The processor 701 can be an integrated circuit chip having signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 701 or by instructions in the form of software. The above-mentioned processor 701 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0160] Any of the steps in the method for associating application services with middleware and updating the association results provided in an embodiment of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units within the decoding processor. The software units can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in memory 702, and processor 701 reads information from memory 702 and, in conjunction with the hardware, completes the steps of the method.

[0161] Those skilled in the art will appreciate that although some embodiments described herein include some features and not others included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.

[0162] Those skilled in the art will understand that the description of each embodiment has its own focus, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and such modifications or substitutions shall be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

[0164] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for associating an application service with a middleware and updating the association result, characterized in that: include: Get all application service IP addresses corresponding to all application service IDs in the Apollo configuration center; Get all application service names corresponding to all application service IPs; Associate and store the corresponding information table of all application service IDs and all application service names in the database; Get configuration data in JSON or XML format based on all application service IDs; Filter out middleware domain names from configuration data; Parse the middleware domain name to obtain the IP corresponding to the middleware domain name; Associate and store all application service IDs, all application service names, and the IP corresponding information table of middleware domain names in the database; Request the CMDB interface to query the middleware host information based on the IP address corresponding to the middleware domain name; If there is an IP address corresponding to the middleware domain name in the CMDB, the middleware host information is returned; Associate and store the corresponding information table of application service ID, application service name, middleware domain name corresponding IP and middleware host information in the database; If the IP address corresponding to the middleware domain name does not exist in the CMDB, add the IP address corresponding to the middleware domain name and the middleware host information to the CMDB. Update the IP and middleware host information corresponding to the newly added middleware domain name into the database.

2. The method for associating application services with middleware and updating the association results according to claim 1, characterized in that: The method for obtaining all application service IP addresses corresponding to all application service IDs in the Apollo configuration center includes: The scanning system scans all application service IDs in the Apollo configuration center; The Apollo configuration center returns all application service IP addresses corresponding to all application service IDs to the scanning system.

3. The method for associating application services with middleware and updating the association results according to claim 1, characterized in that: The method of obtaining all application service names corresponding to all application service IP addresses includes: The scanning system scans all application service IPs of the host or host container agent; The host or host container agent returns all application service names corresponding to all application service IP addresses to the scanning system.

4. The method for associating application services with middleware and updating the association results according to claim 1, characterized in that: Get configuration data in JSON or XML format based on all application service IDs, including: The scanning system scans all application service IDs in the Apollo configuration center; The Apollo configuration center returns configuration data in JSON or XML format corresponding to all application service IDs to the scanning system.

5. The method for associating application services with middleware and updating the association results according to claim 1, characterized in that: Filter out middleware domain names from the configuration data, including: Filter out the middleware domain name from the configuration data according to the filtering rules; After filtering out the middleware domain name from the configuration data, the method further includes: sending the middleware domain name to a DNS for resolution.

6. The method for associating application services with middleware and updating the association results according to claim 1, characterized in that: The method further comprises: The monitoring visualization system displays the corresponding information table of application service ID, application service name, IP corresponding to the middleware domain name, and middleware host information.

7. A device for associating application services with middleware and updating the association results, characterized in that: include: The first acquisition module is used to obtain all application service IP addresses corresponding to all application service IDs in the Apollo configuration center; The second acquisition module is used to obtain all application service names corresponding to all application service IPs; The first association storage module is used to associate and store the corresponding information table of all application service IDs and all application service names in the database; The third acquisition module is used to obtain configuration data in JSON or XML format according to all application service IDs in the corresponding information table; Filtering module: used to filter out middleware domain names from configuration data; Parsing module: used to parse the middleware domain name to obtain the IP corresponding to the middleware domain name; The second association storage module is used to associate and store the IP corresponding information table of all application service IDs, all application service names and middleware domain names into the database; Query module: used to query the middleware host information by requesting the CMDB interface based on the IP address corresponding to the middleware domain name; Return module: used to return the middleware host information if there is an IP corresponding to the middleware domain name in the CMDB; The third association storage module is used to associate and store the corresponding information table of application service ID, application service name, middleware domain name corresponding IP and middleware host information in the database; New module: If there is no IP address corresponding to the middleware domain name in the CMDB, add the IP address corresponding to the middleware domain name and the middleware host information to the CMDB; Update module: used to update the IP and middleware host information corresponding to the newly added middleware domain name into the database.

8. An electronic device, characterized in that: include: processor and memory; The processor is configured to execute the method of associating an application service with middleware and updating an association result as claimed in any one of claims 1 to 6 by calling the program or instruction stored in the memory.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the method of associating an application service with middleware and updating an association result as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Implementation method for process of finding application topological relation on basis of CMDB and Netstat

    CN109510729A

  • Distributed monitoring management method, system and equipment for operation and maintenance service and medium

    CN117692499A