[go: up one dir, main page]

CN111082964B - A method and device for distributing configuration information - Google Patents

A method and device for distributing configuration information Download PDF

Info

Publication number
CN111082964B
CN111082964B CN201910992490.0A CN201910992490A CN111082964B CN 111082964 B CN111082964 B CN 111082964B CN 201910992490 A CN201910992490 A CN 201910992490A CN 111082964 B CN111082964 B CN 111082964B
Authority
CN
China
Prior art keywords
target configuration
target
configuration information
task
configuration file
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910992490.0A
Other languages
Chinese (zh)
Other versions
CN111082964A (en
Inventor
黄春生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910992490.0A priority Critical patent/CN111082964B/en
Publication of CN111082964A publication Critical patent/CN111082964A/en
Application granted granted Critical
Publication of CN111082964B publication Critical patent/CN111082964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • 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/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • 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
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种配置信息的分发方法和装置,属于计算机技术领域。所述方法包括:执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;如果否,则执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。采用本发明,可以提高业务服务器的资源利用率。

Figure 201910992490

The invention discloses a method and device for distributing configuration information, belonging to the technical field of computers. The method includes: executing a target data collection task, collecting target configuration information corresponding to the target data collection task from a configuration information system; judging the target configuration information and the historical configuration collected by the last execution of the target data collection task Whether the information is the same; if not, execute the target configuration generation task corresponding to the target configuration information to generate a target configuration file; execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the target Configure the business server corresponding to the distribution task. By adopting the invention, the resource utilization rate of the service server can be improved.

Figure 201910992490

Description

一种配置信息的分发方法和装置A method and device for distributing configuration information

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种配置信息的分发方法和装置。The invention relates to the field of computer technology, in particular to a method and device for distributing configuration information.

背景技术Background technique

随着分布式技术的普及和发展,越来越多的业务服务商采用分布式技术开展业务,如CDN(Content Delivery Network,内容分发网络)服务商的配置信息分发业务。With the popularization and development of distributed technology, more and more business service providers adopt distributed technology to carry out business, such as the configuration information distribution business of CDN (Content Delivery Network, content distribution network) service providers.

配置信息通常由配置信息系统生成,由CDN系统的业务服务器所使用。以配置信息为CDN计费套餐中的计费参数(如计费模式、计费周期、价格等)为例,对现有的配置信息的分发流程进行说明。业务服务器可以通过调用配置信息系统提供的服务接口的方式,从配置信息系统处获取计费参数。当计费参数变更时,业务服务器可以通过上述获取方式从配置信息系统处获取变更后的计费参数,进而,业务服务器可以基于变更后的计费参数,对用户使用的CDN服务进行计费。The configuration information is usually generated by the configuration information system and used by the service server of the CDN system. Taking the configuration information as the billing parameters (such as billing mode, billing cycle, price, etc.) in the CDN billing package as an example, the existing configuration information distribution process is described. The service server can obtain the charging parameters from the configuration information system by calling the service interface provided by the configuration information system. When the charging parameters are changed, the service server can obtain the changed charging parameters from the configuration information system through the above acquisition method, and further, the service server can charge the CDN service used by the user based on the changed charging parameters.

在实现本发明的过程中,发明人发现现有技术至少存在以下问题:In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:

当按照上述获取方式从配置信息系统处获取配置信息时,每台业务服务器均消耗了一定的机器资源,对于部署了较多业务服务器的CDN服务商而言,业务服务器整体上用于获取配置信息所消耗的机器资源较多,总体成本较高。When obtaining configuration information from the configuration information system according to the above acquisition method, each business server consumes a certain amount of machine resources. For CDN service providers who have deployed many business servers, the business servers are used to obtain configuration information as a whole More machine resources are consumed, and the overall cost is higher.

发明内容Contents of the invention

为了解决现有技术的问题,本发明实施例提供了一种配置信息的分发方法和装置。所述技术方案如下:In order to solve the problems in the prior art, embodiments of the present invention provide a method and device for distributing configuration information. Described technical scheme is as follows:

第一方面,提供了一种配置信息的分发方法,所述方法包括:In a first aspect, a method for distributing configuration information is provided, and the method includes:

执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;Execute the target data collection task, and collect the target configuration information corresponding to the target data collection task from the configuration information system;

判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;judging whether the target configuration information is the same as the historical configuration information collected during the last execution of the target data collection task;

如果否,则执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;If not, execute the target configuration generation task corresponding to the target configuration information to generate the target configuration file;

执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。Execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the service server corresponding to the target configuration distribution task.

第二方面,提供了一种配置信息的分发装置,所述装置包括:In a second aspect, an apparatus for distributing configuration information is provided, and the apparatus includes:

采集模块,用于执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;A collection module, configured to execute a target data collection task, and collect target configuration information corresponding to the target data collection task from the configuration information system;

第一判断模块,用于判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;A first judging module, configured to judge whether the target configuration information is the same as the historical configuration information collected during the last execution of the target data collection task;

生成模块,用于执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;A generation module, configured to execute a target configuration generation task corresponding to the target configuration information, and generate a target configuration file;

分发模块,用于执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。The distribution module is configured to execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the service server corresponding to the target configuration distribution task.

第三方面,提供了一种分发设备,所述分发设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如第一方面所述的配置信息的分发方法。In a third aspect, a distribution device is provided, the distribution device includes a processor and a memory, at least one instruction, at least one program, code set or instruction set are stored in the memory, the at least one instruction, the at least A program, the code set or instruction set is loaded and executed by the processor to implement the method for distributing configuration information as described in the first aspect.

第四方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如第一方面所述的配置信息的分发方法。In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction, at least one section of program, code set or instruction set is stored in the storage medium, and the at least one instruction, the at least one section of program, the code The set or instruction set is loaded and executed by the processor to implement the method for distributing configuration information as described in the first aspect.

本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by the embodiments of the present invention are:

在本实施例中,执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;如果否,则执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。这样,分发设备可以直接将配置文件分发给业务服务器,使得业务服务器无需通过调用配置信息系统提供的服务接口的方式,从配置信息系统处获取配置信息,不仅节省了业务服务器获取配置信息所消耗的机器资源,也降低了配置信息系统面对大量业务服务器获取配置信息时的访问压力。另外,分发设备作为各业务服务器与各配置信息系统之间的中间件,解除了业务服务器与配置信息系统之间的耦合,当配置信息系统进行升级或策略变更时,业务服务器侧全程无感知,从而可以无需对大量的业务服务器升级,只需要对配置信息系统和分发设备进行升级,不仅降低了升级成本,也使得升级更加灵活。另外,由于业务服务器不再对配置信息进行整合,还可以释放出业务服务器这部分的整合能力,进一步提高了业务服务器的资源利用率。In this embodiment, the target data collection task is executed, and the target configuration information corresponding to the target data collection task is collected from the configuration information system; the target configuration information and the history collected by the last execution of the target data collection task are judged Whether the configuration information is the same; if not, execute the target configuration generation task corresponding to the target configuration information to generate a target configuration file; execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the The business server corresponding to the target configuration distribution task. In this way, the distribution device can directly distribute the configuration files to the business server, so that the business server does not need to obtain the configuration information from the configuration information system by calling the service interface provided by the configuration information system, which not only saves the time consumed by the business server to obtain configuration information Machine resources also reduce the access pressure of the configuration information system when facing a large number of business servers to obtain configuration information. In addition, the distribution device serves as the middleware between each business server and each configuration information system, which removes the coupling between the business server and the configuration information system. When the configuration information system is upgraded or the strategy is changed, the business server side has no perception throughout the process. Therefore, there is no need to upgrade a large number of business servers, and only the configuration information system and distribution equipment need to be upgraded, which not only reduces the upgrade cost, but also makes the upgrade more flexible. In addition, since the business server no longer integrates the configuration information, the integration capability of the business server can be released, further improving the resource utilization of the business server.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本发明实施例提供的一种配置信息的分发方法流程图;FIG. 1 is a flowchart of a method for distributing configuration information provided by an embodiment of the present invention;

图2是本发明实施例提供的一种分发设备架构图;FIG. 2 is an architecture diagram of a distribution device provided by an embodiment of the present invention;

图3是本发明实施例提供的一种配置信息的分发装置结构示意图;FIG. 3 is a schematic structural diagram of an apparatus for distributing configuration information provided by an embodiment of the present invention;

图4是本发明实施例提供的一种配置信息的分发装置结构示意图;FIG. 4 is a schematic structural diagram of an apparatus for distributing configuration information provided by an embodiment of the present invention;

图5是本发明实施例提供的一种配置信息的分发装置结构示意图。Fig. 5 is a schematic structural diagram of an apparatus for distributing configuration information provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

本发明实施例提供了一种配置信息的分发方法,该方法的执行主体可以是CDN系统中的分发设备,分发设备可以为单台服务器,也可以由多台服务器组成,服务器可以预装有运行环境,如JDK(Java SE Development Kit,Java开发工具包)、mysql数据库、redis、zookeeper等。上述分发设备可以从各个配置信息系统处获取配置信息,对配置信息进行整合,然后可以将整合完毕的配置信息分发至相应的业务服务器。上述分发设备可以包括处理器、存储器、收发器,处理器可以用于进行下述流程中对于配置信息的分发处理,存储器可以用于存储处理过程中需要的数据以及产生的数据,收发器可以用于接收和发送处理过程中的相关数据。The embodiment of the present invention provides a method for distributing configuration information. The execution subject of the method may be a distribution device in a CDN system. The distribution device may be a single server or may consist of multiple servers. The server may be pre-installed with a Environment, such as JDK (Java SE Development Kit, Java Development Kit), mysql database, redis, zookeeper, etc. The above distribution device can obtain configuration information from various configuration information systems, integrate the configuration information, and then distribute the integrated configuration information to corresponding service servers. The distribution device above may include a processor, a memory, and a transceiver. The processor may be used for distributing configuration information in the following processes. The memory may be used to store data required and generated during the processing. The transceiver may use Relevant data in the process of receiving and sending.

下面将结合具体实施方式,对图1所示的一种配置信息的分发方法的处理流程进行详细的说明,内容可以如下:The processing flow of a method for distributing configuration information shown in FIG. 1 will be described in detail below in conjunction with specific implementation methods, and the content may be as follows:

步骤101,执行目标数据采集任务,从配置信息系统处采集目标数据采集任务对应的目标配置信息。Step 101, execute the target data collection task, and collect the target configuration information corresponding to the target data collection task from the configuration information system.

在实施中,分发设备可以通过任务队列的方式对配置信息进行分发处理,任务队列可以包括数据采集任务队列、配置生成任务队列、配置分发任务队列等任务队列,每个任务队列中均可以包含若干个任务。CDN系统的运维人员可以预先在分发设备中配置上述任务队列和队列中的任务,以及各任务的任务执行条件。分发设备可以按照任务在任务队列中的排列顺序,依次从上述任务队列中取出任务,如果符合任务执行条件,则分发设备可以执行该任务;如果不符合任务执行条件,则分发设备可以将该任务放回任务队列。具体的,分发设备可以采用多线程处理模式,当某个线程从任务队列中取出任务时,该线程可以对该任务进行锁定,如采用分布式锁,以防止其他线程处理到同一个任务;当该任务执行完毕,或者不符合任务执行条件时,上述线程可以对该任务解锁,然后将该任务放回至任务队列。In implementation, the distribution device can distribute and process configuration information through task queues. Task queues can include task queues such as data collection task queues, configuration generation task queues, and configuration distribution task queues. Each task queue can contain several tasks. The operation and maintenance personnel of the CDN system can pre-configure the above task queue and the tasks in the queue in the distribution device, as well as the task execution conditions of each task. The distribution device can sequentially take out tasks from the above task queue according to the order in which the tasks are arranged in the task queue. If the task execution conditions are met, the distribution device can execute the task; if the task execution conditions are not met, the distribution device can execute the task. Put it back in the task queue. Specifically, the distribution device can adopt a multi-thread processing mode. When a thread takes out a task from the task queue, the thread can lock the task, such as using a distributed lock, to prevent other threads from processing the same task; When the task is completed or does not meet the task execution conditions, the above-mentioned thread can unlock the task, and then put the task back into the task queue.

以某数据采集任务(可称为目标数据采集任务)为例,当分发设备从数据采集任务队列中取出该目标数据采集任务,且符合执行条件时,分发设备可以执行目标数据采集任务,从配置信息系统处采集目标数据采集任务所对应的配置信息(可称为目标配置信息)。Taking a certain data collection task (which can be called a target data collection task) as an example, when the distribution device takes out the target data collection task from the data collection task queue and meets the execution conditions, the distribution device can execute the target data collection task. The information system collects configuration information corresponding to the target data collection task (may be referred to as target configuration information).

可选的,数据采集任务的执行条件可以是周期性执行,相应的,上述执行目标数据采集任务的处理可以如下:获取当前时刻与上一次执行目标数据采集任务的执行时刻的差值;如果差值大于等于预设执行周期,则执行目标数据采集任务。Optionally, the execution condition of the data collection task can be executed periodically. Correspondingly, the processing of the above-mentioned execution target data collection task can be as follows: obtain the difference between the current time and the execution time of the last time the target data collection task is executed; If the value is greater than or equal to the preset execution period, the target data collection task will be executed.

在实施中,分发设备在从数据采集任务队列中取出目标数据采集任务后,可以判断目标数据采集任务是否符合任务执行条件,以确定是否执行目标数据采集任务。具体的,分发设备可以对当前时刻与上一次执行目标数据采集任务的执行时刻进行做差处理,获取当前时刻与上一次执行目标数据采集任务的执行时刻的差值。之后,分发设备可以比较上述差值与预设执行周期的大小关系。如果差值大于等于预设执行周期,则表明当前周期内目标数据采集任务还未执行,由此判断符合任务执行条件,分发设备可以执行目标数据采集任务;如果差值小于预设执行周期,则表明当前周期内目标数据采集任务已执行,由此判断不符合任务执行条件,分发设备可以将目标数据采集任务放回数据采集任务队列。In implementation, after the distribution device takes out the target data collection task from the data collection task queue, it can judge whether the target data collection task meets the task execution conditions, so as to determine whether to execute the target data collection task. Specifically, the distribution device may perform difference processing on the current time and the last execution time of the target data collection task, and obtain the difference between the current time and the last execution time of the target data collection task. Afterwards, the distribution device may compare the relationship between the above difference and the preset execution period. If the difference is greater than or equal to the preset execution cycle, it indicates that the target data collection task has not been executed in the current cycle, so it is judged that the task execution condition is met, and the distribution device can execute the target data collection task; if the difference is less than the preset execution cycle, then Indicates that the target data collection task has been executed in the current period, and thus it is judged that the task execution condition is not met, and the distribution device can put the target data collection task back into the data collection task queue.

步骤102,判断目标配置信息与上一次执行目标数据采集任务所采集的历史配置信息是否相同。Step 102, judging whether the target configuration information is the same as the historical configuration information collected in the last execution of the target data collection task.

在实施中,分发设备可以并行对它类别的任务进行处理。当分发设备从数据采集任务队列中取出目标配置信息对应的配置生成任务(可称为目标配置生成任务)时,分发设备可以对目标配置生成任务是否符合任务执行条件进行判断,以确定是否执行目标配置生成任务。容易理解的是,对于已处理的配置信息将不再重复处理,故而已处理的配置信息对应的配置生成任务将不再执行。具体的,分发设备可以通过比较目标配置信息与上一次执行目标数据采集任务所采集的历史配置信息是否相同的方式,来判断目标配置生成任务是否符合任务执行条件。In an implementation, the distribution device may process its class of tasks in parallel. When the distribution device takes out the configuration generation task corresponding to the target configuration information (which may be called the target configuration generation task) from the data collection task queue, the distribution device can judge whether the target configuration generation task meets the task execution conditions to determine whether to execute the target Configure build tasks. It is easy to understand that the processed configuration information will not be repeatedly processed, so the configuration generation task corresponding to the processed configuration information will not be executed again. Specifically, the distribution device can determine whether the target configuration generation task meets the task execution conditions by comparing whether the target configuration information is the same as the historical configuration information collected during the last execution of the target data collection task.

可选的,可以根据MD5(Message Digest 5,消息摘要算法第五版)值来判断目标配置信息与上一次执行目标数据采集任务所采集的历史配置信息是否相同,相应的处理可以如下:获取目标配置信息的MD5值;如果目标配置信息的MD5值和历史配置信息的MD5值相同,则判断目标配置信息与历史配置信息相同,否则判断目标配置信息与历史配置信息不相同。Optionally, it can be judged whether the target configuration information is the same as the historical configuration information collected by the last execution of the target data collection task according to the MD5 (Message Digest 5, message digest algorithm fifth edition) value, and the corresponding processing can be as follows: obtain the target The MD5 value of the configuration information; if the MD5 value of the target configuration information is the same as the MD5 value of the historical configuration information, it is determined that the target configuration information is the same as the historical configuration information, otherwise it is determined that the target configuration information is different from the historical configuration information.

在实施中,分发设备在执行完数据采集任务后,可以对采集的配置信息进行存档。这样,分发设备可以分别获取到目标配置信息的MD5值,以及分发设备上一次执行目标数据采集任务所采集的历史配置信息的MD5值。之后,分发设备可以通过MD5值来判断目标配置信息与历史配置信息是否相同。具体的,如果目标配置信息的MD5值和历史配置信息的MD5值相同,则分发设备可以判断目标配置信息与历史配置信息相同;如果目标配置信息的MD5值和历史配置信息的MD5值不同,则分发设备可以判断目标配置信息与历史配置信息不相同。In implementation, after the distribution device completes the data collection task, it can archive the collected configuration information. In this way, the distribution device can separately obtain the MD5 value of the target configuration information and the MD5 value of the historical configuration information collected by the distribution device last time it executed the target data collection task. Afterwards, the distribution device can judge whether the target configuration information is the same as the historical configuration information through the MD5 value. Specifically, if the MD5 value of the target configuration information is the same as the MD5 value of the historical configuration information, the distribution device can determine that the target configuration information is the same as the historical configuration information; if the MD5 value of the target configuration information is different from the MD5 value of the historical configuration information, then The distribution device may determine that the target configuration information is different from the historical configuration information.

步骤103,如果否,则执行目标配置信息对应的目标配置生成任务,生成目标配置文件。Step 103, if not, execute the target configuration generation task corresponding to the target configuration information to generate the target configuration file.

在实施中,如果目标配置信息与历史配置信息不相同,则分发设备可以判断目标配置生成任务符合任务执行条件,从而分发设备可以执行目标配置信息对应的目标配置生成任务,以生成目标配置文件。进一步的,为了便于判断后续的配置生成任务是否执行,分发设备可以将记录的历史配置信息更新为目标配置信息,并对目标配置信息的MD5值以及采集时间进行记录,作为判断依据。In implementation, if the target configuration information is different from the historical configuration information, the distribution device can determine that the target configuration generation task meets the task execution conditions, so that the distribution device can execute the target configuration generation task corresponding to the target configuration information to generate the target configuration file. Further, in order to judge whether the subsequent configuration generation task is executed, the distribution device may update the recorded historical configuration information to the target configuration information, and record the MD5 value and collection time of the target configuration information as a basis for judgment.

可选的,上述步骤103中的执行目标配置信息对应的目标配置生成任务,生成目标配置文件的处理,具体可以如下:如果目标配置生成任务附带有数据整合规则,则根据数据整合规则对目标配置信息进行整合,并对整合后的目标配置信息进行打包,生成目标配置文件,否则对目标配置信息进行打包,生成目标配置文件。Optionally, the execution of the target configuration generation task corresponding to the target configuration information in the above step 103, and the processing of generating the target configuration file can be specifically as follows: if the target configuration generation task is accompanied by a data integration rule, the target configuration is configured according to the data integration rule. Information is integrated, and the integrated target configuration information is packaged to generate a target configuration file; otherwise, the target configuration information is packaged to generate a target configuration file.

在实施中,通常情况下,配置信息可以包括分发设备从配置信息系统处采集的第一类配置信息,以及人工上传的第二类配置信息。运维人员可以对上述两类配置信息对应的配置生成任务进行分别配置,对于第一类配置信息,其对应的配置生成任务可以附带有数据整合规则,如perl、shell、python等脚本文件;对于第二类配置信息,由于已经过人工整合处理,故而其对应的配置生成任务无需附带数据整合规则。这样,分发设备可以根据目标配置生成任务是否附带有数据整合规则,来执行目标配置生成任务。具体的,如果目标配置生成任务附带有数据整合规则,则分发设备可以根据其附带的数据整合规则对目标配置信息进行整合,待整合完毕后,分发设备可以对整合后的目标配置信息进行打包,以生成目标配置文件。如果目标配置生成任务没有附带有数据整合规则,则分发设备可以直接对目标配置信息进行打包,以生成目标配置文件。In an implementation, generally, the configuration information may include the first type of configuration information collected by the distribution device from the configuration information system, and the second type of configuration information uploaded manually. Operation and maintenance personnel can separately configure the configuration generation tasks corresponding to the above two types of configuration information. For the first type of configuration information, the corresponding configuration generation tasks can be accompanied by data integration rules, such as script files such as perl, shell, and python; The second type of configuration information has been manually integrated, so the corresponding configuration generation tasks do not need to be accompanied by data integration rules. In this way, the distribution device can execute the target configuration generation task according to whether the target configuration generation task is accompanied by a data integration rule. Specifically, if the target configuration generation task is accompanied by data integration rules, the distribution device can integrate the target configuration information according to the attached data integration rules. After the integration is completed, the distribution device can package the integrated target configuration information. to generate the target configuration file. If there is no data integration rule attached to the target configuration generation task, the distribution device may directly package the target configuration information to generate the target configuration file.

可选的,分发设备在生成目标配置文件之后,可以进行如下处理:判断目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件是否相同。Optionally, after the distribution device generates the target configuration file, it may perform the following processing: determine whether the target configuration file is the same as the historical configuration file generated by executing the target configuration generation task last time.

在实施中,当生成目标配置文件后,或者在存在校验处理流程且对目标配置文件校验成功后,分发设备可以对目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件是否相同进行判断,以确定是否对此次生成的目标配置文件进行分发处理。容易理解的是,对于重复生成的配置文件,分发设备将不再对其进行分发处理。具体的,分发设备可以采用上述比对MD5值的方式,来判断目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件是否相同。如果目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件不同,则分发设备可以执行目标配置文件对应的目标配置分发任务,同时,可以记录目标配置文件的版本信息,便于运维人员查看各配置文件的版本历史,跟踪历史配置情况,进行问题排查。如果目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件相同,则分发设备不再对目标配置文件进行分发处理。In implementation, after the target configuration file is generated, or after the verification process exists and the target configuration file is successfully verified, the distribution device can check whether the target configuration file is consistent with the historical configuration file generated by the last execution of the target configuration generation task. The same judgment is made to determine whether to distribute the target configuration file generated this time. It is easy to understand that, for repeatedly generated configuration files, the distribution device will no longer distribute them. Specifically, the distribution device may use the above method of comparing MD5 values to determine whether the target configuration file is the same as the historical configuration file generated by executing the target configuration generation task last time. If the target configuration file is different from the historical configuration file generated by the last execution of the target configuration generation task, the distribution device can execute the target configuration distribution task corresponding to the target configuration file. At the same time, it can record the version information of the target configuration file, which is convenient for operation and maintenance personnel View the version history of each configuration file, track historical configurations, and troubleshoot problems. If the target configuration file is the same as the historical configuration file generated by executing the target configuration generation task last time, the distribution device will no longer distribute the target configuration file.

可选的,分发设备可以对生成的目标配置文件进行校验,相应的处理可以如下:校验目标配置文件;如果校验成功,则判断目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件是否相同;如果校验失败,则拦截目标配置文件,发出告警信息。Optionally, the distribution device can verify the generated target configuration file, and the corresponding processing can be as follows: verify the target configuration file; Whether the historical configuration files are the same; if the verification fails, the target configuration file will be intercepted and an alarm message will be issued.

在实施中,为了确保配置文件的完整,分发设备在生成目标配置文件后,可以对目标配置文件进行校验。具体的,分发设备可以按照校验规则对目标配置文件的内容进行校验,如校验脚本文件。如果校验成功,则分发设备可以进行下一步处理,即判断目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件是否相同。如果校验失败,则分发设备可以对目标配置文件进行拦截,同时发出告警信息,如收件人为运维人员的电子邮件等。In implementation, in order to ensure the integrity of the configuration file, the distribution device may verify the target configuration file after generating the target configuration file. Specifically, the distribution device may verify the content of the target configuration file according to the verification rule, such as verifying the script file. If the verification is successful, the distribution device can proceed to the next step of processing, that is, to judge whether the target configuration file is the same as the historical configuration file generated by executing the target configuration generation task last time. If the verification fails, the distribution device can intercept the target configuration file, and at the same time send out an alarm message, such as an email addressed to the operation and maintenance personnel.

步骤104,执行目标配置文件对应的目标配置分发任务,将目标配置文件分发至目标配置分发任务对应的业务服务器。Step 104, execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the service server corresponding to the target configuration distribution task.

在实施中,分发设备在判断出目标配置文件与上一次执行目标配置生成任务所生成的历史配置文件不同后,可以执行目标配置文件对应的目标配置分发任务,将目标配置文件分发至目标配置分发任务对应的业务服务器,从而可以实现配置信息的分发处理。进一步的,为了便于判断后续的配置分发任务是否执行,分发设备可以将记录的历史配置文件更新为目标配置文件,并对目标配置文件的MD5值进行记录,作为判断依据。这样,分发设备可以作为各业务服务器与各配置信息系统之间的中间件,解除了业务服务器与配置信息系统之间的耦合,进而当配置信息系统进行升级或策略变更时,业务服务器侧能够无感知,从而可以无需对大量的业务服务器升级,只需要对配置信息系统和分发设备进行升级,不仅降低了升级成本,也使得升级更加灵活。另外,业务服务器可以无需通过调用配置信息系统提供的服务接口的方式,从配置信息系统处获取配置信息,不仅节省了业务服务器获取配置信息所消耗的机器资源,也降低了配置信息系统面对大量业务服务器获取配置信息时的访问压力。进一步的,由于业务服务器不再对配置信息进行整合,从而可以释放出这部分的整合能力,有效提高业务服务器的资源利用率。In implementation, after the distribution device determines that the target configuration file is different from the historical configuration file generated by executing the target configuration generation task last time, it can execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the target configuration distribution The business server corresponding to the task can realize the distribution and processing of configuration information. Further, in order to judge whether the subsequent configuration distribution task is executed, the distribution device may update the recorded historical configuration file to the target configuration file, and record the MD5 value of the target configuration file as a basis for judgment. In this way, the distribution device can be used as the middleware between each business server and each configuration information system, which removes the coupling between the business server and the configuration information system, and then when the configuration information system is upgraded or the policy is changed, the business server side can Perception, so that there is no need to upgrade a large number of business servers, only the configuration information system and distribution equipment need to be upgraded, which not only reduces the upgrade cost, but also makes the upgrade more flexible. In addition, the business server can obtain configuration information from the configuration information system without calling the service interface provided by the configuration information system. Access pressure when the business server obtains configuration information. Further, since the service server no longer integrates the configuration information, this part of the integration capability can be released, effectively improving the resource utilization of the service server.

可选的,上述步骤104中的执行目标配置文件对应的目标配置分发任务,将目标配置文件分发至目标配置分发任务对应的业务服务器的处理,具体可以如下:获取目标配置分发任务对应的所有待分发群组各自的服务器列表;将目标配置文件分发至所有服务器列表中记录的业务服务器。Optionally, the execution of the target configuration distribution task corresponding to the target configuration file in the above step 104, and the processing of distributing the target configuration file to the service server corresponding to the target configuration distribution task can be specifically as follows: obtain all pending Distribute the group's respective server lists; distribute the target configuration files to all business servers recorded in the server list.

在实施中,运维人员可以预先对业务服务器进行群组划分,如按照业务类别来进行划分,这样,分发设备可以在同一时间段内统一对某类业务所对应的业务服务器推送配置文件,确保这些业务服务器可以及时按照最新的配置文件处理业务,保证业务处理的统一和准确。具体的,分发设备可以维护有各个群组的服务器列表,列表中可以记录有相应业务服务器的通信标识,如IP(Internet Protocol,网络互连协议)地址、MAC(Media AccessControl,媒体访问控制)地址等。这样,分发设备在执行目标配置文件对应的目标配置分发任务时,可以根据获取的目标配置分发任务对应的所有待分发群组各自的服务器列表,将目标配置文件分发至所有服务器列表中记录的业务服务器。进一步的,如果存在分发失败的群组,如群组中存在分发失败的业务服务器或者新增的业务服务器,则分发设备可以周期性对分发失败的群组再次分发目标配置文件,即将目标配置文件分发至分发失败的业务服务器或者新增的业务服务器,直至目标配置文件成功分发至所有的群组。In the implementation, the operation and maintenance personnel can divide the business servers into groups in advance, for example, according to the business category, so that the distribution device can uniformly push the configuration files to the business servers corresponding to a certain type of business within the same period of time to ensure These service servers can process services in a timely manner according to the latest configuration files to ensure uniform and accurate service processing. Specifically, the distribution device can maintain a server list of each group, and the communication identification of the corresponding service server can be recorded in the list, such as IP (Internet Protocol, network interconnection protocol) address, MAC (Media Access Control, media access control) address wait. In this way, when the distribution device executes the target configuration distribution task corresponding to the target configuration file, it can distribute the target configuration file to the services recorded in all the server lists according to the obtained server lists of all groups to be distributed corresponding to the target configuration distribution task. server. Further, if there is a group that fails to distribute, such as a service server that fails to distribute or a newly added service server in the group, the distribution device can periodically redistribute the target configuration file to the group that fails to distribute, that is, the target configuration file Distribute to the business server that fails to distribute or the newly added business server until the target configuration file is successfully distributed to all groups.

下面给出一种分发设备的架构图,如图2所示,分发设备可以包括管理平台、任务调度模块、数据采集模块、配置整合模块、配置分发模块以及任务信息通道、数据库等运行环境。An architecture diagram of a distribution device is given below. As shown in Figure 2, the distribution device may include a management platform, a task scheduling module, a data collection module, a configuration integration module, a configuration distribution module, and operating environments such as task information channels and databases.

管理平台可以是web应用,运维人员可以登陆管理平台,在线进行管理配置,如群组配置、采集策略管理、灰度测试、配置整合策略等,提供一站式管理站点。值得一提的是,由于分发设备采用分发配置文件的方式,运维人员可以更加便捷地进行线上灰度测试。The management platform can be a web application. Operation and maintenance personnel can log in to the management platform and perform online management configurations, such as group configuration, collection policy management, grayscale testing, and configuration integration strategies, etc., providing a one-stop management site. It is worth mentioning that since the distribution device adopts the method of distributing configuration files, operation and maintenance personnel can conduct online grayscale testing more conveniently.

任务调度模块,可以对各类任务进行调度及维护。The task scheduling module can schedule and maintain various tasks.

数据采集模块,可以根据预先设定好的采集参数,通过分布式作业方式采集配置数据,并存储在服务器磁盘中。The data collection module can collect configuration data through distributed operations according to preset collection parameters and store them in the server disk.

配置整合模块,可以通过分布式作业方式,按照管理平台上已生效的配置参数,生成配置文件,并存储在服务器磁盘中。The configuration integration module can generate configuration files according to the configuration parameters that have taken effect on the management platform through distributed operations, and store them in the server disk.

配置分发模块,可以通过分布式作业方式,按照管理平台上维护的分发策略,将生成的配置文件分发到相应的业务服务器中。The configuration distribution module can distribute the generated configuration files to the corresponding business servers in accordance with the distribution strategy maintained on the management platform through distributed operations.

任务信息通道,可以基于redis、zookeeper搭建,用于传输任务执行时所需的各类数据,如配置信息、配置文件等。值得一提的是,上述任务调度模块、数据采集模块、配置整合模块以及配置分发模块可以并行运行,其运行顺序不分先后,各个模块可以独立与任务信息通道进行数据交互。The task information channel can be built based on redis and zookeeper, and is used to transmit various data required for task execution, such as configuration information and configuration files. It is worth mentioning that the above-mentioned task scheduling module, data collection module, configuration integration module and configuration distribution module can run in parallel, and their running order is not in particular order, and each module can independently interact with the task information channel for data.

在本实施例中,执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;如果否,则执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。这样,分发设备可以直接将配置文件分发给业务服务器,使得业务服务器无需通过调用配置信息系统提供的服务接口的方式,从配置信息系统处获取配置信息,不仅节省了业务服务器获取配置信息所消耗的机器资源,也降低了配置信息系统面对大量业务服务器获取配置信息时的访问压力。另外,分发设备作为各业务服务器与各配置信息系统之间的中间件,解除了业务服务器与配置信息系统之间的耦合,当配置信息系统进行升级或策略变更时,业务服务器侧无感知,从而可以无需对大量的业务服务器升级,只需要对配置信息系统和分发设备进行升级,不仅降低了升级成本,也使得升级更加灵活。另外,由于业务服务器不再对配置信息进行整合,还可以释放出业务服务器这部分的整合能力,进一步提高了业务服务器的资源利用率。In this embodiment, the target data collection task is executed, and the target configuration information corresponding to the target data collection task is collected from the configuration information system; the target configuration information and the history collected by the last execution of the target data collection task are judged Whether the configuration information is the same; if not, execute the target configuration generation task corresponding to the target configuration information to generate a target configuration file; execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the The business server corresponding to the target configuration distribution task. In this way, the distribution device can directly distribute the configuration files to the business server, so that the business server does not need to obtain the configuration information from the configuration information system by calling the service interface provided by the configuration information system, which not only saves the time consumed by the business server to obtain configuration information Machine resources also reduce the access pressure of the configuration information system when facing a large number of business servers to obtain configuration information. In addition, the distribution device serves as the middleware between each business server and each configuration information system, which removes the coupling between the business server and the configuration information system. When the configuration information system is upgraded or the policy is changed, the business server side has no perception, thus There is no need to upgrade a large number of business servers, only the configuration information system and distribution equipment need to be upgraded, which not only reduces the upgrade cost, but also makes the upgrade more flexible. In addition, since the business server no longer integrates the configuration information, the integration capability of the business server can be released, further improving the resource utilization of the business server.

基于相同的技术构思,本发明实施例还提供了一种配置信息的分发装置,如图3所示,所述装置包括:Based on the same technical concept, an embodiment of the present invention also provides a device for distributing configuration information, as shown in Figure 3, the device includes:

采集模块301,用于执行目标数据采集任务,从配置信息系统处采集所述目标数据采集任务对应的目标配置信息;The collection module 301 is configured to execute the target data collection task, and collect the target configuration information corresponding to the target data collection task from the configuration information system;

第一判断模块302,用于判断所述目标配置信息与上一次执行所述目标数据采集任务所采集的历史配置信息是否相同;A first judging module 302, configured to judge whether the target configuration information is the same as the historical configuration information collected during the last execution of the target data collection task;

生成模块303,用于执行所述目标配置信息对应的目标配置生成任务,生成目标配置文件;A generation module 303, configured to execute a target configuration generation task corresponding to the target configuration information, and generate a target configuration file;

分发模块304,用于执行所述目标配置文件对应的目标配置分发任务,将所述目标配置文件分发至所述目标配置分发任务对应的业务服务器。The distribution module 304 is configured to execute the target configuration distribution task corresponding to the target configuration file, and distribute the target configuration file to the service server corresponding to the target configuration distribution task.

可选的,所述采集模块301,还用于:Optionally, the collection module 301 is also used for:

获取当前时刻与上一次执行所述目标数据采集任务的执行时刻的差值;Acquiring the difference between the current moment and the last execution moment of the target data collection task;

如果所述差值大于等于预设执行周期,则执行所述目标数据采集任务。If the difference is greater than or equal to a preset execution period, the target data collection task is executed.

可选的,所述第一判断模块302,还用于:Optionally, the first judging module 302 is also configured to:

获取所述目标配置信息的MD5值;Obtain the MD5 value of the target configuration information;

如果所述目标配置信息的MD5值和所述历史配置信息的MD5值相同,则判断所述目标配置信息与所述历史配置信息相同,否则判断所述目标配置信息与所述历史配置信息不相同。If the MD5 value of the target configuration information is the same as the MD5 value of the historical configuration information, it is judged that the target configuration information is the same as the historical configuration information, otherwise it is judged that the target configuration information is different from the historical configuration information .

可选的,所述生成模块303,还用于:Optionally, the generating module 303 is also used for:

如果所述目标配置生成任务附带有数据整合规则,则根据所述数据整合规则对所述目标配置信息进行整合,并对整合后的目标配置信息进行打包,生成所述目标配置文件,否则对所述目标配置信息进行打包,生成目标配置文件。If the target configuration generation task is accompanied by data integration rules, the target configuration information is integrated according to the data integration rules, and the integrated target configuration information is packaged to generate the target configuration file; otherwise, all Package the above target configuration information to generate a target configuration file.

可选的,如图4所示,所述装置还包括第二判断模块305,用于:Optionally, as shown in FIG. 4, the device further includes a second judging module 305, configured to:

在生成目标配置文件之后,判断所述目标配置文件与上一次执行所述目标配置生成任务所生成的历史配置文件是否相同。After the target configuration file is generated, it is judged whether the target configuration file is the same as the historical configuration file generated by executing the target configuration generating task last time.

可选的,如图5所示,所述装置还包括校验模块306,用于:Optionally, as shown in FIG. 5, the device further includes a verification module 306, configured to:

在生成目标配置文件后,校验所述目标配置文件;After generating the target configuration file, verifying the target configuration file;

如果校验成功,则由所述第二判断模块305判断所述目标配置文件与上一次执行所述目标配置生成任务所生成的历史配置文件是否相同;If the verification is successful, the second judging module 305 judges whether the target configuration file is the same as the historical configuration file generated by executing the target configuration generation task last time;

如果校验失败,则拦截所述目标配置文件,发出告警信息。If the verification fails, the target configuration file is intercepted and an alarm message is issued.

可选的,所述分发模块304,还用于:Optionally, the distribution module 304 is further configured to:

获取所述目标配置分发任务对应的所有待分发群组各自的服务器列表;Obtain the respective server lists of all groups to be distributed corresponding to the target configuration distribution task;

将所述目标配置文件分发至所有所述服务器列表中记录的业务服务器。Distributing the target configuration file to all service servers recorded in the server list.

需要说明的是:上述实施例提供的配置信息的分发装置在进行配置信息的分发处理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的配置信息的分发装置与配置信息的分发方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the configuration information distribution device provided by the above-mentioned embodiment performs distribution processing of configuration information, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned functions can be allocated by different The functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for distributing configuration information provided by the above embodiment and the embodiment of the method for distributing configuration information belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.

基于相同的技术构思,本发明实施例还提供了一种分发设备,所述分发设备可因配置或性能不同而产生较大的差异,包括一个和一个以上存储器和处理器,其中,存储器可以是短暂存储或永久存储。存储器可以存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现上述步骤101-步骤104中配置信息的分发处理。Based on the same technical concept, an embodiment of the present invention also provides a distribution device, which may have large differences due to different configurations or performances, including one or more memory and processors, where the memory may be Temporary storage or permanent storage. The memory may store at least one instruction, at least one section of program, code set or instruction set, the at least one instruction, the at least one section of program, the code set or instruction set are loaded and executed by the processor to implement the above step 101 - Distribution process of configuration information in step 104 .

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (9)

1. A method for distributing configuration information, wherein the method is applied to a distribution device, and the method comprises the following steps:
executing a target data acquisition task, and acquiring target configuration information corresponding to the target data acquisition task from a configuration information system;
judging whether the target configuration information is the same as historical configuration information acquired by executing the target data acquisition task last time;
if not, executing a target configuration generation task corresponding to the target configuration information, and generating a target configuration file, wherein the target configuration generation task comprises the following steps: if the target configuration generation task is accompanied by a data integration rule, integrating the target configuration information according to the data integration rule, packaging the integrated target configuration information to generate a target configuration file, and otherwise, packaging the target configuration information to generate a target configuration file;
and executing a target configuration distribution task corresponding to the target configuration file, and distributing the target configuration file to a service server corresponding to the target configuration distribution task.
2. The method of claim 1, wherein performing a target data collection task comprises:
acquiring a difference value between the current moment and the execution moment of executing the target data acquisition task last time;
and if the difference value is larger than or equal to a preset execution period, executing the target data acquisition task.
3. The method according to claim 1, wherein after the executing the target configuration generation task corresponding to the target configuration information and generating the target configuration file, the method further comprises:
and judging whether the target configuration file is the same as a historical configuration file generated by executing the target configuration generation task last time.
4. The method according to claim 1, wherein after the executing the target configuration generation task corresponding to the target configuration information generates the target configuration file, the method further comprises:
verifying the target configuration file;
if the verification is successful, judging whether the target configuration file is the same as a historical configuration file generated by executing the target configuration generation task last time;
and if the verification fails, intercepting the target configuration file and sending out alarm information.
5. The method according to claim 1, wherein the executing a target configuration distribution task corresponding to the target configuration file and distributing the target configuration file to a service server corresponding to the target configuration distribution task includes:
acquiring respective server lists of all groups to be distributed corresponding to the target configuration distribution task;
and distributing the target configuration file to all the service servers recorded in the server list.
6. An apparatus for distributing configuration information, the apparatus being applied to a distribution device, the apparatus comprising:
the acquisition module is used for executing a target data acquisition task and acquiring target configuration information corresponding to the target data acquisition task from a configuration information system;
the first judgment module is used for judging whether the target configuration information is the same as the historical configuration information acquired by executing the target data acquisition task last time;
a generating module, configured to execute a target configuration generating task corresponding to the target configuration information, and generate a target configuration file, where the generating module includes: if the target configuration generation task is accompanied by a data integration rule, integrating the target configuration information according to the data integration rule, packaging the integrated target configuration information to generate a target configuration file, otherwise, packaging the target configuration information to generate the target configuration file;
and the distribution module is used for executing a target configuration distribution task corresponding to the target configuration file and distributing the target configuration file to a service server corresponding to the target configuration distribution task.
7. The apparatus of claim 6, wherein the acquisition module is further configured to:
acquiring a difference value between the current moment and the execution moment of executing the target data acquisition task last time;
and if the difference value is larger than or equal to a preset execution period, executing the target data acquisition task.
8. A distribution device, characterized in that the distribution device comprises a processor and a memory, in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the distribution method of configuration information according to any one of claims 1 to 5.
9. A computer-readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of distributing configuration information according to any one of claims 1 to 5.
CN201910992490.0A 2019-10-18 2019-10-18 A method and device for distributing configuration information Active CN111082964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910992490.0A CN111082964B (en) 2019-10-18 2019-10-18 A method and device for distributing configuration information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910992490.0A CN111082964B (en) 2019-10-18 2019-10-18 A method and device for distributing configuration information

Publications (2)

Publication Number Publication Date
CN111082964A CN111082964A (en) 2020-04-28
CN111082964B true CN111082964B (en) 2023-03-03

Family

ID=70310502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910992490.0A Active CN111082964B (en) 2019-10-18 2019-10-18 A method and device for distributing configuration information

Country Status (1)

Country Link
CN (1) CN111082964B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860343B (en) * 2021-02-10 2024-04-23 北京百度网讯科技有限公司 Configuration change method, system, device, electronic device and storage medium
CN114389942B (en) * 2022-01-11 2024-06-04 北京金山云网络技术有限公司 CDN configuration method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014090070A1 (en) * 2012-12-13 2014-06-19 Tencent Technology (Shenzhen) Company Limited Method and system for managing servers
CN104092555A (en) * 2013-12-04 2014-10-08 腾讯数码(天津)有限公司 Parameter value updating method, device and system
CN105162667A (en) * 2015-09-10 2015-12-16 华为技术有限公司 Method and device for configuration of virtual machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014090070A1 (en) * 2012-12-13 2014-06-19 Tencent Technology (Shenzhen) Company Limited Method and system for managing servers
CN104092555A (en) * 2013-12-04 2014-10-08 腾讯数码(天津)有限公司 Parameter value updating method, device and system
CN105162667A (en) * 2015-09-10 2015-12-16 华为技术有限公司 Method and device for configuration of virtual machine

Also Published As

Publication number Publication date
CN111082964A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN106844198B (en) Distributed dispatching automation test platform and method
EP2510653B1 (en) Cloud computing monitoring and management system
CN110324417B (en) Cloud service execution body dynamic reconstruction method based on mimicry defense
US20150095917A1 (en) Distributed uima cluster computing (ducc) facility
US8863137B2 (en) Systems and methods for automated provisioning of managed computing resources
US8713163B2 (en) Monitoring cloud-runtime operations
US9602599B2 (en) Coordinating application migration processes
CN111858054B (en) Resource scheduling system and method based on edge computing in heterogeneous environment
US20110213875A1 (en) Methods and Systems for Providing Deployment Architectures in Cloud Computing Environments
US20090300423A1 (en) Systems and methods for software test management in cloud-based network
US11748168B2 (en) Flexible batch job scheduling in virtualization environments
CN111026602A (en) Health inspection scheduling management method and device of cloud platform and electronic equipment
US20180314549A1 (en) Operational micro-services design, development, deployment
CN108243012A (en) Billing application processing system, method and device in online billing system OCS
CN114422386B (en) Monitoring method and device for micro-service gateway
US20120215583A1 (en) System and method for managing real-time batch workflows
CN109614227A (en) Task resource allocation method, apparatus, electronic device, and computer-readable medium
WO2023197453A1 (en) Fault diagnosis method and apparatus, device, and storage medium
US20090144743A1 (en) Mailbox Configuration Mechanism
US20220182851A1 (en) Communication Method and Apparatus for Plurality of Administrative Domains
CN111082964B (en) A method and device for distributing configuration information
CN109902028A (en) Automated testing method, device, equipment and the storage medium of ACL characteristic
CN115812298A (en) Block chain management of supply failure
CN112925648A (en) Service policy issuing method and device
US10122602B1 (en) Distributed system infrastructure testing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant