Movatterモバイル変換


[0]ホーム

URL:


CN118656098A - Configuration data updating method, device, computer equipment, readable storage medium and program product - Google Patents

Configuration data updating method, device, computer equipment, readable storage medium and program product
Download PDF

Info

Publication number
CN118656098A
CN118656098ACN202411068885.9ACN202411068885ACN118656098ACN 118656098 ACN118656098 ACN 118656098ACN 202411068885 ACN202411068885 ACN 202411068885ACN 118656098 ACN118656098 ACN 118656098A
Authority
CN
China
Prior art keywords
configuration
configuration data
target application
subscription
unit
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.)
Pending
Application number
CN202411068885.9A
Other languages
Chinese (zh)
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.)
Shenzhen Shenbao Electrical Instrument Co ltd
Original Assignee
Shenzhen Shenbao Electrical Instrument 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 Shenzhen Shenbao Electrical Instrument Co ltdfiledCriticalShenzhen Shenbao Electrical Instrument Co ltd
Priority to CN202411068885.9ApriorityCriticalpatent/CN118656098A/en
Publication of CN118656098ApublicationCriticalpatent/CN118656098A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请涉及一种配置数据更新方法、装置、计算机设备、可读存储介质和程序产品。所述方法包括:通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理;当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据;通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。采用本方法能够提高配置数据更新的效率。

The present application relates to a configuration data updating method, device, computer equipment, readable storage medium and program product. The method comprises: obtaining the current configuration file corresponding to the target application through the management configuration unit in the target application, monitoring the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publishing the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of each of the multiple configuration parameters; the configuration data in the configuration data set is pushed to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data. The use of this method can improve the efficiency of configuration data updating.

Description

Translated fromChinese
配置数据更新方法、装置、计算机设备、可读存储介质和程序产品Configuration data updating method, device, computer equipment, readable storage medium and programProduct

技术领域Technical Field

本申请涉及计算机技术领域,特别是涉及一种配置数据更新方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。The present application relates to the field of computer technology, and in particular to a configuration data updating method, apparatus, computer equipment, computer-readable storage medium, and computer program product.

背景技术Background Art

随着计算机技术的发展,应用程序包含的业务子模块越来越多,每个业务子模块都有自身需要的配置参数。各个业务子模块的配置参数可以通过配置文件来配置,业务子模块可以通过监测配置文件,得到自身需要的变更参数。With the development of computer technology, applications contain more and more business submodules, and each business submodule has its own required configuration parameters. The configuration parameters of each business submodule can be configured through a configuration file, and the business submodule can obtain the required change parameters by monitoring the configuration file.

传统技术中,是各个业务子模块同时监测配置文件产生的变更,存在由于竞争访问导致的配置数据更新效率低的问题。In the conventional technology, each business submodule monitors the changes in the configuration file at the same time, which results in low configuration data update efficiency due to contention access.

发明内容Summary of the invention

基于此,有必要针对上述技术问题,提供一种能够提高配置数据更新效率的配置数据更新方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。Based on this, it is necessary to provide a configuration data updating method, apparatus, computer device, computer readable storage medium and computer program product that can improve the configuration data updating efficiency in response to the above technical problems.

第一方面,本申请提供了一种配置数据更新方法,包括:In a first aspect, the present application provides a configuration data updating method, comprising:

通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理;当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据;Obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of multiple configuration parameters;

通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。The configuration data in the configuration data set is pushed to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data.

在其中一个实施例中,配置数据更新方法还包括:In one embodiment, the configuration data updating method further includes:

当目标应用程序中出现新增业务单元时,通过管理配置单元获取新增业务单元对应的订阅配置参数,将新增业务单元对应的订阅配置参数添加至订阅配置参数集中,得到更新后的订阅配置参数集;通过管理配置单元比对目标应用程序对应的当前配置文件和历史配置文件,得到新增配置数据,将新增配置数据传输至新增业务单元,以使新增业务单元启用新增配置数据。When a new business unit appears in the target application, the subscription configuration parameters corresponding to the new business unit are obtained through the management configuration unit, and the subscription configuration parameters corresponding to the new business unit are added to the subscription configuration parameter set to obtain an updated subscription configuration parameter set; the current configuration file and the historical configuration file corresponding to the target application are compared through the management configuration unit to obtain the new configuration data, and the new configuration data is transmitted to the new business unit so that the new business unit can enable the new configuration data.

在其中一个实施例中,配置数据更新方法还包括:In one embodiment, the configuration data updating method further includes:

通过管理配置单元比对订阅配置参数集中的订阅配置参数在目标应用程序对应的历史配置文件和当前配置文件中分别对应的配置数据,得到目标应用程序针对订阅关键字集的配置数据集;将配置数据集中的配置数据传输至所属的订阅配置参数对应的业务单元之后,方法还包括:通过管理配置单元基于当前配置文件更新历史配置文件,得到更新后的历史配置文件。The management configuration unit compares the configuration data corresponding to the subscription configuration parameters in the subscription configuration parameter set in the historical configuration file and the current configuration file corresponding to the target application, thereby obtaining a configuration data set for the subscription keyword set of the target application; after transmitting the configuration data in the configuration data set to the business unit corresponding to the subscription configuration parameters, the method also includes: updating the historical configuration file based on the current configuration file through the management configuration unit to obtain an updated historical configuration file.

在其中一个实施例中,业务单元用于:In one embodiment, the business unit is used to:

获取接收到的配置数据对应的参数启用类型;当参数启用类型为即时启用类型时,启用接收到的配置数据;当参数启用类型为延时启用类型时,根据接收到的配置数据对应的延时启用条件,启用接收到的配置数据。Obtain the parameter enabling type corresponding to the received configuration data; when the parameter enabling type is an immediate enabling type, enable the received configuration data; when the parameter enabling type is a delayed enabling type, enable the received configuration data according to the delayed enabling condition corresponding to the received configuration data.

在其中一个实施例中,配置数据更新方法还包括:In one embodiment, the configuration data updating method further includes:

通过管理配置单元根据业务单元对应的业务逻辑,确定接收到的配置数据对应的参数启用类型;当参数启用类型为延时启用类型时,通过管理配置单元根据目标应用程序对应的业务需求和业务单元对应的业务逻辑,确定接收到的配置数据对应的延时启用条件;延时启用条件为到达延时间隔或触发启用事件。The parameter activation type corresponding to the received configuration data is determined through the management configuration unit according to the business logic corresponding to the business unit; when the parameter activation type is the delayed activation type, the delayed activation condition corresponding to the received configuration data is determined through the management configuration unit according to the business requirements corresponding to the target application and the business logic corresponding to the business unit; the delayed activation condition is reaching the delay interval or triggering an activation event.

在其中一个实施例中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,包括:In one embodiment, monitoring a configuration data set for generating changes to a subscription configuration parameter set fed back by a message agent in a target application includes:

通过管理配置单元,统计订阅配置参数集中各个配置参数分别对应的变更频率,在订阅配置参数集中,将变更频率大于频率阈值的配置参数确定为第一配置参数,将变更频率小于或等于频率阈值的配置参数确定为第二配置参数;通过管理配置单元,根据各个第一配置参数对应的变更频率,计算各个第一配置参数对应的第一监测周期;变更频率与第一监测周期呈负相关;通过管理配置单元,基于第一监测周期,监测针对第一配置参数产生变更的配置数据,得到第一数据集;基于预设监测周期,监测针对第二配置参数产生变更的配置数据,得到第二数据集;基于第一数据集或第二数据集中的至少一者,得到配置数据集。Through the management configuration unit, statistics are collected on the change frequencies corresponding to the respective configuration parameters in the subscription configuration parameter set. In the subscription configuration parameter set, the configuration parameter whose change frequency is greater than the frequency threshold is determined as the first configuration parameter, and the configuration parameter whose change frequency is less than or equal to the frequency threshold is determined as the second configuration parameter; through the management configuration unit, the first monitoring period corresponding to each first configuration parameter is calculated according to the change frequency corresponding to each first configuration parameter; the change frequency is negatively correlated with the first monitoring period; through the management configuration unit, based on the first monitoring period, the configuration data that has changed with respect to the first configuration parameter is monitored to obtain a first data set; based on the preset monitoring period, the configuration data that has changed with respect to the second configuration parameter is monitored to obtain a second data set; based on at least one of the first data set or the second data set, a configuration data set is obtained.

第二方面,本申请还提供了一种配置数据更新装置,包括:In a second aspect, the present application also provides a configuration data updating device, comprising:

管理配置模块,用于通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理;当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据;The management configuration module is used to obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of multiple configuration parameters;

消息代理模块,用于通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。The message proxy module is used to push the configuration data in the configuration data set to the corresponding business unit through the message proxy according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data.

第三方面,本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述配置数据更新方法的步骤。In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned configuration data updating method when executing the computer program.

第四方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述配置数据更新方法的步骤。In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above-mentioned configuration data updating method when executed by a processor.

第五方面,本申请还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述配置数据更新方法的步骤。In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned configuration data updating method when executed by a processor.

上述配置数据更新方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,并将配置数据集发布至消息代理。进而通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。这样,通过目标应用程序中的管理配置单元,根据消息代理反馈的订阅配置参数集来检测当前配置文件中产生变更的配置数据集,能够避免由于多个业务子模块竞争访问配置文件导致的配置数据更新效率低的问题,并且,只监测订阅配置参数集所产生的变更,能够缩小监测、推送和传输的数据量,提高实配置数据更新的针对性,从而节约计算机资源。进而通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送至相应的业务单元,可以将各个配置数据有针对性地发送至相应的业务单元,不仅能够提高数据发送的针对性,避免不必要的数据传输,节约计算机资源,同时能够提高配置数据更新的效率。The above configuration data updating method, device, computer equipment, computer readable storage medium and computer program product obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that has changed in the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent. Then, the configuration data in the configuration data set is pushed to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data. In this way, the configuration data set that has changed in the current configuration file is detected according to the subscription configuration parameter set fed back by the message agent through the management configuration unit in the target application, which can avoid the problem of low configuration data update efficiency caused by multiple business submodules competing to access the configuration file, and only monitor the changes generated by the subscription configuration parameter set, which can reduce the amount of data monitored, pushed and transmitted, improve the pertinence of the actual configuration data update, and thus save computer resources. Then, the message agent pushes the configuration data in the configuration data set to the corresponding business unit according to the subscription configuration parameters subscribed by each business unit. Each configuration data can be sent to the corresponding business unit in a targeted manner, which can not only improve the targeted data sending, avoid unnecessary data transmission, and save computer resources, but also improve the efficiency of configuration data updating.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对本申请实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

图1为一个实施例中配置数据更新方法的应用环境图;FIG1 is a diagram of an application environment of a configuration data updating method in one embodiment;

图2为一个实施例中配置数据更新方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a configuration data updating method in one embodiment;

图3为一个实施例中目标应用程序的架构示意图;FIG3 is a schematic diagram of the architecture of a target application in one embodiment;

图4为一个实施例中监测配置数据集步骤的流程示意图;FIG4 is a schematic diagram of a flow chart of steps for monitoring and configuring a data set in one embodiment;

图5为另一个实施例中配置数据更新的流程图;FIG5 is a flow chart of configuration data updating in another embodiment;

图6为一个实施例中配置数据更新装置的结构框图;FIG6 is a structural block diagram of a configuration data updating device in one embodiment;

图7为一个实施例中计算机设备的内部结构图;FIG7 is a diagram showing the internal structure of a computer device in one embodiment;

图8为另一个实施例中计算机设备的内部结构图。FIG. 8 is a diagram showing the internal structure of a computer device in another embodiment.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

本申请实施例提供的配置数据更新方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。数据存储系统可以存储服务器104需要处理的数据。数据存储系统可以集成在服务器104上,也可以放在云上或其他网络服务器上。目标应用程序可以安装于终端102上。服务器104将目标应用程序对应的最新版本的配置文件,即当前配置文件发送至终端102。终端102通过目标应用程序中的管理配置单元获取服务器104发送的目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理。当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据。终端102通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备、投影设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。头戴设备可以为虚拟现实(Virtual Reality,VR)设备、增强现实(Augmented Reality,AR)设备、智能眼镜等。服务器104可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或分布式系统,还可以是提供云计算服务的云服务器。The configuration data updating method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The target application can be installed on the terminal 102. The server 104 sends the latest version of the configuration file corresponding to the target application, that is, the current configuration file, to the terminal 102. The terminal 102 obtains the current configuration file corresponding to the target application sent by the server 104 through the management configuration unit in the target application, and monitors the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publishes the configuration data set to the message agent. The current configuration file contains the configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include the configuration data of each of the multiple configuration parameters. The terminal 102 pushes the configuration data in the configuration data set to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

在一个示例性的实施例中,如图2所示,提供了一种配置数据更新方法,以该方法应用于计算机设备为例进行说明,计算机设备可以是终端或服务器,由终端或服务器自身单独执行,也可以通过终端和服务器之间的交互来实现。配置数据更新方法,包括以下步骤202至步骤204。其中:In an exemplary embodiment, as shown in FIG2 , a configuration data updating method is provided, and the method is applied to a computer device as an example for explanation. The computer device may be a terminal or a server, and the method may be executed by the terminal or the server itself alone, or may be implemented through interaction between the terminal and the server. The configuration data updating method includes the following steps 202 to 204. Among them:

步骤202,通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理;当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据。Step 202, obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that generates changes in the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of multiple configuration parameters.

其中,目标应用程序是指需要进行配置数据更新的、包含多个功能模块的应用程序。例如,目标应用程序可以是嵌入式系统应用程序、前台应用程序、后台应用程序、控制台应用程序等多种类型的应用程序。嵌入式系统应用程序是专门为嵌入式系统设计的软件,例如,在自动化生产线上,嵌入式系统应用程序负责控制机器的运行、监测生产流程、优化生产效率等。前台应用程序是指用于与之直接交互的应用程序,通常具有图形用户界面,例如,用于编写文档、制作表格的办公软件。后台应用程序通常在用户不直接交互的情况下运行,执行后台任务,例如,数据备份、病毒扫描、系统更新等。控制台应用程序是通过命令行界面与用户交互的应用程序,通常没有图形界面。The target application refers to an application that needs to update the configuration data and contains multiple functional modules. For example, the target application can be an embedded system application, a foreground application, a background application, a console application, and other types of applications. An embedded system application is software designed specifically for an embedded system. For example, in an automated production line, an embedded system application is responsible for controlling the operation of the machine, monitoring the production process, and optimizing production efficiency. A foreground application refers to an application used to interact directly with it, usually with a graphical user interface, such as office software for writing documents and making spreadsheets. Background applications usually run without direct user interaction and perform background tasks, such as data backup, virus scanning, system updates, and so on. Console applications are applications that interact with users through a command line interface and usually do not have a graphical interface.

配置管理单元是指目标应用程序中用于监测配置文件中产生的变更数据的功能模块。消息代理是指目标应用程序中用于提供消息传递服务的功能模块。业务单元是指目标应用程序包含的用于执行其他特定业务功能的功能模块。例如,当目标应用程序为嵌入式系统应用程序时,目标应用程序在包含配置管理单元和消息代理的同时,还可以包含载波采集模块、远程通信模块、数据处理模块等业务单元。例如,目标应用程序的系统架构如图3所示,目标应用程序包含多个业务单元、消息代理、管理配置单元和集中配置文件(即当前配置文件),管理配置单元用于检测配置文件中产生的参数变更,并将参数变更信息(即配置数据集)发布至消息代理,由消息代理将配置数据集中的配置数据传输至对应的业务单元。The configuration management unit refers to a functional module in the target application used to monitor the change data generated in the configuration file. The message agent refers to a functional module in the target application used to provide message delivery services. The business unit refers to a functional module contained in the target application used to perform other specific business functions. For example, when the target application is an embedded system application, the target application may include business units such as a carrier acquisition module, a remote communication module, and a data processing module while including a configuration management unit and a message agent. For example, the system architecture of the target application is shown in FIG3. The target application includes multiple business units, a message agent, a management configuration unit, and a centralized configuration file (i.e., the current configuration file). The management configuration unit is used to detect parameter changes generated in the configuration file and publish parameter change information (i.e., a configuration data set) to the message agent, and the message agent transmits the configuration data in the configuration data set to the corresponding business unit.

配置参数是指为了优化和定制应用程序的运行环境、性能、行为等而设置的一系列参数,配置数据是指配置参数对应的具体参数值。Configuration parameters refer to a series of parameters set to optimize and customize the operating environment, performance, behavior, etc. of an application, and configuration data refers to the specific parameter values corresponding to the configuration parameters.

订阅配置参数集是指包含各个业务单元分别订阅的配置参数的集合。当前配置文件是指当前时刻目标应用程序对应的最新的配置文件。业务单元对应的配置子文件是指包含业务单元对应的各个配置参数所对应的配置数据的数据集。配置数据集是指包含订阅配置参数集中产生变更的各个配置参数分别对应的配置数据的集合。The subscription configuration parameter set refers to a set of configuration parameters subscribed by each business unit. The current configuration file refers to the latest configuration file corresponding to the target application at the current moment. The configuration subfile corresponding to the business unit refers to a data set containing configuration data corresponding to each configuration parameter corresponding to the business unit. The configuration data set refers to a set of configuration data corresponding to each configuration parameter that has changed in the subscription configuration parameter set.

示例性地,目标应用程序启动时,计算机设备通过目标应用程序中的管理配置单元读取目标应用程序的配置文件,作为历史配置文件。在目标应用程序运行过程中,基于目标应用程序中的消息代理反馈的订阅配置参数集,在配置文件中,实时监测订阅配置参数集中的订阅配置参数所对应的配置数据是否产生变更。当监测到订阅配置参数对应的配置数据产生变更时,比对目标应用程序对应的当前配置文件和历史配置文件,得到针对订阅配置参数集产生变更的配置数据集。将配置数据集发布至消息代理。Exemplarily, when the target application is started, the computer device reads the configuration file of the target application through the management configuration unit in the target application as a historical configuration file. During the operation of the target application, based on the subscription configuration parameter set fed back by the message agent in the target application, in the configuration file, it is monitored in real time whether the configuration data corresponding to the subscription configuration parameters in the subscription configuration parameter set has changed. When it is detected that the configuration data corresponding to the subscription configuration parameter has changed, the current configuration file and the historical configuration file corresponding to the target application are compared to obtain the configuration data set for the subscription configuration parameter set that has changed. The configuration data set is published to the message agent.

步骤204,通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。Step 204: Push the configuration data in the configuration data set to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit activates the received configuration data.

其中,订阅配置参数是指业务单元在配置文件中订阅的配置参数。The subscription configuration parameters refer to the configuration parameters subscribed by the business unit in the configuration file.

示例性地,计算机设备通过目标应用程序中的消息代理,根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的每个配置数据推送到订阅了配置数据对应的配置参数的业务单元,以使各个接收到配置数据的业务单元启用接收到的配置数据。Exemplarily, the computer device pushes each configuration data in the configuration data set to the business unit that has subscribed to the configuration parameters corresponding to the configuration data through the message agent in the target application according to the subscription configuration parameters subscribed by each business unit, so that each business unit that has received the configuration data enables the received configuration data.

上述配置数据更新方法中,通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,并将配置数据集发布至消息代理。进而通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。这样,通过目标应用程序中的管理配置单元,根据消息代理反馈的订阅配置参数集来检测当前配置文件中产生变更的配置数据集,能够避免由于多个业务子模块竞争访问配置文件导致的配置数据更新效率低的问题,并且,只监测订阅配置参数集所产生的变更,能够缩小监测、推送和传输的数据量,提高实配置数据更新的针对性,从而节约计算机资源。进而通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送至相应的业务单元,可以将各个配置数据有针对性地发送至相应的业务单元,不仅能够提高数据发送的针对性,避免不必要的数据传输,节约计算机资源,同时能够提高配置数据更新的效率。In the above configuration data updating method, the current configuration file corresponding to the target application is obtained through the management configuration unit in the target application, and the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application is monitored from the current configuration file, and the configuration data set is published to the message agent. Then, the configuration data in the configuration data set is pushed to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data. In this way, the configuration data set that generates changes in the current configuration file is detected according to the subscription configuration parameter set fed back by the message agent through the management configuration unit in the target application, which can avoid the problem of low configuration data update efficiency caused by multiple business submodules competing to access the configuration file, and only monitor the changes generated by the subscription configuration parameter set, which can reduce the amount of data monitored, pushed and transmitted, improve the pertinence of the actual configuration data update, and thus save computer resources. Then, the configuration data in the configuration data set is pushed to the corresponding business unit according to the subscription configuration parameters subscribed by each business unit through the message agent, and each configuration data can be sent to the corresponding business unit in a targeted manner, which can not only improve the pertinence of data transmission, avoid unnecessary data transmission, save computer resources, but also improve the efficiency of configuration data update.

在一个示例性的实施例中,配置数据更新方法还包括:In an exemplary embodiment, the configuration data updating method further includes:

当目标应用程序中出现新增业务单元时,通过管理配置单元获取新增业务单元对应的订阅配置参数,将新增业务单元对应的订阅配置参数添加至订阅配置参数集中,得到更新后的订阅配置参数集;When a new business unit appears in the target application, the subscription configuration parameters corresponding to the new business unit are obtained through the management configuration unit, and the subscription configuration parameters corresponding to the new business unit are added to the subscription configuration parameter set to obtain an updated subscription configuration parameter set;

通过管理配置单元比对目标应用程序对应的当前配置文件和历史配置文件,得到新增配置数据,将新增配置数据传输至新增业务单元,以使新增业务单元启用新增配置数据。The management configuration unit compares the current configuration file and the historical configuration file corresponding to the target application to obtain new configuration data, and transmits the new configuration data to the new business unit so that the new business unit enables the new configuration data.

其中,新增业务单元是指新增至目标应用程序中、用于执行特定业务功能的功能模块。新增配置数据是指新增至配置文件中的配置参数对应的配置数据。The newly added business unit refers to a functional module added to the target application for executing a specific business function. The newly added configuration data refers to configuration data corresponding to the configuration parameters added to the configuration file.

示例性地,当目标应用程序中出现新增业务单元时,通过管理配置单元获取新增业务单元启动时向消息代理订阅的订阅配置参数。将新增业务单元对应的订阅配置参数添加至订阅配置参数集中,得到更新后的订阅配置参数集。通过管理配置单元,比对目标应用程序对应的当前配置文件和历史配置文件,将新增至配置文件中的配置参数对应的配置数据作为新增配置数据。将新增配置数据传输至对应的新增业务单元,以使新增业务单元启用新增配置数据。Exemplarily, when a new business unit appears in the target application, the subscription configuration parameters subscribed to the message broker when the new business unit is started are obtained through the management configuration unit. The subscription configuration parameters corresponding to the new business unit are added to the subscription configuration parameter set to obtain an updated subscription configuration parameter set. The current configuration file and the historical configuration file corresponding to the target application are compared through the management configuration unit, and the configuration data corresponding to the configuration parameters added to the configuration file are used as the new configuration data. The new configuration data is transmitted to the corresponding new business unit so that the new business unit enables the new configuration data.

上述实施例中,当目标应用程序中出现新增业务单元时,新增业务单元启动时向消息代理订阅需要监测变更的订阅配置参数。管理配置单元及时将消息代理反馈的新增业务单元对应的订阅配置参数添加至订阅配置参数集,无需人为更新订阅配置参数集,能够提高配置数据处理效率。通过管理配置单元比对目标应用程序对应的当前配置文件和历史配置文件,能够快速得到新增配置数据,使得新增业务单元可以快速启用响应的新增配置数据,提高配置数据更新效率。In the above embodiment, when a new business unit appears in the target application, the new business unit subscribes to the message proxy for subscription configuration parameters that need to be monitored for changes when it is started. The management configuration unit promptly adds the subscription configuration parameters corresponding to the new business unit fed back by the message proxy to the subscription configuration parameter set, without the need to manually update the subscription configuration parameter set, which can improve the efficiency of configuration data processing. By comparing the current configuration file and the historical configuration file corresponding to the target application by the management configuration unit, the new configuration data can be quickly obtained, so that the new business unit can quickly enable the corresponding new configuration data, thereby improving the efficiency of configuration data update.

在一个示例性的实施例中,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,包括:In an exemplary embodiment, monitoring a configuration data set for generating a change in a subscription configuration parameter set fed back by a message agent in a target application from a current configuration file includes:

通过管理配置单元比对订阅配置参数集中的订阅配置参数在目标应用程序对应的历史配置文件和当前配置文件中分别对应的配置数据,得到目标应用程序针对订阅关键字集的配置数据集;By comparing the configuration data corresponding to the subscription configuration parameters in the subscription configuration parameter set in the historical configuration file and the current configuration file corresponding to the target application program through the management configuration unit, a configuration data set for the subscription keyword set of the target application program is obtained;

将配置数据集中的配置数据传输至所属的订阅配置参数对应的业务单元之后,方法还包括:After transmitting the configuration data in the configuration data set to the business unit corresponding to the subscription configuration parameter, the method further includes:

通过管理配置单元基于当前配置文件更新历史配置文件,得到更新后的历史配置文件。The historical configuration file is updated based on the current configuration file by the management configuration unit to obtain an updated historical configuration file.

示例性地,计算机设备通过管理配置单元实时监测在当前配置文件中,订阅配置参数集中的订阅配置参数是否发生变更。当同一订阅配置参数在当前配置文件中对应的配置数据和历史配置文件中对应的配置数据不一致时,将该订阅配置参数在当前配置文件中对应的配置数据添加至目标应用程序针对订阅关键字集的配置数据集中。在将配置数据集中的各个配置数据分别传输至所属的订阅配置参数对应的业务单元之后,通过管理配置单元将当前配置文件覆盖历史配置文件,得到更新后的历史配置文件。Exemplarily, the computer device monitors in real time through the management configuration unit whether the subscription configuration parameters in the subscription configuration parameter set in the current configuration file have changed. When the configuration data corresponding to the same subscription configuration parameter in the current configuration file and the configuration data corresponding to the historical configuration file are inconsistent, the configuration data corresponding to the subscription configuration parameter in the current configuration file is added to the configuration data set of the target application for the subscription keyword set. After each configuration data in the configuration data set is transmitted to the business unit corresponding to the corresponding subscription configuration parameter, the current configuration file is overwritten with the historical configuration file through the management configuration unit to obtain an updated historical configuration file.

上述实施例中,将当前配置文件与历史配置文件比对,可以快速确定产生变更的配置参数,从而得到配置数据集。在将配置数据集中的配置数据传输至相应的业务单元后,通过当前配置文件更新历史配置文件,可以及时更新历史配置文件,保证配置数据更新的准确性和实时性。In the above embodiment, the current configuration file is compared with the historical configuration file to quickly determine the configuration parameters that have been changed, thereby obtaining a configuration data set. After the configuration data in the configuration data set is transmitted to the corresponding business unit, the historical configuration file is updated through the current configuration file, so that the historical configuration file can be updated in time to ensure the accuracy and real-time nature of the configuration data update.

在一个示例性的实施例中,业务单元用于:In an exemplary embodiment, the business unit is used to:

获取接收到的配置数据对应的参数启用类型;Get the parameter activation type corresponding to the received configuration data;

当参数启用类型为即时启用类型时,启用接收到的配置数据;When the parameter enabling type is the immediate enabling type, the received configuration data is enabled;

当参数启用类型为延时启用类型时,根据接收到的配置数据对应的延时启用条件,启用接收到的配置数据。When the parameter enabling type is a delayed enabling type, the received configuration data is enabled according to the delayed enabling condition corresponding to the received configuration data.

其中,参数启用类型包括即使启用类型和延时启用类型。即时启用类型是指接收到配置数据后,立即启用新的配置数据。延时启用类型是指,在接收到配置数据后,需等待一段时间再启用新的配置数据。延时启用是为了确保数据的一致性和完整性,使得目标应用程序可以更加平稳地过渡到新的配置状态,减少因配置变更引起的系统抖动或故障。延时启用条件是用于指示配置数据是否可以启用的判断条件。Among them, the parameter enablement type includes immediate enablement type and delayed enablement type. The immediate enablement type means that the new configuration data is enabled immediately after receiving the configuration data. The delayed enablement type means that after receiving the configuration data, it is necessary to wait for a period of time before enabling the new configuration data. Delayed enablement is to ensure the consistency and integrity of the data, so that the target application can transition to the new configuration state more smoothly and reduce system jitter or failure caused by configuration changes. The delayed enablement condition is a judgment condition used to indicate whether the configuration data can be enabled.

示例性地,目标应用程序中的业务单元接收到配置数据时,获取配置数据所属的配置参数对应的参数启用类型。当参数启用类型为即时启用类型时,直接启用接收到的配置数据。当参数启用类型为延时启用类型时,获取接收到的配置数据对应的延时启用条件,在满足延时启用条件时,启用接收到的配置数据。Exemplarily, when the business unit in the target application receives the configuration data, the parameter activation type corresponding to the configuration parameter to which the configuration data belongs is obtained. When the parameter activation type is an immediate activation type, the received configuration data is directly activated. When the parameter activation type is a delayed activation type, the delayed activation condition corresponding to the received configuration data is obtained, and when the delayed activation condition is met, the received configuration data is activated.

上述实施例中,针对各个配置参数,分别设置了相应的参数启用类型。业务单元根据配置参数对应的参数启用类型,在适当的时机启用配置参数,在保证配置参数更新的实时性和及时性的同时,能够确保数据的一致性和完整性,使得目标应用程序可以更加平稳地过渡到新的配置状态,减少因配置变更引起的系统抖动或故障。In the above embodiment, corresponding parameter activation types are set for each configuration parameter. The business unit activates the configuration parameter at an appropriate time according to the parameter activation type corresponding to the configuration parameter, and ensures the consistency and integrity of the data while ensuring the real-time and timeliness of the configuration parameter update, so that the target application can transition to the new configuration state more smoothly, reducing system jitter or failure caused by configuration changes.

在一个示例性的实施例中,配置数据更新方法还包括:In an exemplary embodiment, the configuration data updating method further includes:

通过管理配置单元根据业务单元对应的业务逻辑,确定接收到的配置数据对应的参数启用类型;Determine, by the management configuration unit, the parameter activation type corresponding to the received configuration data according to the business logic corresponding to the business unit;

当参数启用类型为延时启用类型时,通过管理配置单元根据目标应用程序对应的业务需求和业务单元对应的业务逻辑,确定接收到的配置数据对应的延时启用条件;延时启用条件为到达延时间隔或触发启用事件。When the parameter enablement type is a delayed enablement type, the delayed enablement condition corresponding to the received configuration data is determined by the management configuration unit according to the business requirements corresponding to the target application and the business logic corresponding to the business unit; the delayed enablement condition is reaching the delay interval or triggering an enablement event.

其中,业务逻辑是指业务单元为了完成业务功能而遵循的数据处理流程和处理机制,业务逻辑定义了业务单元如何接收输入数据、处理输入数据和执行相应的操作,并最终产生相应的输出。根据业务逻辑进行数据处理,可以保证数据的准确性、一致性和安全性,同时提高业务处理的效率和可靠性。Among them, business logic refers to the data processing flow and processing mechanism followed by the business unit to complete business functions. Business logic defines how the business unit receives input data, processes input data, performs corresponding operations, and finally generates corresponding outputs. Data processing according to business logic can ensure the accuracy, consistency and security of data, while improving the efficiency and reliability of business processing.

业务需求包含目标应用程序在功能、性能、安全、用户界面、可扩展性等多个方面的要求,通过满足业务需求,可以使得目标应用程序能够有效地支持企业的业务运营,并为用户带来良好的使用体验。Business requirements include the requirements of the target application in terms of functionality, performance, security, user interface, scalability, etc. By meeting business requirements, the target application can effectively support the business operations of the enterprise and bring a good user experience to users.

示例性地,计算机设备获取业务单元对应的业务逻辑,通过管理配置单元对业务单元对应的业务逻辑进行分析处理,得到各个配置数据所属的配置参数对应的参数启用类型。具体地,根据配置数据所属的配置参数在业务单元对应的业务逻辑中所处的数据处理节点,基于配置参数所处的数据处理节点确定配置参数与目标应用程序中其他业务单元的依赖关系,基于依赖关系确定配置数据对应的参数启用类型。当配置数据对应的参数启用类型为延时启用类型时,通过管理配置单元根据目标应用程序对应的业务需求和业务单元对应的业务逻辑,确定配置数据所属的配置参数对应的延时启用条件。延时启用条件为到达延时间隔或触发启用事件。延时间隔是为参数启用类型为延时启用类型的配置参数预先设置的时间间隔,业务单元接收到配置参数对应的配置数据后,等待延时间隔结束后,启用配置数据。触发启用事件是指触发启用配置数据的操作,在实际实现过程中,触发启用事件可以为目标应用程序重启或从故障中恢复,也可以是监测到关键指标超过预设阈值,可以是用户通过应用程序的用户操作界面或命令行工具手动触发配置参数的更新操作,可以是监测到系统中运行的定时任务(如数据备份、日志清理等)已完成。Exemplarily, the computer device obtains the business logic corresponding to the business unit, analyzes and processes the business logic corresponding to the business unit through the management configuration unit, and obtains the parameter activation type corresponding to the configuration parameter to which each configuration data belongs. Specifically, according to the data processing node where the configuration parameter to which the configuration data belongs is located in the business logic corresponding to the business unit, the dependency relationship between the configuration parameter and other business units in the target application is determined based on the data processing node where the configuration parameter is located, and the parameter activation type corresponding to the configuration data is determined based on the dependency relationship. When the parameter activation type corresponding to the configuration data is a delayed activation type, the delayed activation condition corresponding to the configuration parameter to which the configuration data belongs is determined through the management configuration unit according to the business requirements corresponding to the target application and the business logic corresponding to the business unit. The delayed activation condition is to reach the delay interval or trigger an activation event. The delay interval is a pre-set time interval for the configuration parameter whose parameter activation type is a delayed activation type. After the business unit receives the configuration data corresponding to the configuration parameter, it waits for the delay interval to end and then activates the configuration data. A triggering and enabling event refers to an operation that triggers the enabling of configuration data. In the actual implementation process, the triggering and enabling event can be the restart of the target application or recovery from a failure, or it can be the monitoring of key indicators exceeding a preset threshold, it can be the user manually triggering the update of configuration parameters through the user interface of the application or the command line tool, or it can be the monitoring of the completion of scheduled tasks running in the system (such as data backup, log cleaning, etc.).

上述实施例中,根据配置数据所属的配置参数对应的业务单元的业务逻辑,来确定配置数据对应的参数启用类型,可以保证数据的准确性、一致性和安全性,同时提高业务处理的效率和可靠性。在确定配置数据对应的参数启用类型为延时启用类型时,进一步根据目标应用程序对应的业务需求和业务单元对应的业务逻辑,进一步确定配置数据对应的延时启用条件。这样,通过综合分析业务需求和业务逻辑来确定延时启用条件,在保证数据的准确性、一致性和安全性的同时,可以使得目标应用程序能够有效地支持目标应用程序的业务运营,并为用户带来良好的使用体验。In the above embodiment, the parameter activation type corresponding to the configuration data is determined according to the business logic of the business unit corresponding to the configuration parameters to which the configuration data belongs, which can ensure the accuracy, consistency and security of the data, while improving the efficiency and reliability of business processing. When it is determined that the parameter activation type corresponding to the configuration data is a delayed activation type, the delayed activation condition corresponding to the configuration data is further determined according to the business requirements corresponding to the target application and the business logic corresponding to the business unit. In this way, by comprehensively analyzing the business requirements and business logic to determine the delayed activation condition, while ensuring the accuracy, consistency and security of the data, the target application can effectively support the business operations of the target application and bring a good user experience to the user.

在一个示例性的实施例中,如图4所示,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,包括步骤402至步骤406。其中:In an exemplary embodiment, as shown in FIG4 , monitoring the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application includes steps 402 to 406. In which:

步骤402,通过管理配置单元,统计订阅配置参数集中各个配置参数分别对应的变更频率,在订阅配置参数集中,将变更频率大于频率阈值的配置参数确定为第一配置参数,将变更频率小于或等于频率阈值的配置参数确定为第二配置参数。Step 402, through the management configuration unit, count the change frequencies corresponding to the respective configuration parameters in the subscription configuration parameter set, and in the subscription configuration parameter set, determine the configuration parameter whose change frequency is greater than the frequency threshold as the first configuration parameter, and determine the configuration parameter whose change frequency is less than or equal to the frequency threshold as the second configuration parameter.

步骤404,通过管理配置单元,根据各个第一配置参数对应的变更频率,计算各个第一配置参数对应的第一监测周期;变更频率与第一监测周期呈负相关。Step 404: Calculate the first monitoring period corresponding to each first configuration parameter according to the change frequency corresponding to each first configuration parameter through the management configuration unit; the change frequency is negatively correlated with the first monitoring period.

步骤406,通过管理配置单元,基于第一监测周期,监测针对第一配置参数产生变更的配置数据,得到第一数据集;基于预设监测周期,监测针对第二配置参数产生变更的配置数据,得到第二数据集;基于第一数据集或第二数据集中的至少一者,得到配置数据集。Step 406, by managing the configuration unit, based on a first monitoring period, monitors the configuration data that has changed with respect to the first configuration parameter to obtain a first data set; based on a preset monitoring period, monitors the configuration data that has changed with respect to the second configuration parameter to obtain a second data set; based on at least one of the first data set or the second data set, obtains a configuration data set.

其中,变更频率是指在统计周期内,配置参数更新的次数。频率阈值可以根据实际需要来设置。第一监测周期是指对当前配置文件中的第一配置参数进行监测的时间间隔。预设监测周期是指预设的对订阅配置参数进行监测的时间间隔。The change frequency refers to the number of times the configuration parameter is updated within the statistical period. The frequency threshold can be set according to actual needs. The first monitoring period refers to the time interval for monitoring the first configuration parameter in the current configuration file. The preset monitoring period refers to the preset time interval for monitoring the subscription configuration parameter.

示例性地,计算机设备通过管理配置单元,统计订阅配置参数集中各个配置参数分别对应的变更频率。将变更频率大于频率阈值的配置参数确定为第一配置参数,将变更频率小于或等于频率阈值的配置参数确定为第二配置参数。通过管理配置单元,根据第一配置参数对应的变更频率,计算第一配置参数对应的第一监测周期。具体地,可以计算第一配置参数对应的变更频率和频率阈值之间的比值,将比值与预设监测周期的乘积作为第一监测周期,这样得到的第一监测周期与变更频率呈负相关,并且能够准确匹配第一配置参数的变更频率。通过管理配置单元,基于第一监测周期,监测针对订阅配置参数集中的第一配置参数产生的配置数据,得到第一数据集。基于预设监测周期,监测针对第二配置参数产生变更的配置数据,得到第二数据集。合并第一数据集和第二数据集,得到配置数据集。若当前时刻只监测到第一数据集或第二数据集,则直接将第一数据集或第二数据集作为配置数据集。Exemplarily, the computer device counts the change frequencies corresponding to each configuration parameter in the subscription configuration parameter set through the management configuration unit. The configuration parameter whose change frequency is greater than the frequency threshold is determined as the first configuration parameter, and the configuration parameter whose change frequency is less than or equal to the frequency threshold is determined as the second configuration parameter. Through the management configuration unit, according to the change frequency corresponding to the first configuration parameter, the first monitoring period corresponding to the first configuration parameter is calculated. Specifically, the ratio between the change frequency corresponding to the first configuration parameter and the frequency threshold can be calculated, and the product of the ratio and the preset monitoring period is used as the first monitoring period, so that the first monitoring period obtained is negatively correlated with the change frequency and can accurately match the change frequency of the first configuration parameter. Through the management configuration unit, based on the first monitoring period, the configuration data generated for the first configuration parameter in the subscription configuration parameter set is monitored to obtain a first data set. Based on the preset monitoring period, the configuration data generated for the second configuration parameter is monitored to obtain a second data set. The first data set and the second data set are merged to obtain a configuration data set. If only the first data set or the second data set is monitored at the current moment, the first data set or the second data set is directly used as the configuration data set.

上述实施例中,在配置数据更新过程中,根据各个订阅配置参数的变更频率,及时调整订阅配置参数对应的监测周期。对于变更频率较低的第一配置参数,可以根据第一配置参数对应的变更频率,适当延长第一配置参数对应的监测周期,从而降低实时监测的数量,节约计算机资源,从而提高配置参数更新的效率。In the above embodiment, during the configuration data update process, the monitoring period corresponding to the subscription configuration parameter is timely adjusted according to the change frequency of each subscription configuration parameter. For a first configuration parameter with a low change frequency, the monitoring period corresponding to the first configuration parameter can be appropriately extended according to the change frequency corresponding to the first configuration parameter, thereby reducing the number of real-time monitoring, saving computer resources, and improving the efficiency of configuration parameter update.

在一个具体的实施例中,本申请提出的配置数据处理方法可以应用于嵌入式系统应用。配置数据处理方法包括以下步骤:In a specific embodiment, the configuration data processing method proposed in this application can be applied to embedded system applications. The configuration data processing method includes the following steps:

1、订阅变更参数1. Subscription change parameters

如图5所示,嵌入式系统应用启动时,嵌入式系统应用中的管理配置单元读取嵌入式系统应用对应的集中配置文件中的全部内容,作为历史配置文件。嵌入式系统应用中的业务单元启动时,向消息代理订阅需要监测变更的订阅配置参数,管理配置单元获取消息代理反馈的订阅配置参数,得到订阅配置参数集。As shown in Figure 5, when the embedded system application is started, the management configuration unit in the embedded system application reads all the contents in the centralized configuration file corresponding to the embedded system application as the historical configuration file. When the business unit in the embedded system application is started, it subscribes to the message broker for the subscription configuration parameters that need to be monitored for changes, and the management configuration unit obtains the subscription configuration parameters fed back by the message broker to obtain the subscription configuration parameter set.

2、实时监测变更参数2. Real-time monitoring of changed parameters

如图5所示,嵌入式系统应用中的管理配置单元实时监测集中配置文件中针对订阅配置参数集产生的参数变更,提取参数变更内容,得到针对订阅配置参数集产生变更的配置数据集。As shown in FIG5 , the management configuration unit in the embedded system application monitors parameter changes generated in the centralized configuration file for the subscription configuration parameter set in real time, extracts parameter change content, and obtains a configuration data set for the subscription configuration parameter set.

3、发布变更参数3. Release the changed parameters

如图5所示,嵌入式系统应用将配置数据集发布至消息代理,由消息代理将配置数据集中的配置数据传输至对应的业务单元,以使业务单元及时启用接收到的配置数据。As shown in FIG5 , the embedded system application publishes the configuration data set to the message broker, and the message broker transmits the configuration data in the configuration data set to the corresponding business unit, so that the business unit can enable the received configuration data in a timely manner.

上述实施例中,通过集中配置文件同一存储各个业务单元分别对应的配置数据,可以避免由于过多配置文件导致的管理混乱和配置文件维护困难的问题。通过发布/订阅功能,实现了由管理配置单元监测集中配置文件的变更后,向所有订阅了配置参数的业务单元推送参数变更信息,能够有效避免多个业务单元同时竞争监测配置文件的问题,还充分利用监测到的集中配置文件中的参数变更信息,实现变更内容精准、高效的推送。In the above embodiment, by storing the configuration data corresponding to each business unit in a centralized configuration file, the problem of management confusion and difficulty in configuration file maintenance caused by too many configuration files can be avoided. Through the publish/subscribe function, after the management configuration unit monitors the changes in the centralized configuration file, the parameter change information is pushed to all business units that have subscribed to the configuration parameters, which can effectively avoid the problem of multiple business units competing to monitor the configuration file at the same time, and fully utilize the parameter change information in the monitored centralized configuration file to achieve accurate and efficient push of the change content.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的配置数据更新方法的配置数据更新装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个配置数据更新装置实施例中的具体限定可以参见上文中对于配置数据更新方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a configuration data updating device for implementing the configuration data updating method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more configuration data updating device embodiments provided below can refer to the limitations on the configuration data updating method above, and will not be repeated here.

在一个示例性的实施例中,如图6所示,提供了一种配置数据更新装置,包括:管理配置模块602和消息代理模块604,其中:In an exemplary embodiment, as shown in FIG6 , a configuration data updating device is provided, including: a configuration management module 602 and a message agent module 604, wherein:

管理配置模块602,用于通过目标应用程序中的管理配置单元获取目标应用程序对应的当前配置文件,从当前配置文件中,监测针对目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将配置数据集发布至消息代理;当前配置文件包含目标应用程序中各个业务单元分别对应的配置子文件,配置子文件包括多个配置参数各自的配置数据。The management configuration module 602 is used to obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that generates changes in the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of multiple configuration parameters.

消息代理模块604,用于通过消息代理根据各个业务单元分别订阅的订阅配置参数,将配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。The message proxy module 604 is used to push the configuration data in the configuration data set to the corresponding business unit through the message proxy according to the subscription configuration parameters subscribed by each business unit, so that the business unit activates the received configuration data.

在一个实施例中,管理配置模块602还用于:In one embodiment, the management configuration module 602 is further configured to:

当目标应用程序中出现新增业务单元时,通过管理配置单元获取新增业务单元对应的订阅配置参数,将新增业务单元对应的订阅配置参数添加至订阅配置参数集中,得到更新后的订阅配置参数集;通过管理配置单元比对目标应用程序对应的当前配置文件和历史配置文件,得到新增配置数据,将新增配置数据传输至新增业务单元,以使新增业务单元启用新增配置数据。When a new business unit appears in the target application, the subscription configuration parameters corresponding to the new business unit are obtained through the management configuration unit, and the subscription configuration parameters corresponding to the new business unit are added to the subscription configuration parameter set to obtain an updated subscription configuration parameter set; the current configuration file and the historical configuration file corresponding to the target application are compared through the management configuration unit to obtain the new configuration data, and the new configuration data is transmitted to the new business unit so that the new business unit can enable the new configuration data.

在一个实施例中,管理配置模块602还用于:In one embodiment, the management configuration module 602 is further configured to:

通过管理配置单元根据业务单元对应的业务逻辑,确定接收到的配置数据对应的参数启用类型;当参数启用类型为延时启用类型时,通过管理配置单元根据目标应用程序对应的业务需求和业务单元对应的业务逻辑,确定接收到的配置数据对应的延时启用条件;延时启用条件为到达延时间隔或触发启用事件。The parameter activation type corresponding to the received configuration data is determined through the management configuration unit according to the business logic corresponding to the business unit; when the parameter activation type is the delayed activation type, the delayed activation condition corresponding to the received configuration data is determined through the management configuration unit according to the business requirements corresponding to the target application and the business logic corresponding to the business unit; the delayed activation condition is reaching the delay interval or triggering an activation event.

在一个实施例中,配置数据更新装置还包括:In one embodiment, the configuration data updating device further comprises:

业务模块,用于获取接收到的配置数据对应的参数启用类型;当参数启用类型为即时启用类型时,启用接收到的配置数据;当参数启用类型为延时启用类型时,根据接收到的配置数据对应的延时启用条件,启用接收到的配置数据。The business module is used to obtain the parameter activation type corresponding to the received configuration data; when the parameter activation type is an immediate activation type, the received configuration data is activated; when the parameter activation type is a delayed activation type, the received configuration data is activated according to the delayed activation condition corresponding to the received configuration data.

在一个实施例中,管理配置模块602还用于:In one embodiment, the management configuration module 602 is further configured to:

通过管理配置单元根据业务单元对应的业务逻辑和目标应用程序对应的业务需求,确定接收到的配置数据对应的参数启用类型;当参数启用类型为延时启用类型时,通过管理配置单元根据目标应用程序对应的业务需求,确定接收到的配置数据对应的延时启用条件;延时启用条件为到达延时间隔或触发启用事件。The parameter activation type corresponding to the received configuration data is determined through the management configuration unit according to the business logic corresponding to the business unit and the business requirements corresponding to the target application. When the parameter activation type is a delayed activation type, the delayed activation condition corresponding to the received configuration data is determined through the management configuration unit according to the business requirements corresponding to the target application. The delayed activation condition is reaching the delay interval or triggering an activation event.

在一个实施例中,管理配置模块602还用于:In one embodiment, the management configuration module 602 is further configured to:

通过管理配置单元,统计订阅配置参数集中各个配置参数分别对应的变更频率,在订阅配置参数集中,将变更频率大于频率阈值的配置参数确定为第一配置参数,将变更频率小于或等于频率阈值的配置参数确定为第二配置参数;通过管理配置单元,根据各个第一配置参数对应的变更频率,计算各个第一配置参数对应的第一监测周期;变更频率与第一监测周期呈负相关;通过管理配置单元,基于第一监测周期,监测针对第一配置参数产生变更的配置数据,得到第一数据集;基于预设监测周期,监测针对第二配置参数产生变更的配置数据,得到第二数据集;基于第一数据集或第二数据集中的至少一者,得到配置数据集。Through the management configuration unit, statistics are collected on the change frequencies corresponding to the respective configuration parameters in the subscription configuration parameter set. In the subscription configuration parameter set, the configuration parameter whose change frequency is greater than the frequency threshold is determined as the first configuration parameter, and the configuration parameter whose change frequency is less than or equal to the frequency threshold is determined as the second configuration parameter; through the management configuration unit, the first monitoring period corresponding to each first configuration parameter is calculated according to the change frequency corresponding to each first configuration parameter; the change frequency is negatively correlated with the first monitoring period; through the management configuration unit, based on the first monitoring period, the configuration data that has changed with respect to the first configuration parameter is monitored to obtain a first data set; based on the preset monitoring period, the configuration data that has changed with respect to the second configuration parameter is monitored to obtain a second data set; based on at least one of the first data set or the second data set, a configuration data set is obtained.

上述配置数据更新装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above configuration data updating device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储配置数据集、订阅配置参数集等数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种配置数据更新方法。In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O) and a communication interface. The processor, the memory and the input/output interface are connected via a system bus, and the communication interface is connected to the system bus via the input/output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a configuration data set and a subscription configuration parameter set. The input/output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a configuration data update method is implemented.

在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图8所示。该计算机设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、近场通信(Near Field Communication,NFC)或其他技术实现。该计算机程序被处理器执行时以实现一种配置数据更新方法。该计算机设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置。显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input/output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input/output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input/output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a configuration data update method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

本领域技术人员可以理解,图7、8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structures shown in FIGS. 7 and 8 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性存储器和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(Resistive Random Access Memory,ReRAM)、磁变存储器(Magnetoresistive RandomAccess Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器、人工智能(Artificial Intelligence,AI)处理器等,不限于此。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本申请记载的范围。The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims (10)

Translated fromChinese
1.一种配置数据更新方法,其特征在于,所述方法包括:1. A configuration data updating method, characterized in that the method comprises:通过目标应用程序中的管理配置单元获取所述目标应用程序对应的当前配置文件,从当前配置文件中,监测针对所述目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将所述配置数据集发布至所述消息代理;当前配置文件包含所述目标应用程序中各个业务单元分别对应的配置子文件,所述配置子文件包括多个配置参数各自的配置数据;Obtain the current configuration file corresponding to the target application through the management configuration unit in the target application, monitor the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of each of the multiple configuration parameters;通过所述消息代理根据所述各个业务单元分别订阅的订阅配置参数,将所述配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。The configuration data in the configuration data set is pushed to the corresponding business unit through the message agent according to the subscription configuration parameters subscribed by each business unit, so that the business unit enables the received configuration data.2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, characterized in that the method further comprises:当所述目标应用程序中出现新增业务单元时,通过所述管理配置单元获取所述新增业务单元对应的订阅配置参数,将所述新增业务单元对应的订阅配置参数添加至所述订阅配置参数集中,得到更新后的订阅配置参数集;When a new business unit appears in the target application, the subscription configuration parameters corresponding to the new business unit are obtained through the management configuration unit, and the subscription configuration parameters corresponding to the new business unit are added to the subscription configuration parameter set to obtain an updated subscription configuration parameter set;通过所述管理配置单元比对所述目标应用程序对应的当前配置文件和历史配置文件,得到新增配置数据,将所述新增配置数据传输至所述新增业务单元,以使所述新增业务单元启用所述新增配置数据。The management configuration unit compares the current configuration file and the historical configuration file corresponding to the target application to obtain new configuration data, and transmits the new configuration data to the new business unit so that the new business unit enables the new configuration data.3.根据权利要求1所述的方法,其特征在于,所述从当前配置文件中,监测针对所述目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,包括:3. The method according to claim 1, characterized in that the step of monitoring the configuration data set that generates changes to the subscription configuration parameter set fed back by the message agent in the target application from the current configuration file comprises:通过所述管理配置单元比对所述订阅配置参数集中的订阅配置参数在所述目标应用程序对应的历史配置文件和当前配置文件中分别对应的配置数据,得到所述目标应用程序针对所述订阅关键字集的配置数据集;By comparing the configuration data corresponding to the subscription configuration parameters in the subscription configuration parameter set in the historical configuration file and the current configuration file corresponding to the target application program, the configuration data set of the target application program for the subscription keyword set is obtained;所述将所述配置数据集中的配置数据传输至所属的订阅配置参数对应的业务单元之后,所述方法还包括:After the configuration data in the configuration data set is transmitted to the business unit corresponding to the subscription configuration parameter, the method further includes:通过所述管理配置单元基于所述当前配置文件更新所述历史配置文件,得到更新后的历史配置文件。The management configuration unit updates the historical configuration file based on the current configuration file to obtain an updated historical configuration file.4.根据权利要求1所述的方法,其特征在于,所述业务单元用于:4. The method according to claim 1, wherein the business unit is used to:获取接收到的配置数据对应的参数启用类型;Get the parameter activation type corresponding to the received configuration data;当所述参数启用类型为即时启用类型时,启用所述接收到的配置数据;When the parameter activation type is an immediate activation type, enabling the received configuration data;当所述参数启用类型为延时启用类型时,根据所述接收到的配置数据对应的延时启用条件,启用所述接收到的配置数据。When the parameter enabling type is a delayed enabling type, the received configuration data is enabled according to the delayed enabling condition corresponding to the received configuration data.5.根据权利要求4所述的方法,其特征在于,所述方法还包括:5. The method according to claim 4, characterized in that the method further comprises:通过所述管理配置单元根据业务单元对应的业务逻辑,确定接收到的配置数据对应的参数启用类型;Determining, by the management configuration unit, a parameter activation type corresponding to the received configuration data according to the business logic corresponding to the business unit;当所述参数启用类型为延时启用类型时,通过所述管理配置单元根据所述目标应用程序对应的业务需求和业务单元对应的业务逻辑,确定所述接收到的配置数据对应的延时启用条件;所述延时启用条件为到达延时间隔或触发启用事件。When the parameter activation type is a delayed activation type, the management configuration unit determines the delayed activation condition corresponding to the received configuration data according to the business requirements corresponding to the target application and the business logic corresponding to the business unit; the delayed activation condition is reaching the delay interval or triggering an activation event.6.根据权利要求1所述的方法,其特征在于,所述监测针对所述目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,包括:6. The method according to claim 1, characterized in that the monitoring of the configuration data set generated by the subscription configuration parameter set fed back by the message agent in the target application comprises:通过所述管理配置单元,统计所述订阅配置参数集中各个配置参数分别对应的变更频率,在所述订阅配置参数集中,将变更频率大于频率阈值的配置参数确定为第一配置参数,将变更频率小于或等于所述频率阈值的配置参数确定为第二配置参数;By means of the management configuration unit, statistics are given on the change frequencies of the configuration parameters in the subscription configuration parameter set, and in the subscription configuration parameter set, the configuration parameter whose change frequency is greater than the frequency threshold is determined as the first configuration parameter, and the configuration parameter whose change frequency is less than or equal to the frequency threshold is determined as the second configuration parameter;通过所述管理配置单元,根据各个所述第一配置参数对应的变更频率,计算各个所述第一配置参数对应的第一监测周期;所述变更频率与所述第一监测周期呈负相关;By means of the management configuration unit, according to the change frequency corresponding to each of the first configuration parameters, the first monitoring period corresponding to each of the first configuration parameters is calculated; the change frequency is negatively correlated with the first monitoring period;通过所述管理配置单元,基于所述第一监测周期,监测针对所述第一配置参数产生变更的配置数据,得到第一数据集;基于预设监测周期,监测针对所述第二配置参数产生变更的配置数据,得到第二数据集;基于所述第一数据集或所述第二数据集中的至少一者,得到所述配置数据集。Through the management configuration unit, based on the first monitoring period, the configuration data generated by the changes in the first configuration parameter is monitored to obtain a first data set; based on the preset monitoring period, the configuration data generated by the changes in the second configuration parameter is monitored to obtain a second data set; based on at least one of the first data set or the second data set, the configuration data set is obtained.7.一种配置数据更新装置,其特征在于,所述装置包括:7. A configuration data updating device, characterized in that the device comprises:管理配置模块,用于通过目标应用程序中的管理配置单元获取所述目标应用程序对应的当前配置文件,从当前配置文件中,监测针对所述目标应用程序中的消息代理反馈的订阅配置参数集产生变更的配置数据集,将所述配置数据集发布至所述消息代理;当前配置文件包含所述目标应用程序中各个业务单元分别对应的配置子文件,所述配置子文件包括多个配置参数各自的配置数据;A management configuration module is used to obtain a current configuration file corresponding to the target application through a management configuration unit in the target application, monitor a configuration data set that generates changes to a subscription configuration parameter set fed back by a message agent in the target application from the current configuration file, and publish the configuration data set to the message agent; the current configuration file contains configuration sub-files corresponding to each business unit in the target application, and the configuration sub-files include configuration data of each of a plurality of configuration parameters;消息代理模块,用于通过所述消息代理根据所述各个业务单元分别订阅的订阅配置参数,将所述配置数据集中的配置数据推送到相应的业务单元,以使业务单元启用接收到的配置数据。The message proxy module is used to push the configuration data in the configuration data set to the corresponding business unit through the message proxy according to the subscription configuration parameters subscribed by each business unit, so that the business unit activates the received configuration data.8.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至6中任一项所述的方法的步骤。8. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.10.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。10. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
CN202411068885.9A2024-08-062024-08-06 Configuration data updating method, device, computer equipment, readable storage medium and program productPendingCN118656098A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202411068885.9ACN118656098A (en)2024-08-062024-08-06 Configuration data updating method, device, computer equipment, readable storage medium and program product

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202411068885.9ACN118656098A (en)2024-08-062024-08-06 Configuration data updating method, device, computer equipment, readable storage medium and program product

Publications (1)

Publication NumberPublication Date
CN118656098Atrue CN118656098A (en)2024-09-17

Family

ID=92699703

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202411068885.9APendingCN118656098A (en)2024-08-062024-08-06 Configuration data updating method, device, computer equipment, readable storage medium and program product

Country Status (1)

CountryLink
CN (1)CN118656098A (en)

Similar Documents

PublicationPublication DateTitle
US11876817B2 (en)Modeling queue-based message-oriented middleware relationships in a security system
CN111831420A (en) Method, apparatus, electronic device, and computer-readable storage medium for task scheduling
CN110928655A (en) A task processing method and device
US11381488B2 (en)Centralized, scalable, resource monitoring system
CN111782341B (en)Method and device for managing clusters
CN112860343B (en) Configuration change method, system, device, electronic device and storage medium
CN114900449B (en)Resource information management method, system and device
CN110908793A (en)Long-time task execution method, device, equipment and readable storage medium
CN113886032A (en) Event scheduling method, device, electronic device and storage medium
US20220044144A1 (en)Real time model cascades and derived feature hierarchy
CN111917814B (en)Data publishing method, data subscribing method, data publishing device, data subscribing system and readable storage medium
CN113467956B (en)Node resource management method and device
CN114553959A (en) On-demand delivery method and application of cloud native service grid configuration based on situational awareness
CN111954869B (en)System, method, and medium for user interface optimization for delay data
CN108696559B (en) Stream processing method and device
US12073263B1 (en)Dynamic processing of API requests
US12153551B2 (en)Intelligent cloud portal integration
CN112099933A (en) A task operation, query method, device, electronic device and storage medium
CN118400447A (en)Internet of things protocol adaptation method, device and computer equipment
CN118656098A (en) Configuration data updating method, device, computer equipment, readable storage medium and program product
CN111240998A (en)Test case processing method and device
CN117193959A (en)Task scheduling method, device, computer equipment and storage medium
US20230125503A1 (en)Coordinated microservices
CN115883639A (en)Web real-time message pushing method and device, equipment and storage medium
CN120281649B (en) Service update method, device, computer equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp