WO2019153488A1 - Service configuration management method, apparatus, storage medium and server - Google Patents

Service configuration management method, apparatus, storage medium and server Download PDF

Info

Publication number
WO2019153488A1
WO2019153488A1 PCT/CN2018/082836 CN2018082836W WO2019153488A1 WO 2019153488 A1 WO2019153488 A1 WO 2019153488A1 CN 2018082836 W CN2018082836 W CN 2018082836W WO 2019153488 A1 WO2019153488 A1 WO 2019153488A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
service
instruction
central server
management
Prior art date
Application number
PCT/CN2018/082836
Other languages
French (fr)
Chinese (zh)
Inventor
谭智文
洪宇明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019153488A1 publication Critical patent/WO2019153488A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5054Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/046Network management architectures or arrangements comprising network management agents or mobile agents therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS
    • H04L41/5009Determining service level performance parameters or violations of service level contracts, e.g. violations of agreed response time or mean time between failures [MTBF]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/508Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement
    • H04L41/5096Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement wherein the managed service relates to distributed or central networked applications

Definitions

  • the present application relates to the field of information monitoring, and in particular, to a service configuration management method, apparatus, storage medium, and server.
  • Zookeeper is a distributed, open source distributed application coordination service. It is an open source implementation of Google's Chubby and an important component of Hadoop and Hbase.
  • Etcd is a highly available key-value storage system used primarily for shared configuration and service discovery. Etcd is a young project developed and maintained by CoreOS. It is a high-speed iteration and development project that is inspired by Zookeeper and Doozer.
  • distributed coordination systems such as zookeeper and etcd require applications to realize service discovery through the development of driver packages. For old applications that have not been put into development manpower maintenance, it is difficult to access the distributed coordination system to realize service discovery. higher cost.
  • the embodiment of the present application provides a service configuration management method, device, storage medium, and server, so as to solve the problem in the prior art, for an old application that has not been put into development manpower maintenance, accessing the distributed coordination system to implement the service Finding more difficult and costly problems.
  • a first aspect of the embodiment of the present application provides a service configuration management method, including:
  • the proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
  • a second aspect of the embodiments of the present application provides a service configuration management system, where the service configuration management system includes: a proxy server, a central server, and a client, where:
  • the central server is configured to send a service management instruction to the proxy server
  • the proxy server is configured to start a daemon process, and listen to the service management instruction sent by the central server; and when the daemon detects the service management instruction sent by the central server actively, the service management instruction is parsed; Sending the parsed service management instruction to the client;
  • the client is configured to receive the parsed service management instruction sent by the proxy server, and perform configuration management according to the parsed service management instruction degree of the service in the client;
  • the client is further configured to actively send a service request instruction to the proxy server;
  • the proxy server is further configured to parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process, and send the parsed service request instruction to the center a server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
  • a third aspect of an embodiment of the present application provides a server including a memory and a processor, the memory storing computer readable instructions executable on the processor, the processor executing the computer readable instructions The following steps are implemented:
  • the proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
  • a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
  • the proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
  • a fifth aspect of the embodiments of the present application provides a service configuration management apparatus, including:
  • a first instruction intercepting unit configured to start a daemon by the proxy server, listen to a service management instruction sent by the central server, and a request management instruction sent by the client;
  • a first instruction parsing unit configured to parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the listening process
  • a configuration management unit configured to perform configuration management on the service of the client according to the parsed service management instruction
  • a second instruction parsing unit configured to parse the service request instruction when the daemon process detects a service request instruction sent by the client actively during the listening process
  • a first instruction sending unit configured to send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management instruction sent by the client are monitored, and the daemon detects the service management instruction sent by the central server actively during the monitoring process.
  • the service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction.
  • the daemon detects the service request instruction sent by the client actively during the listening process, Parsing the service request instruction, and transmitting the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • the program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
  • FIG. 1 is a framework diagram of a service configuration management system provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of an implementation of a service configuration management method provided by an embodiment of the present application
  • FIG. 3 is a specific implementation flowchart of a service configuration management method S203 provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a specific implementation of a service configuration management method S205 according to an embodiment of the present application
  • FIG. 5 is a flowchart of an implementation of a service configuration management method including receiving status information sent by a client according to another embodiment of the present application;
  • FIG. 6 is a structural block diagram of a service configuration management apparatus according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a service configuration management apparatus according to another embodiment of the present application.
  • FIG. 8 is a schematic diagram of a server provided by an embodiment of the present application.
  • FIG. 1 is a system architecture diagram of a service configuration management system according to a first embodiment of the present application. The detailed description is as follows: For convenience of description, only parts related to the embodiments of the present application are shown.
  • the service configuration management system includes a central server 1, a proxy server 2, and a client 3, wherein:
  • the central server 1 is configured to send a service management command to the proxy server 2.
  • the service management instruction includes a number of the client 3 to be managed and a configuration file instruction
  • the configuration file instruction includes a configuration file modification instruction, a configuration file deletion instruction, or a configuration file addition instruction.
  • the service management instruction of the central server 1 includes a configuration parameter of a configuration file whose service name corresponds to the service name.
  • the proxy server 2 is configured to start a daemon process and listen to service management instructions sent by the central server 1.
  • the service management instruction is parsed when the daemon detects the service management instruction sent by the central server 1 actively during the listening process.
  • the parsed service management instruction is sent to the client 3.
  • the client 3 is configured to receive the parsed service management command sent by the proxy server 2, and perform configuration management according to the parsed service management command degree of the service in the client 3.
  • the client 3 is further configured to actively send a service request instruction to the proxy server 2.
  • the service request instruction includes the number of the client 3, and further includes a service name requested by the client 3.
  • the proxy server 2 is further configured to parse the service request instruction when the daemon process detects the service request instruction sent by the client 3 actively during the listening process.
  • the parsed service request instruction is sent to the central server 1 to cause the central server 1 to transmit a service management instruction matching the service request instruction to the proxy server 2.
  • the central server 1 and the client 3 are included in the distributed system environment.
  • the proxy server 2 is installed in the distributed system environment, and the instructions of the central server 1 and the instructions of the client 3 are monitored by a daemon process in the proxy server 2.
  • the above daemon is a process that runs in the background and is not controlled by any terminal. Multiple daemons run in the background at the same time, and perform different management tasks.
  • the client 3 is further configured to send a feedback instruction to the proxy server 2, where the feedback instruction includes information that the client 3 reloads the configuration file successfully, and the proxy server 2 sends the feedback instruction to the
  • the central server 1 is configured to notify the central server 1 that the client 3 has reloaded the configuration result.
  • the client 3 includes, but is not limited to, a client 3 with communication capabilities such as a desktop computer, a mobile phone, a notebook, and a tablet.
  • a client 3 with communication capabilities such as a desktop computer, a mobile phone, a notebook, and a tablet.
  • a plurality of clients 3 can be connected to the proxy server 2 by wire or wirelessly.
  • the service configuration management system may adopt Bluetooth technology, WIFI technology or
  • the 3G/4G/5G technology establishes a wireless connection between the proxy server 2 and the central server 1, and can also establish a wired connection between the proxy server 2 and the central server 1 by using serial port technology or USB interface technology.
  • the service configuration management system includes a proxy server, a central server, and a client, and the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management command sent by the client are monitored.
  • the daemon detects the service management instruction sent by the central server, the service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction, and the daemon is monitored during the monitoring process.
  • the daemon detects the service management instruction sent by the central server, parsed, and sending the parsed service request instruction to the central server, so that the central server sends the service request instruction Matching service management instructions to the proxy server.
  • the program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
  • FIG. 2 shows an implementation flow of the service configuration management method provided by the embodiment of the present application.
  • the execution body of the process is the proxy server 2 shown in FIG. 1, and the method flow includes steps S201 to S205.
  • the specific implementation principles of each step are as follows:
  • the proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client.
  • an instruction of the central server and an instruction of the client are monitored by a daemon in the proxy server.
  • the daemon is a process that runs in the background and is not controlled by any terminal.
  • the service management instruction includes a number of a client to be managed and a configuration file instruction
  • the configuration file instruction includes a configuration file modification instruction, a configuration file deletion instruction, or a configuration file addition instruction.
  • the service request instruction includes a number of the client to be managed, and a service name requested by the client.
  • S202 Parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process.
  • S203 Perform configuration management on the service of the client according to the parsed service management instruction.
  • the foregoing S203 specifically includes:
  • A1 Obtain the number of the client in the service management instruction. Specifically, the number of the client to be managed by the proxy server in the service management instruction is obtained. The number of the client is used to identify a client in a distributed system, and the clients in the distributed system respectively have and have only one corresponding number, and the number is unique.
  • A2 Search processing logic of the client current configuration file and the address of the client from the pre-established client registration information table according to the number of the client.
  • the information recorded in the client registration information table is information when the client registers to join the distributed system, including the number and address of the client, and the processing logic of the current configuration file of the client.
  • A3 modifying, according to the configuration file modification instruction, the processing logic of the current configuration file of the client, and the address of the client, the current configuration file of the client, so that the current is detected by the client Reload the configuration file when the configuration file is modified.
  • the processing logic is embodied by a function.
  • the processing logic is a function called when the configuration file is managed.
  • the client that needs to be monitored by the daemon of the proxy server is pre-registered on the proxy server, and the registration information includes the number, address, and processing logic (ie, processing function) of the client.
  • the proxy server establishes a client registration information table according to the registration information sent by the registration client that needs to be monitored.
  • the client registration information table includes the processing number of the client, the address, and the processing logic of the client's configuration file.
  • the processing logic of the current configuration file of the client and the address of the client modify the current configuration file of the client.
  • the configuration file is reloaded, so that the service configuration management of the client is performed in time to implement service discovery.
  • the client detects the configuration file of the service in real time, and determines whether the configuration file of the service is updated.
  • the client detects the configuration file of the service on a periodic basis. When it is detected that the current configuration file is different from the configuration file when the previous cycle is detected, the configuration file is reloaded, thereby automatically updating the service of the client.
  • the method further includes:
  • the daemon monitors a service feedback instruction sent by the client.
  • the proxy server performs configuration management on the service of the client according to the parsed service management instruction
  • the service of the client is updated.
  • the client sends a service feedback instruction to the server.
  • the proxy server notifies the proxy server that the configuration management of the service is successful.
  • S2032 If the service feedback instruction sent by the client is not detected within a specified time, send a reload configuration command to the client according to the preset first command line, so that the client configures according to the overload The instruction reloads the updated configuration file. Specifically, when the service feedback instruction sent by the client is not monitored within a specified time, it is determined that the client loads the updated configuration file and fails.
  • S204 Parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process.
  • the daemon process also listens for the service request instruction sent by the client.
  • the service request instruction includes a number of the client and a service name requested by the client.
  • S205 Send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • FIG. 4 shows a specific implementation process of the service configuration management method S205 provided by the embodiment of the present application, which is described in detail as follows:
  • the proxy server parses the service request instruction, and sends the number of the client and the service name in the parsed service request instruction to the central server, and the central server receives the After the number of the client and the service name, the latest configuration file of the service name is searched according to the service name, and sent to the proxy server.
  • the central server searches for the current configuration file of the client according to the number of the client, searches for the latest configuration file corresponding to the service name according to the service name, and searches for the current configuration file and the latest configuration. Comparing the files, generating a configuration file modification instruction according to the comparison result, generating a service management instruction according to the number of the client in the service request instruction and the generated configuration file modification instruction, and sending the service management instruction to the a proxy server, such that the proxy server performs configuration management of the client's services according to the generated service management instructions.
  • the program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
  • FIG. 5 illustrates a service configuration management method including receiving status information sent by a client according to an embodiment of the present application, which is described in detail as follows:
  • S501 The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client.
  • S502 Parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process.
  • S503 Perform configuration management on the service of the client according to the parsed service management instruction.
  • S504 Parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process.
  • S505 Send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • step S501 to step S505 in this embodiment refer to step S201 to step S205 of the foregoing embodiment, and details are not described herein again.
  • the proxy server receives the status information sent by the client, and sends the status information to the central server, so that the central server determines the status of the service of the client according to the status information, and A service management instruction for managing the service of the client is generated according to a status of the service of the client.
  • the status information sent by the client includes the currently available service name, and includes the running status of the client process.
  • the daemon process feeds back the status information of the client to the central server, and the central server may determine the availability status of the client service according to the status information of the client, and generate and the client according to the availability status of the client service.
  • the availability status of the end service corresponds to a service management instruction for managing the availability status of the client service, ie, for different states of the client service, the central server generates different service management instructions.
  • the availability status of the client includes but is not limited to the normal operation of the service, the service failure, and the service version is too low.
  • the proxy server receives status information sent by the client periodically. Specifically, the client may periodically send status information of the service to the daemon.
  • the daemon of the proxy server simultaneously monitors the instructions of the central server and the instructions of the client, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement Service discovery, reducing the cost of cluster maintenance in the distributed system.
  • the proxy server receives the status information sent by the client, and sends the status information to the central server, so that the central server is Determining the status of the service of the client, and generating a service management instruction for managing the service of the client according to the status of the service of the client, so as to timely grasp the status of the service in the client, and generate corresponding Service management instructions to enable efficient configuration management of services for the client.
  • FIG. 6 is a structural block diagram of the service configuration management apparatus provided by the embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown.
  • the service configuration management apparatus includes: a first instruction listening unit 61, a first instruction parsing unit 62, a configuration management unit 63, a second instruction parsing unit 64, and a first instruction sending unit 65, wherein:
  • the first instruction intercepting unit 61 is configured to: the proxy server starts the daemon, listens to the service management instruction sent by the central server, and the request management instruction sent by the client;
  • the first instruction parsing unit 62 is configured to parse the service management instruction when the daemon process detects the service management instruction sent by the central server actively during the listening process;
  • the configuration management unit 63 is configured to perform configuration management on the service of the client according to the parsed service management instruction.
  • the second instruction parsing unit 64 is configured to parse the service request instruction when the daemon process detects the service request instruction sent by the client actively during the listening process;
  • the first instruction sending unit 65 is configured to send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • the configuration management unit 63 includes:
  • a number obtaining module configured to obtain a number of the client in the service management instruction
  • An information finding module configured to search, according to the number of the client, a processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
  • a configuration management module configured to modify, according to the configuration file modification instruction, the processing logic of the client current configuration file, and the address of the client, the current configuration file of the client, so that the client detects Reload the configuration file when the current configuration file is modified.
  • the first instruction sending unit 65 includes:
  • a first instruction parsing module configured to parse a service request instruction sent by the client, and obtain a service name that the client requests to update
  • a first data sending module configured to send, by the client, a service name that is updated by the client to the central server, so that the central server sends, according to the service name that the client requests to update, a message that includes the service name The latest configuration file for the service to the proxy server.
  • the service configuration management apparatus further includes:
  • a second instruction intercepting unit 71 configured to: the daemon process listens to a service feedback instruction sent by the client;
  • the second instruction sending unit 72 is configured to: if the service feedback instruction sent by the client is not monitored within a specified time, send a reload configuration command to the client according to the preset first command line, so that The client reloads the updated configuration file according to the overload configuration directive.
  • the service configuration management apparatus further includes:
  • An information processing unit configured to receive, by the proxy server, status information sent by the client, and send the status information to the central server, so that the central server determines the service of the client according to the status information. a state, and generating a service management instruction for managing the service of the client according to the state of the service of the client.
  • the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management instruction sent by the client are monitored, and the daemon detects the service management instruction sent by the central server actively during the monitoring process.
  • the service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction.
  • the daemon detects the service request instruction sent by the client actively during the listening process, Parsing the service request instruction, and transmitting the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  • the program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
  • FIG. 8 is a schematic diagram of a server according to an embodiment of the present application.
  • the server 8 of this embodiment includes a processor 80, a memory 81, and computer readable instructions 82 stored in the memory 81 and executable on the processor 80, such as a service configuration manager. .
  • the processor 80 executes the computer readable instructions 82, the steps in the foregoing various service configuration management method embodiments are implemented, such as steps 201 to 205 shown in FIG. 2.
  • the processor 80 when executing the computer readable instructions 82, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 61-65 shown in FIG.
  • the computer readable instructions 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80, To complete this application.
  • the one or more modules/units may be a series of computer readable instruction instruction segments capable of performing a particular function for describing the execution of the computer readable instructions 82 in the server 8.
  • the server 8 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the server may include, but is not limited to, a processor 80, a memory 81. It will be understood by those skilled in the art that FIG. 8 is merely an example of the server 8, does not constitute a limitation of the server 8, may include more or less components than those illustrated, or combine some components, or different components, such as
  • the server may also include an input and output device, a network access device, a bus, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application provides a service configuration management method, an apparatus, a storage medium and a server. Said method comprises: a proxy server starting a daemon to monitor a service management instruction sent by a central server and a request management instruction sent by a client; parsing the service management instruction when the daemon detects, during monitoring, the service management instruction which is actively sent by the central server; performing configuration management on the service of the client according to the parsed service management instruction; parsing the service request instruction when the daemon detects, during monitoring, a service request instruction which is actively sent by the client; and sending the parsed service request instruction to the central server, so that the central server sends, to the proxy server, a service management instruction matching the service request instruction. The present application can effectively realize service discovery, reducing the cost of cluster maintenance in a distributed system.

Description

服务配置管理方法、装置、存储介质和服务器Service configuration management method, device, storage medium and server
本申请要求于2018年02月07日提交中国专利局、申请号为CN 201810122209.3、发明名称为“服务配置管理方法、系统、存储介质和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the Chinese Patent Office on February 7, 2018, and the application number is CN. </ RTI> </ RTI> </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt;
技术领域Technical field
本申请涉及信息监控领域,尤其涉及一种服务配置管理方法、装置、存储介质和服务器。The present application relates to the field of information monitoring, and in particular, to a service configuration management method, apparatus, storage medium, and server.
背景技术Background technique
Zookeeper是一个分布式的、开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。etcd是一个高可用的键值存储系统,主要用于共享配置和服务发现。etcd是一个年轻的项目,是由CoreOS开发并维护的,作为一个受到Zookeeper与doozer启发而催生的项目,正在高速迭代和开发中。目前zookeeper、etcd等分布式协调系统均需要应用程序通过驱动包的开发实现服务发现,对于已经不投入开发人力维护的老应用程序来说,接入分布式协调系统要实现服务发现较困难,且成本较高。Zookeeper is a distributed, open source distributed application coordination service. It is an open source implementation of Google's Chubby and an important component of Hadoop and Hbase. Etcd is a highly available key-value storage system used primarily for shared configuration and service discovery. Etcd is a young project developed and maintained by CoreOS. It is a high-speed iteration and development project that is inspired by Zookeeper and Doozer. At present, distributed coordination systems such as zookeeper and etcd require applications to realize service discovery through the development of driver packages. For old applications that have not been put into development manpower maintenance, it is difficult to access the distributed coordination system to realize service discovery. higher cost.
技术问题technical problem
本申请实施例提供了一种服务配置管理方法、装置、存储介质和服务器,以解决现有技术中,对于已经不投入开发人力维护的老应用程序来说,接入分布式协调系统要实现服务发现较困难,且成本较高的问题。The embodiment of the present application provides a service configuration management method, device, storage medium, and server, so as to solve the problem in the prior art, for an old application that has not been put into development manpower maintenance, accessing the distributed coordination system to implement the service Finding more difficult and costly problems.
技术解决方案Technical solution
本申请实施例的第一方面提供了一种服务配置管理方法,包括:A first aspect of the embodiment of the present application provides a service configuration management method, including:
代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
本申请实施例的第二方面提供了一种服务配置管理系统,所述服务配置管理系统包括:代理服务器、中心服务器以及客户端,其中:A second aspect of the embodiments of the present application provides a service configuration management system, where the service configuration management system includes: a proxy server, a central server, and a client, where:
所述中心服务器用于发送服务管理指令至所述代理服务器;The central server is configured to send a service management instruction to the proxy server;
所述代理服务器用于启动守护进程,监听所述中心服务器发送的服务管理指令;当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;将解析后的服务管理指令发送至所述客户端;The proxy server is configured to start a daemon process, and listen to the service management instruction sent by the central server; and when the daemon detects the service management instruction sent by the central server actively, the service management instruction is parsed; Sending the parsed service management instruction to the client;
所述客户端用于接收所述代理服务器发送的所述解析后的服务管理指令,并根据所述解析后的服务管理指令度所述客户端中的服务进行配置管理;The client is configured to receive the parsed service management instruction sent by the proxy server, and perform configuration management according to the parsed service management instruction degree of the service in the client;
所述客户端还用于主动发送服务请求指令至所述代理服务器;The client is further configured to actively send a service request instruction to the proxy server;
所述代理服务器还用于当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。The proxy server is further configured to parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process, and send the parsed service request instruction to the center a server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
本申请实施例的第三方面提供了一种服务器,包括存储器以及处理器,所述存储器存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A third aspect of an embodiment of the present application provides a server including a memory and a processor, the memory storing computer readable instructions executable on the processor, the processor executing the computer readable instructions The following steps are implemented:
代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
本申请实施例的第五方面提供了一种服务配置管理装置,包括:A fifth aspect of the embodiments of the present application provides a service configuration management apparatus, including:
第一指令监听单元,用于代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;a first instruction intercepting unit, configured to start a daemon by the proxy server, listen to a service management instruction sent by the central server, and a request management instruction sent by the client;
第一指令解析单元,用于当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;a first instruction parsing unit, configured to parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the listening process;
配置管理单元,用于根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;a configuration management unit, configured to perform configuration management on the service of the client according to the parsed service management instruction;
第二指令解析单元,用于当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;a second instruction parsing unit, configured to parse the service request instruction when the daemon process detects a service request instruction sent by the client actively during the listening process;
第一指令发送单元,用于将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。And a first instruction sending unit, configured to send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
有益效果Beneficial effect
本申请实施例中,通过代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令,当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令,根据解析后的所述服务管理指令对所述客户端的服务进行配置管理,当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令,将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。本方案通过代理服务器的守护进程同时对中心服务器的指令和客户端的指令进行监控,及时对客户端的服务配置进行管理和维护,及时响应客户端发送至中心服务器的请求,以便有效实现服务发现,降低分布式系统中集群维护的成本。In the embodiment of the present application, the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management instruction sent by the client are monitored, and the daemon detects the service management instruction sent by the central server actively during the monitoring process. The service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction. When the daemon detects the service request instruction sent by the client actively during the listening process, Parsing the service request instruction, and transmitting the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server. The program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only the present application. For some embodiments, other drawings may be obtained from those of ordinary skill in the art in light of the inventive workability.
图1是本申请实施例提供的服务配置管理系统的框架图;1 is a framework diagram of a service configuration management system provided by an embodiment of the present application;
图2是本申请实施例提供的服务配置管理方法的实现流程图;2 is a flowchart of an implementation of a service configuration management method provided by an embodiment of the present application;
图3是本申请实施例提供的服务配置管理方法S203的具体实现流程图;3 is a specific implementation flowchart of a service configuration management method S203 provided by an embodiment of the present application;
图4是本申请实施例提供的服务配置管理方法S205的具体实现流程图;FIG. 4 is a flowchart of a specific implementation of a service configuration management method S205 according to an embodiment of the present application;
图5是本申请另一实施例提供的包括接收客户端发送的状态信息的服务配置管理方法的实现流程图;FIG. 5 is a flowchart of an implementation of a service configuration management method including receiving status information sent by a client according to another embodiment of the present application;
图6是本申请实施例提供的服务配置管理装置的结构框图;FIG. 6 is a structural block diagram of a service configuration management apparatus according to an embodiment of the present application;
图7是本申请另一实施例提供的服务配置管理装置的结构框图;FIG. 7 is a structural block diagram of a service configuration management apparatus according to another embodiment of the present application;
图8是本申请实施例提供的服务器的示意图。FIG. 8 is a schematic diagram of a server provided by an embodiment of the present application.
本发明的实施方式Embodiments of the invention
基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
图1示出了本申请第一实施例提供的一种服务配置管理系统的系统架构图,详述如下:为了便于说明,仅示出了与本申请实施例相关的部分。FIG. 1 is a system architecture diagram of a service configuration management system according to a first embodiment of the present application. The detailed description is as follows: For convenience of description, only parts related to the embodiments of the present application are shown.
参照图1,所述服务配置管理系统包括中心服务器1、代理服务器2以及客户端3,其中:Referring to FIG. 1, the service configuration management system includes a central server 1, a proxy server 2, and a client 3, wherein:
所述中心服务器1用于发送服务管理指令至所述代理服务器2。其中,所述服务管理指令中包括待管理的客户端3的编号和配置文件指令,所述配置文件指令包括配置文件修改指令、配置文件删除指令或者配置文件添加指令等。具体地,上述中心服务器1的服务管理指令包括服务名称与所述服务名称对应的配置文件的配置参数。The central server 1 is configured to send a service management command to the proxy server 2. The service management instruction includes a number of the client 3 to be managed and a configuration file instruction, and the configuration file instruction includes a configuration file modification instruction, a configuration file deletion instruction, or a configuration file addition instruction. Specifically, the service management instruction of the central server 1 includes a configuration parameter of a configuration file whose service name corresponds to the service name.
所述代理服务器2用于启动守护进程,监听所述中心服务器1发送的服务管理指令。当监听过程中所述守护进程检测到所述中心服务器1主动发送的服务管理指令时,解析所述服务管理指令。将解析后的服务管理指令发送至所述客户端3。The proxy server 2 is configured to start a daemon process and listen to service management instructions sent by the central server 1. The service management instruction is parsed when the daemon detects the service management instruction sent by the central server 1 actively during the listening process. The parsed service management instruction is sent to the client 3.
所述客户端3用于接收所述代理服务器2发送的所述解析后的服务管理指令,并根据所述解析后的服务管理指令度所述客户端3中的服务进行配置管理。The client 3 is configured to receive the parsed service management command sent by the proxy server 2, and perform configuration management according to the parsed service management command degree of the service in the client 3.
所述客户端3还用于主动发送服务请求指令至所述代理服务器2。其中,所述服务请求指令中包括所述客户端3的编号,还包括所述客户端3请求的服务名称。The client 3 is further configured to actively send a service request instruction to the proxy server 2. The service request instruction includes the number of the client 3, and further includes a service name requested by the client 3.
所述代理服务器2还用于当监听过程中所述守护进程检测到所述客户端3主动发送的服务请求指令时,解析所述服务请求指令。将解析后的所述服务请求指令发送至所述中心服务器1,以使得所述中心服务器1发送与所述服务请求指令匹配的服务管理指令至所述代理服务器2。The proxy server 2 is further configured to parse the service request instruction when the daemon process detects the service request instruction sent by the client 3 actively during the listening process. The parsed service request instruction is sent to the central server 1 to cause the central server 1 to transmit a service management instruction matching the service request instruction to the proxy server 2.
具体地,分布式系统环境中包括中心服务器1和客户端3。在本申请实施例中,在所述分布式系统环境中安装代理服务器2,通过所述代理服务器2中的守护进程对所述中心服务器1的指令和所述客户端3的指令进行监控。上述守护进程是一个在后台运行并且不受任何终端控制的进程,多个守护进程同时在后台运行,分别执行不同的管理任务。Specifically, the central server 1 and the client 3 are included in the distributed system environment. In the embodiment of the present application, the proxy server 2 is installed in the distributed system environment, and the instructions of the central server 1 and the instructions of the client 3 are monitored by a daemon process in the proxy server 2. The above daemon is a process that runs in the background and is not controlled by any terminal. Multiple daemons run in the background at the same time, and perform different management tasks.
进一步地,所述客户端3还用于发送反馈指令至上述代理服务器2,其中,所述反馈指令中包括客户端3重新加载配置文件成功的信息,上述代理服务器2将所述反馈指令发送至所述中心服务器1,以使得及时通知所述中心服务器1上述客户端3已重新加载配置的结果。Further, the client 3 is further configured to send a feedback instruction to the proxy server 2, where the feedback instruction includes information that the client 3 reloads the configuration file successfully, and the proxy server 2 sends the feedback instruction to the The central server 1 is configured to notify the central server 1 that the client 3 has reloaded the configuration result.
具体地,所述客户端3包括但不限于台式电脑、手机、笔记本和平板电脑等具有通信能力的客户端3。多个客户端3可通过有线方式或无线方式与代理服务器2连接。Specifically, the client 3 includes, but is not limited to, a client 3 with communication capabilities such as a desktop computer, a mobile phone, a notebook, and a tablet. A plurality of clients 3 can be connected to the proxy server 2 by wire or wirelessly.
可选地,所述服务配置管理系统可以采用蓝牙技术、WIFI 技术或 3G/4G/5G技术等建立代理服务器2与中心服务器1之间的无线连接,也可以采用串口技术或者USB 接口技术等建立代理服务器2与中心服务器1之间的有线连接。Optionally, the service configuration management system may adopt Bluetooth technology, WIFI technology or The 3G/4G/5G technology establishes a wireless connection between the proxy server 2 and the central server 1, and can also establish a wired connection between the proxy server 2 and the central server 1 by using serial port technology or USB interface technology.
本申请实施例中,服务配置管理系统包括代理服务器、中心服务器以及客户端,通过代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令,当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令,根据解析后的所述服务管理指令对所述客户端的服务进行配置管理,当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令,将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。本方案通过代理服务器的守护进程同时对中心服务器的指令和客户端的指令进行监控,及时对客户端的服务配置进行管理和维护,及时响应客户端发送至中心服务器的请求,以便有效实现服务发现,降低分布式系统中集群维护的成本。In the embodiment of the present application, the service configuration management system includes a proxy server, a central server, and a client, and the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management command sent by the client are monitored. When the daemon detects the service management instruction sent by the central server, the service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction, and the daemon is monitored during the monitoring process. When detecting the service request instruction sent by the client, parsing the service request instruction, and sending the parsed service request instruction to the central server, so that the central server sends the service request instruction Matching service management instructions to the proxy server. The program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
图2示出了本申请实施例提供的服务配置管理方法的实现流程,在本实施例中,该流程的执行主体为图1所示的代理服务器2,该方法流程包括步骤S201至S205。各步骤的具体实现原理如下:FIG. 2 shows an implementation flow of the service configuration management method provided by the embodiment of the present application. In this embodiment, the execution body of the process is the proxy server 2 shown in FIG. 1, and the method flow includes steps S201 to S205. The specific implementation principles of each step are as follows:
S201:代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令。S201: The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client.
具体地,在分布式系统环境中,通过所述代理服务器中的守护进程对所述中心服务器的指令和所述客户端的指令进行监控。所述守护进程是一个在后台运行并且不受任何终端控制的进程。在分布式系统环境中,存在不止一个客户端,因此,所述代理服务器中可建立多个守护进程同时在后台运行,多个守护进程分别执行不同的管理任务,从而可提高服务发现的效率。在本申请实施例中,所述服务管理指令中包括待管理的客户端的编号和配置文件指令,所述配置文件指令包括配置文件修改指令、配置文件删除指令或者配置文件添加指令等。所述服务请求指令中包括待管理的客户端的编号,还包括所述客户端请求的服务名称。Specifically, in a distributed system environment, an instruction of the central server and an instruction of the client are monitored by a daemon in the proxy server. The daemon is a process that runs in the background and is not controlled by any terminal. In a distributed system environment, there is more than one client. Therefore, multiple daemons can be established in the proxy server to run in the background at the same time, and multiple daemons respectively perform different management tasks, thereby improving the efficiency of service discovery. In the embodiment of the present application, the service management instruction includes a number of a client to be managed and a configuration file instruction, and the configuration file instruction includes a configuration file modification instruction, a configuration file deletion instruction, or a configuration file addition instruction. The service request instruction includes a number of the client to be managed, and a service name requested by the client.
S202:当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令。S202: Parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process.
S203:根据解析后的所述服务管理指令对所述客户端的服务进行配置管理。S203: Perform configuration management on the service of the client according to the parsed service management instruction.
作为本申请的一个实施例,如图3所示,当所述服务管理指令中包括配置文件修改指令时,上述S203具体包括:As an embodiment of the present application, as shown in FIG. 3, when the service management instruction includes a configuration file modification instruction, the foregoing S203 specifically includes:
A1:获取所述服务管理指令中客户端的编号。具体地,获取所述服务管理指令中所述代理服务器待管理的客户端的编号。所述客户端的编号用于标识分布式系统中的客户端,分布式系统中的客户端分别具有且仅具有一个对应的编号,所述编号具有唯一性。A1: Obtain the number of the client in the service management instruction. Specifically, the number of the client to be managed by the proxy server in the service management instruction is obtained. The number of the client is used to identify a client in a distributed system, and the clients in the distributed system respectively have and have only one corresponding number, and the number is unique.
A2:根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址。具体地,上述客户端注册信息表中记录的是客户端注册加入分布式系统时的信息,包括客户端的编号、地址以及所述客户端当前配置文件的处理逻辑。A2: Search processing logic of the client current configuration file and the address of the client from the pre-established client registration information table according to the number of the client. Specifically, the information recorded in the client registration information table is information when the client registers to join the distributed system, including the number and address of the client, and the processing logic of the current configuration file of the client.
A3:根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。其中,处理逻辑通过函数体现。所述处理逻辑为对配置文件进行管理时所调用的函数。A3: modifying, according to the configuration file modification instruction, the processing logic of the current configuration file of the client, and the address of the client, the current configuration file of the client, so that the current is detected by the client Reload the configuration file when the configuration file is modified. Among them, the processing logic is embodied by a function. The processing logic is a function called when the configuration file is managed.
在本申请实施例中,创建分布式系统环境时,需要代理服务器的守护进程监听的客户端,预先在代理服务器上进行注册,注册信息包括客户端的编号、地址以及处理逻辑(即处理函数),代理服务器根据需监听的注册客户端发送的注册信息建立客户端注册信息表,所述客户端注册信息表中包括客户端的编号、地址以及客户端的配置文件的处理逻辑。当所述服务管理指令中包配置文件修改指令时,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址,根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改。所述客户端检测到所述当前配置文件被修改时,重新加载配置文件,从而及时对客户端的服务配置管理,实现服务发现。In the embodiment of the present application, when the distributed system environment is created, the client that needs to be monitored by the daemon of the proxy server is pre-registered on the proxy server, and the registration information includes the number, address, and processing logic (ie, processing function) of the client. The proxy server establishes a client registration information table according to the registration information sent by the registration client that needs to be monitored. The client registration information table includes the processing number of the client, the address, and the processing logic of the client's configuration file. When the package configuration file modification instruction is in the service management instruction, the processing logic of the client current configuration file and the address of the client are searched from the pre-established client registration information table, and the instruction is modified according to the configuration file. The processing logic of the current configuration file of the client and the address of the client modify the current configuration file of the client. When the client detects that the current configuration file is modified, the configuration file is reloaded, so that the service configuration management of the client is performed in time to implement service discovery.
进一步地,所述客户端实时对服务的配置文件进行检测,判断所述服务的配置文件是否更新。可选地,所述客户端按周期对服务的配置文件进行检测。当检测当前配置文件与前一周期检测时的配置文件不一样时,重新加载配置文件,从而自动更新所述客户端的服务。Further, the client detects the configuration file of the service in real time, and determines whether the configuration file of the service is updated. Optionally, the client detects the configuration file of the service on a periodic basis. When it is detected that the current configuration file is different from the configuration file when the previous cycle is detected, the configuration file is reloaded, thereby automatically updating the service of the client.
可选地,作为本申请的一个实施例,在所述步骤S203之后还包括:Optionally, as an embodiment of the present application, after the step S203, the method further includes:
S2031:所述守护进程监听所述客户端发送的服务反馈指令。在本申请实施例中,当代理服务器根据解析后的所述服务管理指令对所述客户端的服务进行配置管理之后,所述客户端的服务更新,此时,所述客户端发送服务反馈指令至所述代理服务器,通知所述代理服务器此次服务的配置管理成功。S2031: The daemon monitors a service feedback instruction sent by the client. In the embodiment of the present application, after the proxy server performs configuration management on the service of the client according to the parsed service management instruction, the service of the client is updated. At this time, the client sends a service feedback instruction to the server. The proxy server notifies the proxy server that the configuration management of the service is successful.
S2032:若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置指令至客户端,以使得客户端根据所述重载配置指令重新载入更新的配置文件。具体地,当指定的时间内未监听到所述客户端发送的服务反馈指令时,判定所述客户端加载更新的配置文件出现故障。S2032: If the service feedback instruction sent by the client is not detected within a specified time, send a reload configuration command to the client according to the preset first command line, so that the client configures according to the overload The instruction reloads the updated configuration file. Specifically, when the service feedback instruction sent by the client is not monitored within a specified time, it is determined that the client loads the updated configuration file and fails.
进一步地,若发送所述重载配置的指令至同一客户端的次数超过预设次数,则根据预设的第二命令行,发送服务重启指令至所述客户端,以使得客户端根据所述服务重启指令重启服务,从而重新载入更新的配置文件。Further, if the number of times the instruction of the reload configuration is sent to the same client exceeds a preset number of times, sending a service restart command to the client according to the preset second command line, so that the client according to the service The restart command restarts the service and reloads the updated configuration file.
S204:当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令。S204: Parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process.
在本申请实施例中,守护进程还同时监听客户端主动发送的服务请求指令。所述服务请求指令中包括所述客户端的编号以及所述客户端请求的服务名称。In the embodiment of the present application, the daemon process also listens for the service request instruction sent by the client. The service request instruction includes a number of the client and a service name requested by the client.
S205:将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。S205: Send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
作为本申请的一个实施例,图4示出了本申请实施例提供的服务配置管理方法S205的具体实现流程,详述如下:As an embodiment of the present application, FIG. 4 shows a specific implementation process of the service configuration management method S205 provided by the embodiment of the present application, which is described in detail as follows:
B1:解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称。B1: Parse the service request instruction sent by the client actively, and obtain the service name that the client requests to update.
B2:将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。B2: Send the service name of the client request update to the central server, so that the central server sends the latest configuration file including the service corresponding to the service name to the service name updated by the client request to The proxy server.
在本申请实施例中,所述代理服务器解析所述服务请求指令,将解析后服务请求指令中的所述客户端的编号以及服务名称等发送至所述中心服务器,所述中心服务器接收到所述客户端的编号以及服务名称之后,根据所述服务名称查找所述服务名称最新的配置文件,并发送至所述代理服务器。In the embodiment of the present application, the proxy server parses the service request instruction, and sends the number of the client and the service name in the parsed service request instruction to the central server, and the central server receives the After the number of the client and the service name, the latest configuration file of the service name is searched according to the service name, and sent to the proxy server.
进一步地,所述中心服务器根据所述客户端的编号查找所述客户端的当前配置文件,根据所述服务名称查找所述服务名称对应的最新的配置文件,将查找到的当前配置文件与最新的配置文件进行比较,根据比较结果生成配置文件修改指令,根据所述服务请求指令中的所述客户端的编号以及生成的配置文件修改指令,生成服务管理指令,并将所述服务管理指令发送至所述代理服务器,以使得所述代理服务器根据生成的服务管理指令对所述客户端的服务进行配置管理。Further, the central server searches for the current configuration file of the client according to the number of the client, searches for the latest configuration file corresponding to the service name according to the service name, and searches for the current configuration file and the latest configuration. Comparing the files, generating a configuration file modification instruction according to the comparison result, generating a service management instruction according to the number of the client in the service request instruction and the generated configuration file modification instruction, and sending the service management instruction to the a proxy server, such that the proxy server performs configuration management of the client's services according to the generated service management instructions.
本方案通过代理服务器的守护进程同时对中心服务器的指令和客户端的指令进行监控,及时对客户端的服务配置进行管理和维护,及时响应客户端发送至中心服务器的请求,以便有效实现服务发现,降低分布式系统中集群维护的成本。The program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
进一步地,基于上述图2实施例中所提供的服务配置管理方法,提出本申请的另一实施例。在本申请实施例中,图5示出了本申请实施例提供的一种包括接收客户端发送的状态信息的服务配置管理方法,详述如下:Further, another embodiment of the present application is proposed based on the service configuration management method provided in the above embodiment of FIG. 2. In the embodiment of the present application, FIG. 5 illustrates a service configuration management method including receiving status information sent by a client according to an embodiment of the present application, which is described in detail as follows:
S501:代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令。S501: The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client.
S502:当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令。S502: Parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process.
S503:根据解析后的所述服务管理指令对所述客户端的服务进行配置管理。S503: Perform configuration management on the service of the client according to the parsed service management instruction.
S504:当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令。S504: Parse the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process.
S505:将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。S505: Send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
本实施例中,步骤S501至步骤S505的具体步骤参见上述实施例步骤S201至步骤S205,在此不再赘述。For the specific steps of step S501 to step S505 in this embodiment, refer to step S201 to step S205 of the foregoing embodiment, and details are not described herein again.
S506:所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。S506: The proxy server receives the status information sent by the client, and sends the status information to the central server, so that the central server determines the status of the service of the client according to the status information, and A service management instruction for managing the service of the client is generated according to a status of the service of the client.
具体地,上述客户端发送的状态信息包括当前可用的服务名称,还包括客户端进程的运行状态等。在本申请实施例中,守护进程将客户端的状态信息反馈至中心服务器,中心服务器可根据客户端的状态信息判断客户端服务的可用性状态,根据所述客户端服务的可用性状态,生成与所述客户端服务的可用性状态相应的服务管理指令,所述服务管理指令用于针对所述客户端服务的可用性状态进行管理,即对于客户端服务的不同状态,中心服务器生成不同的服务管理指令。其中,客户端的可用性状态包括但不限于服务正常运行、服务故障、服务版本过低。进一步地,所述代理服务器接收所述客户端周期发送的状态信息。具体地,所述客户端可周期性的发送服务的状态信息至守护进程。Specifically, the status information sent by the client includes the currently available service name, and includes the running status of the client process. In the embodiment of the present application, the daemon process feeds back the status information of the client to the central server, and the central server may determine the availability status of the client service according to the status information of the client, and generate and the client according to the availability status of the client service. The availability status of the end service corresponds to a service management instruction for managing the availability status of the client service, ie, for different states of the client service, the central server generates different service management instructions. The availability status of the client includes but is not limited to the normal operation of the service, the service failure, and the service version is too low. Further, the proxy server receives status information sent by the client periodically. Specifically, the client may periodically send status information of the service to the daemon.
本申请实施例中,通过代理服务器的守护进程同时对中心服务器的指令和客户端的指令进行监控,及时对客户端的服务配置进行管理和维护,及时响应客户端发送至中心服务器的请求,以便有效实现服务发现,降低分布式系统中集群维护的成本,进一步地,代理服务器通过接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令,从而及时掌握客户端中服务的状态,生成相应的服务管理指令以使得对所述客户端的服务进行有效配置管理。In the embodiment of the present application, the daemon of the proxy server simultaneously monitors the instructions of the central server and the instructions of the client, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement Service discovery, reducing the cost of cluster maintenance in the distributed system. Further, the proxy server receives the status information sent by the client, and sends the status information to the central server, so that the central server is Determining the status of the service of the client, and generating a service management instruction for managing the service of the client according to the status of the service of the client, so as to timely grasp the status of the service in the client, and generate corresponding Service management instructions to enable efficient configuration management of services for the client.
对应于上文实施例所述的服务配置管理方法,图6示出了本申请实施例提供的服务配置管理装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the service configuration management method described in the foregoing embodiment, FIG. 6 is a structural block diagram of the service configuration management apparatus provided by the embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown.
参照图6,该服务配置管理装置包括:第一指令监听单元61,第一指令解析单元62,配置管理单元63,第二指令解析单元64,第一指令发送单元65,其中:Referring to FIG. 6, the service configuration management apparatus includes: a first instruction listening unit 61, a first instruction parsing unit 62, a configuration management unit 63, a second instruction parsing unit 64, and a first instruction sending unit 65, wherein:
第一指令监听单元61,用于代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The first instruction intercepting unit 61 is configured to: the proxy server starts the daemon, listens to the service management instruction sent by the central server, and the request management instruction sent by the client;
第一指令解析单元62,用于当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;The first instruction parsing unit 62 is configured to parse the service management instruction when the daemon process detects the service management instruction sent by the central server actively during the listening process;
配置管理单元63,用于根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;The configuration management unit 63 is configured to perform configuration management on the service of the client according to the parsed service management instruction.
第二指令解析单元64,用于当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;The second instruction parsing unit 64 is configured to parse the service request instruction when the daemon process detects the service request instruction sent by the client actively during the listening process;
第一指令发送单元65,用于将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。The first instruction sending unit 65 is configured to send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
可选地,所述服务管理指令中包括配置文件修改指令时,所述配置管理单元63包括:Optionally, when the configuration file modification instruction is included in the service management instruction, the configuration management unit 63 includes:
编号获取模块,用于获取所述服务管理指令中客户端的编号;a number obtaining module, configured to obtain a number of the client in the service management instruction;
信息查找模块,用于根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址;An information finding module, configured to search, according to the number of the client, a processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
配置管理模块,用于根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。a configuration management module, configured to modify, according to the configuration file modification instruction, the processing logic of the client current configuration file, and the address of the client, the current configuration file of the client, so that the client detects Reload the configuration file when the current configuration file is modified.
可选地,当所述服务请求指令中包括更新服务时,所述第一指令发送单元65包括:Optionally, when the service request instruction includes an update service, the first instruction sending unit 65 includes:
第一指令解析模块,用于解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称;a first instruction parsing module, configured to parse a service request instruction sent by the client, and obtain a service name that the client requests to update;
第一数据发送模块,用于将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。a first data sending module, configured to send, by the client, a service name that is updated by the client to the central server, so that the central server sends, according to the service name that the client requests to update, a message that includes the service name The latest configuration file for the service to the proxy server.
可选地,如图7所示,可选地,所述服务配置管理装置还包括:Optionally, as shown in FIG. 7, optionally, the service configuration management apparatus further includes:
第二指令监听单元71,用于所述守护进程监听所述客户端发送的服务反馈指令;a second instruction intercepting unit 71, configured to: the daemon process listens to a service feedback instruction sent by the client;
第二指令发送单元72,用于若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置的指令至客户端,以使得客户端根据重载配置指令重新载入更新的配置文件。The second instruction sending unit 72 is configured to: if the service feedback instruction sent by the client is not monitored within a specified time, send a reload configuration command to the client according to the preset first command line, so that The client reloads the updated configuration file according to the overload configuration directive.
可选地,所述服务配置管理装置还包括:Optionally, the service configuration management apparatus further includes:
信息处理单元,用于所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。An information processing unit, configured to receive, by the proxy server, status information sent by the client, and send the status information to the central server, so that the central server determines the service of the client according to the status information. a state, and generating a service management instruction for managing the service of the client according to the state of the service of the client.
本申请实施例中,通过代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令,当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令,根据解析后的所述服务管理指令对所述客户端的服务进行配置管理,当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令,将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。本方案通过代理服务器的守护进程同时对中心服务器的指令和客户端的指令进行监控,及时对客户端的服务配置进行管理和维护,及时响应客户端发送至中心服务器的请求,以便有效实现服务发现,降低分布式系统中集群维护的成本。In the embodiment of the present application, the daemon is started by the proxy server, and the service management instruction sent by the central server and the request management instruction sent by the client are monitored, and the daemon detects the service management instruction sent by the central server actively during the monitoring process. The service management instruction is parsed, and the service of the client is configured and managed according to the parsed service management instruction. When the daemon detects the service request instruction sent by the client actively during the listening process, Parsing the service request instruction, and transmitting the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server. The program monitors the instructions of the central server and the instructions of the client through the daemon of the proxy server, manages and maintains the service configuration of the client in time, and responds to the request sent by the client to the central server in time to effectively implement service discovery and reduce The cost of cluster maintenance in a distributed system.
图8是本申请一实施例提供的服务器的示意图。如图8所示,该实施例的服务器8包括:处理器80、存储器81以及存储在所述存储器81中并可在所述处理器80上运行的计算机可读指令82,例如服务配置管理程序。所述处理器80执行所述计算机可读指令82时实现上述各个服务配置管理方法实施例中的步骤,例如图2所示的步骤201至205。或者,所述处理器80执行所述计算机可读指令82时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块61至65的功能。FIG. 8 is a schematic diagram of a server according to an embodiment of the present application. As shown in FIG. 8, the server 8 of this embodiment includes a processor 80, a memory 81, and computer readable instructions 82 stored in the memory 81 and executable on the processor 80, such as a service configuration manager. . When the processor 80 executes the computer readable instructions 82, the steps in the foregoing various service configuration management method embodiments are implemented, such as steps 201 to 205 shown in FIG. 2. Alternatively, the processor 80, when executing the computer readable instructions 82, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 61-65 shown in FIG.
示例性的,所述计算机可读指令82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令82在所述服务器8中的执行过程。Illustratively, the computer readable instructions 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80, To complete this application. The one or more modules/units may be a series of computer readable instruction instruction segments capable of performing a particular function for describing the execution of the computer readable instructions 82 in the server 8.
所述服务器8可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述服务器可包括,但不仅限于,处理器80、存储器81。本领域技术人员可以理解,图8仅仅是服务器8的示例,并不构成对服务器8的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述服务器还可以包括输入输出设备、网络接入设备、总线等。The server 8 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The server may include, but is not limited to, a processor 80, a memory 81. It will be understood by those skilled in the art that FIG. 8 is merely an example of the server 8, does not constitute a limitation of the server 8, may include more or less components than those illustrated, or combine some components, or different components, such as The server may also include an input and output device, a network access device, a bus, and the like.

Claims (20)

  1. 一种服务配置管理方法,其特征在于,包括:A service configuration management method, comprising:
    代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
    当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
    根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
    当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
    将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
  2. 根据权利要求1所述的方法,其特征在于,当所述服务管理指令中包括配置文件修改指令时,所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤,包括:The method according to claim 1, wherein when the configuration management instruction includes a configuration file modification instruction, the step of configuring and managing the service of the client according to the parsed service management instruction, include:
    获取所述服务管理指令中客户端的编号;Obtaining a number of the client in the service management instruction;
    根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址;Searching, according to the number of the client, processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
    根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。Modifying, according to the configuration file modification instruction, the processing logic of the current configuration file of the client, and the address of the client, the current configuration file of the client, so that the current configuration file is detected at the client Reload the configuration file when it is modified.
  3. 根据权利要求1所述的方法,其特征在于,当所述服务请求指令中包括更新服务时,所述将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器的步骤,包括:The method according to claim 1, wherein when the service request instruction includes an update service, the parsing the service request instruction is sent to the central server, so that the central server sends The step of the service management instruction matching the service request instruction to the proxy server includes:
    解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称;Parsing a service request instruction sent by the client to obtain a service name requested by the client to be updated;
    将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。Sending, by the client, the updated service name to the central server, so that the central server sends the latest configuration file including the service corresponding to the service name to the Proxy server.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,在所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤之后,还包括:The method according to any one of claims 1 to 3, further comprising: after the step of configuring and managing the service of the client according to the parsed service management instruction, further comprising:
    所述守护进程监听所述客户端发送的服务反馈指令;The daemon process listens to a service feedback instruction sent by the client;
    若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置的指令至客户端,以使得客户端根据重载配置指令重新载入更新的配置文件。If the service feedback instruction sent by the client is not monitored within a specified time, the overloaded configuration command is sent to the client according to the preset first command line, so that the client reloads according to the overload configuration command. Enter the updated configuration file.
  5. 根据权利要求1至3任一项所述的方法,其特征在于,所述服务配置管理方法还包括:The method according to any one of claims 1 to 3, wherein the service configuration management method further comprises:
    所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。Receiving, by the proxy server, status information sent by the client, and sending the status information to the central server, so that the central server determines, according to the status information, a status of the service of the client, and according to the The state of the client's service generates a service management instruction for managing the client's service.
  6. 一种服务配置管理装置,其特征在于,包括:A service configuration management device, comprising:
    第一指令监听单元,用于代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;a first instruction intercepting unit, configured to start a daemon by the proxy server, listen to a service management instruction sent by the central server, and a request management instruction sent by the client;
    第一指令解析单元,用于当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;a first instruction parsing unit, configured to parse the service management instruction when the daemon detects the service management instruction sent by the central server actively during the listening process;
    配置管理单元,用于根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;a configuration management unit, configured to perform configuration management on the service of the client according to the parsed service management instruction;
    第二指令解析单元,用于当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;a second instruction parsing unit, configured to parse the service request instruction when the daemon process detects a service request instruction sent by the client actively during the listening process;
    第一指令发送单元,用于将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。And a first instruction sending unit, configured to send the parsed service request instruction to the central server, so that the central server sends a service management instruction that matches the service request instruction to the proxy server.
  7. 根据权利要求6所述的装置,其特征在于,所述配置管理单元包括:The device according to claim 6, wherein the configuration management unit comprises:
    编号获取模块,用于获取所述服务管理指令中客户端的编号;a number obtaining module, configured to obtain a number of the client in the service management instruction;
    信息查找模块,用于根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址;An information finding module, configured to search, according to the number of the client, a processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
    配置管理模块,用于根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。a configuration management module, configured to modify, according to the configuration file modification instruction, the processing logic of the client current configuration file, and the address of the client, the current configuration file of the client, so that the client detects Reload the configuration file when the current configuration file is modified.
  8. 根据权利要求6所述的装置,其特征在于,所述第一指令发送单元包括:The apparatus according to claim 6, wherein the first instruction sending unit comprises:
    第一指令解析模块,用于解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称;a first instruction parsing module, configured to parse a service request instruction sent by the client, and obtain a service name that the client requests to update;
    第一数据发送模块,用于将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。a first data sending module, configured to send, by the client, a service name that is updated by the client to the central server, so that the central server sends, according to the service name that the client requests to update, a message that includes the service name The latest configuration file for the service to the proxy server.
  9. 根据权利要求6至8任一项所述的装置,其特征在于,所述服务配置管理装置还包括:The device according to any one of claims 6 to 8, wherein the service configuration management device further comprises:
    第二指令监听单元,用于所述守护进程监听所述客户端发送的服务反馈指令;a second instruction intercepting unit, configured to: the daemon process listens to a service feedback instruction sent by the client;
    第二指令发送单元,用于若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置的指令至客户端,以使得客户端根据重载配置指令重新载入更新的配置文件。a second instruction sending unit, configured to: if the service feedback instruction sent by the client is not monitored within a specified time, send a reload configuration command to the client according to the preset first command line, so as to enable the client The terminal reloads the updated configuration file according to the overload configuration command.
  10. 根据权利要求6至9任一项所述的装置,其特征在于,所述服务配置管理装置还包括:The device according to any one of claims 6 to 9, wherein the service configuration management device further comprises:
    信息处理单元,用于所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。An information processing unit, configured to receive, by the proxy server, status information sent by the client, and send the status information to the central server, so that the central server determines the service of the client according to the status information. a state, and generating a service management instruction for managing the service of the client according to the state of the service of the client.
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the following steps:
    代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
    当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
    根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
    当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
    将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
  12. 根据权利要求11所述的计算机可读存储介质,其特征在于,当所述服务管理指令中包括配置文件修改指令时,所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤,包括:The computer readable storage medium according to claim 11, wherein when the service management instruction includes a configuration file modification instruction, the configuring the service of the client according to the parsed service management instruction Management steps, including:
    获取所述服务管理指令中客户端的编号;Obtaining a number of the client in the service management instruction;
    根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址;Searching, according to the number of the client, processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
    根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。Modifying, according to the configuration file modification instruction, the processing logic of the current configuration file of the client, and the address of the client, the current configuration file of the client, so that the current configuration file is detected at the client Reload the configuration file when it is modified.
  13. 根据权利要求11所述的计算机可读存储介质,其特征在于,当所述服务请求指令中包括更新服务时,所述将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器的步骤,包括:The computer readable storage medium according to claim 11, wherein when the service request instruction includes an update service, the parsing the service request instruction is sent to the central server to cause The step of the central server sending a service management instruction matching the service request instruction to the proxy server, including:
    解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称;Parsing a service request instruction sent by the client to obtain a service name requested by the client to be updated;
    将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。Sending, by the client, the updated service name to the central server, so that the central server sends the latest configuration file including the service corresponding to the service name to the Proxy server.
  14. 根据权利要求11至13任一项所述的计算机可读存储介质,其特征在于,在所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤之后,还包括:The computer readable storage medium according to any one of claims 11 to 13, further comprising: after the step of configuring and managing the service of the client according to the parsed service management instruction, further comprising:
    所述守护进程监听所述客户端发送的服务反馈指令;The daemon process listens to a service feedback instruction sent by the client;
    若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置的指令至客户端,以使得客户端根据重载配置指令重新载入更新的配置文件。If the service feedback instruction sent by the client is not monitored within a specified time, the overloaded configuration command is sent to the client according to the preset first command line, so that the client reloads according to the overload configuration command. Enter the updated configuration file.
  15. 根据权利要求11至13任一项所述的计算机可读存储介质,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer readable storage medium according to any one of claims 11 to 13, wherein the processor further implements the following steps when the computer readable instructions are executed:
    所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。Receiving, by the proxy server, status information sent by the client, and sending the status information to the central server, so that the central server determines, according to the status information, a status of the service of the client, and according to the The state of the client's service generates a service management instruction for managing the client's service.
  16. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A server comprising a memory, a processor, and computer readable instructions stored in the memory and operative on the processor, wherein the processor implements the following steps when the computer readable instructions are executed :
    代理服务器启动守护进程,监听中心服务器发送的服务管理指令以及客户端发送的请求管理指令;The proxy server starts the daemon, and listens to the service management instruction sent by the central server and the request management instruction sent by the client;
    当监听过程中所述守护进程检测到所述中心服务器主动发送的服务管理指令时,解析所述服务管理指令;Parsing the service management instruction when the daemon detects the service management instruction sent by the central server actively during the monitoring process;
    根据解析后的所述服务管理指令对所述客户端的服务进行配置管理;Performing configuration management on the service of the client according to the parsed service management instruction;
    当监听过程中所述守护进程检测到所述客户端主动发送的服务请求指令时,解析所述服务请求指令;Parsing the service request instruction when the daemon detects the service request instruction sent by the client actively during the listening process;
    将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器。Transmitting the parsed service request instruction to the central server to cause the central server to send a service management instruction that matches the service request instruction to the proxy server.
  17. 根据权利要求16所述的服务器,其特征在于,当所述服务管理指令中包括配置文件修改指令时,所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤,包括:The server according to claim 16, wherein when the configuration management command includes a configuration file modification instruction, the step of configuring and managing the service of the client according to the parsed service management instruction, include:
    获取所述服务管理指令中客户端的编号;Obtaining a number of the client in the service management instruction;
    根据所述客户端的编号,从预先建立的客户端注册信息表中查找所述客户端当前配置文件的处理逻辑以及所述客户端的地址;Searching, according to the number of the client, processing logic of the current configuration file of the client and an address of the client from a pre-established client registration information table;
    根据所述配置文件修改指令、所述客户端当前配置文件的处理逻辑以及所述客户端的地址,对所述客户端的当前配置文件进行修改,以使得在所述客户端检测到所述当前配置文件被修改时,重新加载配置文件。Modifying, according to the configuration file modification instruction, the processing logic of the current configuration file of the client, and the address of the client, the current configuration file of the client, so that the current configuration file is detected at the client Reload the configuration file when it is modified.
  18. 根据权利要求16所述的服务器,其特征在于,当所述服务请求指令中包括更新服务时,所述将解析后的所述服务请求指令发送至所述中心服务器,以使得所述中心服务器发送与所述服务请求指令匹配的服务管理指令至所述代理服务器的步骤,包括:The server according to claim 16, wherein when the service request instruction includes an update service, the parsing the service request instruction is sent to the central server, so that the central server sends The step of the service management instruction matching the service request instruction to the proxy server includes:
    解析所述客户端主动发送的服务请求指令,获取所述客户端请求更新的服务名称;Parsing a service request instruction sent by the client to obtain a service name requested by the client to be updated;
    将所述客户端请求更新的服务名称发送至所述中心服务器,以使得所述中心服务器根据所述客户端请求更新的服务名称,发送包括所述服务名称对应的服务的最新配置文件至所述代理服务器。Sending, by the client, the updated service name to the central server, so that the central server sends the latest configuration file including the service corresponding to the service name to the Proxy server.
  19. 根据权利要求16至18任一项所述的服务器,其特征在于,在所述根据解析后的所述服务管理指令对所述客户端的服务进行配置管理的步骤之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The server according to any one of claims 16 to 18, wherein after the step of configuring management of the service of the client according to the parsed service management instruction, the processor executes the The computer readable instructions also implement the following steps:
    所述守护进程监听所述客户端发送的服务反馈指令;The daemon process listens to a service feedback instruction sent by the client;
    若在指定的时间内未监听到所述客户端发送的服务反馈指令,则根据预设的第一命令行,发送重载配置的指令至客户端,以使得客户端根据重载配置指令重新载入更新的配置文件。If the service feedback instruction sent by the client is not monitored within a specified time, the overloaded configuration command is sent to the client according to the preset first command line, so that the client reloads according to the overload configuration command. Enter the updated configuration file.
  20. 根据权利要求16至18任一项所述的服务器,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:The server according to any one of claims 16 to 18, wherein the processor further implements the following steps when the computer readable instructions are executed:
    所述代理服务器接收所述客户端发送的状态信息,并将所述状态信息发送至所述中心服务器,以使得所述中心服务器根据所述状态信息判断所述客户端的服务的状态,并根据所述客户端的服务的状态生成用于对所述客户端的服务进行管理的服务管理指令。Receiving, by the proxy server, status information sent by the client, and sending the status information to the central server, so that the central server determines, according to the status information, a status of the service of the client, and according to the The state of the client's service generates a service management instruction for managing the client's service.
PCT/CN2018/082836 2018-02-07 2018-04-12 Service configuration management method, apparatus, storage medium and server WO2019153488A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810122209.3 2018-02-07
CN201810122209.3A CN108566290B (en) 2018-02-07 2018-02-07 Service configuration management method, system, storage medium and server

Publications (1)

Publication Number Publication Date
WO2019153488A1 true WO2019153488A1 (en) 2019-08-15

Family

ID=63531211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082836 WO2019153488A1 (en) 2018-02-07 2018-04-12 Service configuration management method, apparatus, storage medium and server

Country Status (2)

Country Link
CN (1) CN108566290B (en)
WO (1) WO2019153488A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590331A (en) * 2021-08-05 2021-11-02 山东派盟网络科技有限公司 Task processing method, control device and storage medium

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109462646B (en) * 2018-11-12 2021-11-19 平安科技(深圳)有限公司 Abnormal response method and equipment
CN109445927B (en) * 2018-11-12 2021-09-17 郑州云海信息技术有限公司 Task management method and device for storage cluster
CN109543133A (en) * 2018-11-29 2019-03-29 杭州涂鸦信息技术有限公司 A kind of automation dissemination method, device, system, equipment and readable storage medium storing program for executing
CN110572442A (en) * 2019-08-15 2019-12-13 上海易点时空网络有限公司 Method and system for configuring file path
CN110569085A (en) * 2019-08-15 2019-12-13 上海易点时空网络有限公司 configuration file loading method and system
CN110474983A (en) * 2019-08-15 2019-11-19 上海易点时空网络有限公司 Cloud configuration method and system based on agency service
CN110572277A (en) * 2019-08-15 2019-12-13 上海易点时空网络有限公司 Machine management method and system
CN110519088A (en) * 2019-08-15 2019-11-29 上海易点时空网络有限公司 Configure service disaster and system
CN110535695A (en) * 2019-08-15 2019-12-03 上海易点时空网络有限公司 Configuration information corrigenda method and system
CN110543335A (en) * 2019-08-15 2019-12-06 上海易点时空网络有限公司 Application program configuration management method and system
CN111193717A (en) * 2019-12-06 2020-05-22 上海上讯信息技术股份有限公司 FTP black and white list control method and device and electronic equipment
CN111736874A (en) * 2020-06-28 2020-10-02 深圳前海微众银行股份有限公司 Application updating method and device
CN112507267B (en) * 2020-12-03 2023-01-20 上海哔哩哔哩科技有限公司 User preference setting synchronization method, system, device and readable storage medium
CN114301777A (en) * 2021-12-29 2022-04-08 山石网科通信技术股份有限公司 Configuration data updating method, device and system and non-volatile storage medium
CN114328130B (en) * 2022-03-03 2022-08-12 深圳市明源云科技有限公司 Server monitoring method, system, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015429A1 (en) * 2003-07-17 2005-01-20 International Business Machines Corporation Method and system for providing user control over receipt of cookies from e-commerce applications
CN103023857A (en) * 2011-09-20 2013-04-03 腾讯科技(深圳)有限公司 Method and system for remote deployment of information resources
US20130311593A1 (en) * 2012-05-17 2013-11-21 Matthew Browning Prince Incorporating web applications into web pages at the network level
CN106302596A (en) * 2015-06-03 2017-01-04 北京京东尚科信息技术有限公司 A kind of method and apparatus of service discovery

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123056B (en) * 2010-11-29 2013-07-24 东北大学 Method for monitoring quality of Web services (QoWS) in end-to-end manner
CN103812900A (en) * 2012-11-13 2014-05-21 中国移动通信集团公司 Data synchronization method, device and system
EP2897326A1 (en) * 2014-01-21 2015-07-22 Thomson Licensing System comprising an access gateway and a wide-area-network modem device, and respective access gateway and wide-area-network modem device
US9960977B2 (en) * 2015-03-02 2018-05-01 Facebook, Inc. Techniques to identify application foreground / background state based on network traffic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015429A1 (en) * 2003-07-17 2005-01-20 International Business Machines Corporation Method and system for providing user control over receipt of cookies from e-commerce applications
CN103023857A (en) * 2011-09-20 2013-04-03 腾讯科技(深圳)有限公司 Method and system for remote deployment of information resources
US20130311593A1 (en) * 2012-05-17 2013-11-21 Matthew Browning Prince Incorporating web applications into web pages at the network level
CN106302596A (en) * 2015-06-03 2017-01-04 北京京东尚科信息技术有限公司 A kind of method and apparatus of service discovery

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590331A (en) * 2021-08-05 2021-11-02 山东派盟网络科技有限公司 Task processing method, control device and storage medium

Also Published As

Publication number Publication date
CN108566290B (en) 2020-05-08
CN108566290A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
WO2019153488A1 (en) Service configuration management method, apparatus, storage medium and server
CN108737270B (en) Resource management method and device for server cluster
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
WO2019061720A1 (en) Data synchronization method and system
WO2017041398A1 (en) Data transmission method and device
CN111258627B (en) Interface document generation method and device
US9959301B2 (en) Distributing and processing streams over one or more networks for on-the-fly schema evolution
US8606908B2 (en) Wake-up server
CN112463290A (en) Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
US20230275976A1 (en) Data processing method and apparatus, and computer-readable storage medium
CN112751847A (en) Interface call request processing method and device, electronic equipment and storage medium
WO2024016624A1 (en) Multi-cluster access method and system
CN111352716A (en) Task request method, device and system based on big data and storage medium
WO2024037629A1 (en) Data integration method and apparatus for blockchain, and computer device and storage medium
US8793710B2 (en) Distributed multi-system management
US8832255B2 (en) Using status inquiry and status response messages to exchange management information
WO2019062019A1 (en) Data list exporting method and terminal using same
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
US20190324817A1 (en) Method, apparatus, and computer program product for optimization in distributed system
WO2024183352A1 (en) Method and system for user data management in 5g network by udr
WO2018188607A1 (en) Stream processing method and device
WO2024045646A1 (en) Method, apparatus and system for managing cluster access permission
CN113407384B (en) Method and device for transmitting peer node instruction, proxy server and storage medium
CN106936911B (en) Lightweight distributed computing platform and computing resource management and control method thereof
US10091068B1 (en) System for modeling distributed systems

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18905107

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.11.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18905107

Country of ref document: EP

Kind code of ref document: A1