Method and device for associating application service and middleware and updating association result
By automatically obtaining and correlating the application service information of the Apollo configuration center, analyzing the middleware domain name and syncing it in real time to the configuration management database, it solves the complexity of configuration information management under the microservice architecture and improves the efficiency and accuracy of configuration management.
Patent Information
- Application Number
- CN202411625087.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-14
AI Technical Summary
It is difficult for the prior art to effectively manage and maintain the complex relationship between configuration information and business services and middleware under the microservice architecture, resulting in lag or inaccurate data in the configuration management database.
通过自动化获取Apollo配置中心的应用服务ID和IP,关联并存储应用服务ID与名称,获取并过滤中间件域名,解析其IP,并实时同步这些信息至配置管理数据库。
It significantly improves the efficiency and accuracy of configuration management, reduces manual operations, and ensures the reliability and maintainability of IT services.
Smart Images

Figure CN119440586A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of application services, and in particular, relates to a method and a device for associating application services with middleware and updating the association results. Background Art
[0002] As enterprise IT architecture becomes increasingly complex, the widespread use of microservice architecture and distributed systems has made the dependencies between services intricate. In this context, how to effectively manage and maintain configuration items and their relationships in IT infrastructure has become an important challenge facing enterprises. As a widely used configuration center, Apollo provides strong support for configuration management under microservice architecture. However, Apollo mainly focuses on the centralized storage and distribution of configuration information, and is relatively weak in the automated association and management of the relationship between configuration information and business services and middleware.
[0003] At the same time, as a core component of IT service management, the configuration management database (CMDB) is responsible for storing detailed information on all configuration items and their relationships in the IT infrastructure. The accuracy and real-time performance of the CMDB are crucial to ensuring the reliability and maintainability of IT services. However, traditional manual data entry or data synchronization based on limited automation tools often cannot cope with the rapid changes in configuration information under 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 relationship between business services and middleware, and synchronize these relationships to 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. At present, although some tools and platforms have tried to integrate business service and middleware association information into CMDB, most of them have the following shortcomings: Low degree of automation: Most solutions still rely on manual entry or simple script execution, which is difficult to adapt to the rapid changes of configuration information under the microservice architecture; Incomplete association relationship: Some solutions can only synchronize basic configuration information, ignoring the complex relationship between configuration and business services and middleware; Poor real-time performance: Due to the delay in data synchronization, the data in CMDB often cannot reflect the current status of IT infrastructure in a timely manner. 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 a middleware and updating the association result, comprising:
[0007] Get all application service IPs 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 the middleware domain name from the 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 the middleware domain name 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 corresponding to the middleware domain name in the CMDB, the middleware host information is returned;
[0016] The corresponding information table of the application service ID, application service name, IP corresponding to the middleware domain name and middleware host information is associated and stored in the database.
[0017] Furthermore, in the above method of associating application services with middleware and updating the association result, all application service IPs corresponding to all application service IDs of the Apollo configuration center are obtained, including:
[0018] The scanning system scans all application service IDs in the Apollo configuration center;
[0019] The Apollo configuration center returns all application service IPs 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 IPs to the scanning system.
[0023] Furthermore, in the above method for 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 for 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 for associating an application service with a middleware and updating the association result further includes:
[0030] If there is no IP corresponding to the middleware domain name in the CMDB, add the IP 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 for associating an application service with a 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 a middleware and updating the association result, comprising:
[0035] The first acquisition module is used to obtain all application service IPs 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] Filter 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 all application service IDs, all application service names and the IP corresponding information table corresponding to the middleware domain name in the database;
[0042] Query module: used to query the middleware host information by requesting the CMDB interface based on the IP 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 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.
[0045] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;
[0046] The processor is used to execute any one of the above methods of associating application services with middleware and updating the association result by calling the program or instruction stored in the memory.
[0047] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute any 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 all application service IDs and all application service names corresponding information tables in a database; obtains configuration data in JSON or XML format according to all application service IDs; filters out the middleware domain name from the configuration data; parses the middleware domain name to obtain the IP corresponding to the middleware domain name; associates and stores 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, the middleware host information is returned; 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. 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 used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained 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 IPs 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 a 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 in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only 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 ordinary technicians in the field without making 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 the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some 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, 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 located between the operating system and the application, providing services to the application, such as message queues, database connection pools, etc.
[0066] App Service ID: Application identifier.
[0067] Method Embodiment
[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] In a first aspect of the present invention, a method for associating an application service with a middleware and updating the association result is proposed, combining Figure 1 , including ten steps from S1 to S10:
[0070] S1: Get all application service IPs corresponding to all application service IDs in the Apollo configuration center.
[0071] Specifically, in the embodiment of the present invention, all application service IPs corresponding to all application service IDs of the Apollo configuration center are obtained by scanning the system, and 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, and 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 according to 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 according to the corresponding information table of all application service IDs and all application service names to obtain configuration data in JSON or XML format, and 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 corresponding to the middleware domain name.
[0081] Specifically, in the embodiment of the present invention, the middleware domain name is resolved by 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, all application service IDs, all application service names and the IP corresponding to the middleware domain name are associated and stored in the database.
[0084] S8: Request the CMDB interface to query the middleware host information according to the IP corresponding to the middleware domain name.
[0085] Specifically, in the embodiment of the present invention, the CMDB interface is requested 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 specification, middleware version and project label.
[0086] S9: If there is an IP 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, the IP corresponding to the middleware domain name, and the corresponding information table of the middleware host information in the database.
[0089] Specifically, in the embodiment of the present invention, after the middleware host information is obtained, the application service ID, the 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 IPs provided by an embodiment of the present invention.
[0091] Furthermore, in the above method of associating application services with middleware and updating the association result, all application service IPs corresponding to all application service IDs of the Apollo configuration center are obtained, combined with Figure 2 , including two steps from 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 IPs corresponding to all application service IDs to the scanning system.
[0094] Specifically, in the 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 all application service names 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, combined with Figure 3 , including two steps from S31 to S32:
[0097] S31: The scanning system scans all application service IPs of the host or the host container agent;
[0098] S32: The host or host container agent returns all application service names corresponding to all application service IPs 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 found 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, combined with Figure 4 , including two steps from S41 to S42:
[0102] S41: The scanning system scans all application service IDs of 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 according to the corresponding information table of all application service IDs and all application service names to obtain configuration data in JSON or XML format, and the configuration data includes at least: database connection information, message queue configuration and cache settings.
[0105] Furthermore, in the above method for 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 result is combined with Figure 5 , and 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 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 for associating an application service with a 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 the embodiment of the present invention, the monitoring visualization system displays the corresponding information table of the application service ID, application service name, IP corresponding to the middleware domain name and the middleware host information. When an abnormal alarm occurs in the redis cache middleware used, the operation and maintenance personnel can clearly understand the application service ID, application service name, IP corresponding to the middleware domain name and the association relationship of the middleware host information through the visualization interface of the monitoring visualization system, and make corresponding fault recovery processing. The whole process is automatic, accurate and efficient.
[0117] Device Embodiment
[0118] Figure 6 A diagram of a device for associating an application service with middleware and updating the association result 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 result is also provided, Figure 6,include:
[0120] The first acquisition module 61 is used to acquire all application service IPs 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 used 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 on a regular basis or on demand according to the corresponding information table of all application service IDs and all application service names. The third acquisition module 64 acquires 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 rule.
[0130] The parsing module 66 is used to parse the middleware domain name to obtain the IP 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 corresponding to the middleware domain name.
[0132] The second association storage module 67 is used to associate and store all application service IDs, all application service names and the IP corresponding information table corresponding to the middleware domain name 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 through the CMDB interface according to the IP corresponding to the middleware domain name.
[0135] Specifically, in the embodiment of the present invention, the query module 68 queries the middleware host information in the CMDB according to the IP corresponding to the middleware domain name through the CMDB interface. The middleware host information includes at least: host specification, 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 the 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 application service ID, the application service name, the IP corresponding to the middleware domain name, and the corresponding information table of 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 to the database.
[0140] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;
[0141] The processor is used to execute any one of the above methods of associating application services with middleware and updating the association result by calling the program or instruction stored in the memory.
[0142] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute any of the above methods for associating an application service with a middleware and updating the association result.
[0143] Figure 7 It 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 the 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 implementations, the memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.
[0147] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. A program that implements any method of the method for associating an application service with a middleware and updating the association result provided in an embodiment of the present invention can be included in the application.
[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 an application service with a middleware and updating an association result provided in an embodiment of the present invention.
[0149] Get all application service IPs 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 according to all application service IDs in the corresponding information table;
[0153] Filter out the middleware domain name from the 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 the middleware domain name 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 corresponding to the middleware domain name in the CMDB, the middleware host information is returned;
[0158] The corresponding information table of the application service ID, application service name, IP corresponding to the middleware domain name and middleware host information is associated and stored in the database.
[0159] Any of the methods for associating application services with middleware and updating the association results provided in an embodiment of the present invention can be applied to the processor 701, or implemented by the processor 701. The processor 701 can 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 701 or an instruction in the form of software. The above processor 701 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0160] The steps of any method in the method for associating application services with middleware and updating the association results provided by the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software units in the decoding processor. The software unit 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 702, and the processor 701 reads the information in the memory 702 and completes the steps of the method in combination with its hardware.
[0161] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.
[0162] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts 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 all fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
[0164] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope 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 IPs 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 the middleware domain name from the 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 the middleware domain name 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 corresponding to the middleware domain name in the CMDB, the middleware host information is returned; The corresponding information table of the application service ID, application service name, IP corresponding to the middleware domain name and middleware host information is associated and stored in the database.
2. A method for associating application services with middleware and updating the association result according to claim 1, characterized in that: The method of obtaining all application service IP addresses corresponding to all application service IDs of 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 IPs corresponding to all application service IDs to the scanning system.
3. A method for associating application services with middleware and updating the association result according to claim 1, characterized in that: The method of obtaining all application service names corresponding to all application service IPs 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 IPs to the scanning system.
4. A method for associating application services with middleware and updating the association result 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 result according to claim 1, characterized in that: Filter the 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. A method for associating application services with middleware and updating the association result according to claim 1, characterized in that: The method further comprises: If there is no IP corresponding to the middleware domain name in the CMDB, add the IP 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.
7. A method for associating application services with middleware and updating the association result 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.
8. A device for associating an application service with a middleware and updating the association result, characterized in that: include: The first acquisition module is used to obtain all application service IPs 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; Filter 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 all application service IDs, all application service names and the IP corresponding information table corresponding to the middleware domain name in the database; Query module: used to query the middleware host information by requesting the CMDB interface based on the IP 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 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.
9. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute the method of associating an application service with a middleware and updating an association result as claimed in any one of claims 1 to 7 by calling a program or instruction stored in the memory.
10. 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 a method for associating an application service with a middleware and updating an association result as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for globally presenting IT infrastructure data in CMDB
CN109120453A
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
System providing management of services and a method thereof
US20220060395A1