WO2015154435A1 - 软件参数的管理方法及装置 - Google Patents
软件参数的管理方法及装置 Download PDFInfo
- Publication number
- WO2015154435A1 WO2015154435A1 PCT/CN2014/089500 CN2014089500W WO2015154435A1 WO 2015154435 A1 WO2015154435 A1 WO 2015154435A1 CN 2014089500 W CN2014089500 W CN 2014089500W WO 2015154435 A1 WO2015154435 A1 WO 2015154435A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- tree
- parameter
- value
- software
- parameter information
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Definitions
- the present invention relates to the field of computers, and in particular to a method and apparatus for managing software parameters.
- a software component parameter configuration method includes the following steps: the device management server delivers software component parameters to the terminal device; and the terminal device configures the received software component parameters to the corresponding software component.
- the invention also discloses a software component parameter configuration system and its corresponding terminal device.
- the related technology is mainly used for configuring the center to send the terminal software parameters.
- the software system served by the delivered software parameter is a distributed multi-process complex system
- the function of the patent cannot solve the complexity of the distributed multi-process. The requirements of the system application scenario.
- the invention provides a method and a device for managing software parameters, so as to at least solve the management method of relatively simple software parameters in the related art, which is not conducive to software management problems.
- a method for managing software parameters including: loading a configuration tree for storing software parameter information, where the parameter information includes: an association relationship between the parameters; The software parameter information is managed in the configuration tree by using the association relationship.
- the software parameter information further includes: a parameter value;
- the configuration tree includes: a definition tree in which priorities are sequentially decremented, an instance value tree, and a default value tree; and the definition tree is used to record the parameters.
- a default value tree is used for recording Determining a parameter default value in the parameter value, and storing the solidified parameter default value in the program area;
- the instance value tree is used to record a parameter obtained by modifying the default value of the parameter A value that stores the default value that needs to be modified in the data area.
- loading a configuration tree for storing software parameter information includes: loading the definition tree and the default value tree from the program area; and loading the instance value tree from the data area.
- the method further includes: when the software parameter information is deployed on multiple physical machines, multiple process instances on different physical machines are respectively placed on different instance value trees.
- the instance value tree includes: a local instance value tree and a global instance value tree, wherein the local instance value tree has a higher priority than the global instance value tree.
- the instance value tree is stored in a distributed cache, where the distributed cache is used to implement sharing of the software parameter information by the multi-process instance tree.
- managing the software parameter information by using the association relationship in the configuration tree including: receiving management request information of the user, where the management request information carries a user code; The code calls the specified interface corresponding to the user code to manage the software parameter information, wherein the specified interface is used to indicate a management manner of the software parameter information.
- the managing includes querying and/or updating; and managing the software parameter information by using the user code to invoke a specified interface corresponding to the user code comprises: according to a priority of the configuration tree and the The user code locates a configuration tree in which the software parameter information is located; searches for a parameter value in the software parameter information in a positioning configuration tree; and/or, when the parameter value is not found in the positioning configuration tree The parameter values are further looked up in other configuration trees in the distributed cache.
- a software parameter management apparatus including: a loading module, configured to load a configuration tree for storing software parameter information, wherein the parameter information includes: between each parameter
- the association module is configured to manage the software parameter information by using the association relationship in the configuration tree.
- the software parameter information further includes: a parameter value;
- the configuration tree includes: a definition tree in which priorities are sequentially decremented, an instance value tree, and a default value tree; and the definition tree is used to record the parameters.
- a default value tree is used for recording Determining a parameter default value in the parameter value, and storing the solidified parameter default value in the program area;
- the instance value tree is used to record a parameter obtained by modifying the default value of the parameter A value that stores the default value that needs to be modified in the data area.
- the loading device is further configured to load the definition tree and the default value tree from the program area; and load the instance value tree from the data area.
- the device further includes: a placement module, configured to place multiple process instances on different physical machines on different instance value trees when the software parameter information is deployed on multiple physical machines .
- a placement module configured to place multiple process instances on different physical machines on different instance value trees when the software parameter information is deployed on multiple physical machines .
- the instance value tree includes: a local instance value tree and a global instance value tree, wherein the local instance value tree has a higher priority than the global instance value tree.
- the instance value tree is stored in a distributed cache, where the distributed cache is used to implement sharing of the software parameter information by the multi-process instance tree.
- the loading module includes: a receiving unit, configured to receive management request information of the user, where the management request information carries a user code; and the management unit is configured to invoke the user code by using the user code
- the specified interface corresponding to the user code manages the software parameter information, wherein the specified interface is used to indicate a management manner of the software parameter information.
- the management includes querying and/or updating; the management unit is further configured to: locate a configuration tree where the software parameter information is located according to a priority of the configuration tree and the user code; and configure the positioning Searching for a parameter value in the software parameter information in the tree; and/or, if the parameter value is not found in the configured configuration tree, further searching for the parameter value in another configuration tree in the distributed cache .
- the software parameter information in the loading configuration tree is used, and the software parameter information is managed by using the association relationship of the software parameter information, thereby solving the relatively simple software parameter management method in the related technology, which is not conducive to the software. Management issues have improved the efficiency of software management.
- FIG. 1 is a schematic flow chart of a method for managing software parameters according to an embodiment of the present invention
- FIG. 2 is a structural block diagram of a device for managing software parameters according to an embodiment of the present invention
- FIG. 3 is a block diagram 1 of an optional structure of a software parameter management apparatus according to an embodiment of the present invention.
- FIG. 4 is a block diagram 2 of an optional structure of a software parameter management apparatus according to an embodiment of the present invention.
- 5a-5b are schematic diagrams showing the principle of a parameter management mechanism according to an alternative embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a parameter management mechanism according to an alternative embodiment of the present invention.
- FIGS. 7a-7b are flow diagrams of a parameter management mechanism in accordance with an alternative embodiment of the present invention.
- FIG. 1 is a schematic flowchart of a method for managing software parameters according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:
- Step S102 Loading a configuration tree for storing software parameter information, where the parameter information includes: an association relationship between the parameters;
- Step S104 The software parameter information is managed by using the association relationship in the configuration tree.
- the software parameter information further includes: a parameter value;
- the configuration tree includes: a definition tree in which the priorities are successively decremented, an instance value tree, and a default value tree;
- the definition tree is used to record the association relationship between the parameters, and The association relationship is stored in the program area, wherein the association relationship is described by a macro definition for directing different parameters to the same variable;
- the default value tree is used to record the default value of the parameter that is solidified in the parameter value, and The default value of the solidified parameter is stored in the program area;
- the instance value tree is used to record the parameter value obtained by modifying the default value of the parameter, and the default value to be modified is stored in the data area.
- loading a configuration tree for storing software parameter information includes: loading a definition tree and a default value tree from the program area; and loading an instance value tree from the data area.
- the embodiment of the present invention further includes: when the software parameter information is deployed on multiple physical machines, multiple process instances on different physical machines are respectively placed on different instance value trees.
- the instance value tree includes: a local instance value tree and a global instance value tree, wherein the local instance value tree has a higher priority than the global instance value tree.
- the instance value tree is stored in a distributed cache, where the distributed cache is used to implement sharing of software parameter information by the multi-process instance tree.
- the software parameter information is managed by using an association relationship in the configuration tree, including: receiving management request information of the user, where the management request information carries a user code; and the user is invoked by the user code
- the specified interface corresponding to the code manages the software parameter information, wherein the designated interface is used to indicate the management mode of the software parameter information.
- the management includes querying and/or updating; and the software parameter information is managed by calling the specified interface corresponding to the user code by the user code, including: configuring a configuration tree where the software parameter information is located according to the priority of the configuration tree and the user code; Finding parameter values in the software parameter information in the located configuration tree; and/or, if no parameter values are found in the located configuration tree, further searching for parameter values in other configuration trees in the distributed cache.
- the embodiment of the present invention further provides a software parameter management device, which can be used to implement the foregoing method embodiment of the present invention.
- 2 is a structural block diagram of a software parameter management apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes: a loading module 22 configured to load a configuration tree for storing software parameter information, where the parameter information includes : an association relationship between the parameters; the management module 24 is configured to manage the software parameter information by using the association relationship in the configuration tree.
- the software parameter information further includes: a parameter value;
- the configuration tree includes: a definition tree in which the priorities are successively decremented, an instance value tree, and a default value tree;
- the definition tree is used to record the association relationship between the parameters, and The association relationship is stored in the program area, wherein the association relationship is described by a macro definition for directing different parameters to the same variable;
- the default value tree is used to record the default value of the parameter that is solidified in the parameter value, and The default value of the solidified parameter is stored in the program area;
- the instance value tree is used to record the parameter value obtained by modifying the default value of the parameter, and the default value to be modified is stored in the data area.
- the loading device is further configured to load the definition tree and the default value tree from the program area; and load the instance value tree from the data area.
- FIG. 3 is a block diagram of an optional structure of a software parameter management apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus further includes: a placement module 32 configured to be configured when software parameter information is deployed on multiple physical machines. Multiple process instances on different physical machines are placed on different instance value trees.
- a placement module 32 configured to be configured when software parameter information is deployed on multiple physical machines. Multiple process instances on different physical machines are placed on different instance value trees.
- the instance value tree includes: a local instance value tree and a global instance value tree, wherein the local instance value tree has a higher priority than the global instance value tree.
- the instance value tree is stored in a distributed cache, where the distributed cache is used to implement sharing of software parameter information by the multi-process instance tree.
- the loading module 22 includes: a receiving unit 222, configured to receive management request information of a user, where the management request information is included. Carrying the user code; the management unit 224 is configured to manage the software parameter information by calling the specified interface corresponding to the user code by the user code, wherein the designated interface is used to indicate the management mode of the software parameter information.
- An object of an alternative embodiment of the present invention is to provide a general parameter configuration mechanism that satisfies the functions required for distributed, multi-process, and component framework extensions, so that application component developers, site configurators, and users can perform well. Collaboration to complete customization of complex software features.
- An alternative embodiment of the present invention adopts the following technical solutions:
- the components of the optional implementation of the present invention include: (1) an interface for accepting a request from a client code, defining a functional scope of the parameter management mechanism; and (2) a configuration tree for storing information such as software parameters, association relationships, and parameter values. (3)
- the configuration tree manager is used to manage each configuration tree, maintain the connection relationship between the configuration trees, manage the relationship between the configuration tree and the backend cache; (4) context objects, which are used to describe a query.
- Step A Load the parameter management mechanism.
- This process is mainly used to load the parameter management service when the process is initialized. The process is initiated by the process initialization program, creating a configuration tree manager, connecting the back-end distributed cache, and loading each configuration tree to perform some parameter legality checks. It is the parameter management service that is ultimately in a serviceable state;
- Step B Registration item query and update.
- the client code can query and update the parameters using the interface. These operations are passed to the configuration tree manager and the associated distributed cache, and finally the result is parsed, returning a parsed parameter value, or setting the new parameter to the appropriate configuration tree;
- Step C Parameter update notification.
- the parameters that need to track changes, and the associated callback functions, are first registered by the client code to the parameter management mechanism.
- the notification mechanism then analyzes the parameter list associated with the parameter and caches it. Finally, after the configuration tree manager listens to the parameter change notification of the distributed cache, the notification mechanism is invoked to perform parameter filtering, and the client callback function with parameter changes is called back.
- the configuration tree is a data structure for storing software parameter items and their values;
- the parameter association relationship is a relationship between parameters, that is, The value of one parameter depends on the dependency of the value of one or more parameters;
- the default value of the parameter is a value selected by the developer in advance during the development phase, which is associated with the software version.
- the parameter instance value is the value set for the parameter after the actual installation and deployment of the process. This value is affected by the specific operating environment and may be changed during actual operation.
- the technical solution of the optional embodiment of the present invention can support distributed, multiple coverage, development and configuration independence, parameter definition structure and good parameter organization.
- the prior art does not provide such a comprehensive solution to the alternative embodiment of the invention.
- FIG. 5a-5b are schematic diagrams showing the principle of a parameter management mechanism according to an alternative embodiment of the present invention.
- an alternative embodiment of the present invention uses a tree structure to present parameters.
- the name-value pairs of the parameters are stored in the nodes of the tree structure, and are uniquely identified by the path and parameter name starting from the root node.
- a node of a tree structure is equivalent to a parameter namespace, which can contain multiple subspaces and multiple parameter name value pairs. Parameter names in the same namespace cannot be duplicated, but parameters and subspaces in different namespaces can take the same name.
- Hierarchical parameter definition allows component developers to care only about the subspaces to which their own modules are assigned, so that the parameter definitions of this module are concentrated in a small area that is easy to manage, without worrying about the parameters of other modules and this module.
- the parameter definitions conflict.
- connection port parameters of the client and the listening port parameters of the server need to be consistent. This actually means that some parameters of the client module and the server module are related.
- a macro definition is introduced to describe such an association relationship between parameters.
- the macro definition allows different parameters to point to the same variable. By modifying this variable, the modification can take effect in multiple parameters at the same time. Another benefit of introducing a macro definition is that it separates the program-oriented configuration from the user-oriented configuration.
- the parameters defined by the module developer are mostly oriented to the program structure. This parameter is easy for the programmer to understand but not convenient for the user. Using macro definitions, you can define parameter names and hierarchies that are easy for the user to understand, completely independent of the program, and then associate the two through macro definitions. Users only need to operate well-defined parameters to affect the parameters defined inside the program. Associative parameters of the parameters are not inherent in the application, so they are recorded in a separate configuration tree and stored in the program area so that the user cannot modify them in the field. This tree is the definition tree 502. .
- each parameter In large programs, there are many parameter definitions for each part, but in field applications it is usually only necessary to modify a small number of parameters. In order to reduce the maintenance workload, each parameter must define a default value. When upgrading, the default value may change. In order to distinguish from the default value change caused by user modification, the present invention solidifies the default value and stores it in the program area, and stores the modified part of the default value in The data area, so there is a difference between the default value tree and the instance value tree. The invention implements the modification of the default value by the user by the way that the instance value tree takes precedence over the default value tree, and at the same time maintains the convenience of the default value upgrade. In Figure 5, 504 is the default value tree and 503 is the instance value tree.
- the definition tree, the instance value tree, and the default value tree are internal data structures of the present invention, and the three trees are superimposed in order of decreasing 502, 503, and 504 priorities, so that the unique parameters are seen from the perspective of the client code.
- Configuration tree The client code queries the parameters first to the definition tree, and then to the instance value tree and the default value tree. If the parameter item is found in the previous tree, its value is obtained and then parsed; if the parameter item is not found in the previous tree, skip to the next tree and continue the query. For the obtained parameter values, the present invention further analyzes them. If there is a macro definition, the above operation is performed on the macro definition from the first tree, and the result is replaced with the area defined by the original macro.
- An application based on a distributed component framework is deployed on multiple physical machines. There are multiple different process types on each machine. Each process type defines a different combination of components. Each type of process can be used at runtime. Instantiated as multiple process instances. In these process instances, the parameters used can have different characteristics and can be divided into the following categories: the same parameters on each server, the same parameters on the same server, and the same type of process on the same server. Parameters visible to the process, only parameters visible to a process instance. The optional embodiment of the present invention places parameters of different visibility on different instance trees, and organizes the instance trees into a forest in a localized and global manner, thereby realizing functional requirements that can be globally shared and partially covered. . As shown in Figure 5b, 515 covers 518, then covers 514, and finally covers 512.
- the optional embodiment of the present invention stores the instance tree in a distributed cache, and organizes according to the server global, the server instance, the specific server process type global, the process type, and the like.
- each process finds its own instance tree according to its own server instance ID, process type identifier, and process instance ID, and performs data mapping.
- two subdirectories of frame and component are defined under the root node of the data structure.
- the parameters of the component and the framework are stored in different physical locations. Load it into the same tree when it starts. Since the subdirectories are stored separately, the system can easily determine the illegal parameters defined by the components and the framework at the time of loading, thereby avoiding conflicts of parameters.
- Parameter coverage in multi-process systems poses a problem. Although most parameters can override global values with local values, some parameters must be identical for each process, while others must be different for each process. For such parameters, the present invention uses public, protected, and private subspaces for distinguishing. Public stores parameter items that can be partially covered, protected items that cannot be partially overwritten, and private items that must be locally defined. Parameter coverage limitations can be achieved by restricting different instance trees from loading different subspaces and indicating the path attributes of the parameter items in the definition tree.
- Alternative embodiments of the present invention support parameter change notifications.
- the client code first signs up to track changes in a parameter item in a registered manner. Then the parameter management mechanism finds all the dependent parameter items of the parameter item and caches them. In the internal data structure. When a parameter item changes, the parameter management mechanism automatically queries the affected registration item, then updates the dependency of the registration parameter item, and notifies the client code.
- FIG. 6 is a schematic structural diagram of a parameter management mechanism according to an alternative embodiment of the present invention.
- an application scenario of an optional embodiment of the present invention includes two parts: a client code and a parameter management mechanism.
- the 501 client code is a user of the present invention, and invokes an interface provided by the parameter management mechanism to perform parameter query and update operations, and the parameter management mechanism is responsible for responding to the request of the client code, loading and persisting, checking, and parsing the parameters, and Notify the registered customer code when the parameter changes.
- Parameter management mechanisms include interfaces, configuration tree managers, notification mechanisms, distributed caching, and more.
- Interface 601 is responsible for interacting with the client code, accepting queries or update requests from the client code, and then forwarding to the configuration tree manager and notification mechanism.
- the configuration tree manager 602 is responsible for managing the core data structure, accepting the request information of the interface 601 and the notification mechanism 607, and providing a distributed cache proxy for the configuration tree.
- Each configuration tree 603 includes a definition tree, an instance value tree, and a default value tree, and the instance value tree is further divided into multiple trees according to a local hierarchical relationship.
- the trees form the forest in the order of definitions, partial instances, global instances, and default values.
- 604 is the lookup context on a tree, representing the intermediate state of a lookup.
- the distributed cache system includes a caching proxy 605 and a distributed cache 606, which enable the parameter management mechanism of each process instance to share parameter data and notify the configuration tree manager of each process instance when a certain parameter changes.
- the parameter data in the distributed cache 606 is stored in the manner of FIG.
- the notification mechanism 607 accepts the tracking registration of a parameter item by the client code. It internally maintains the relationship between the client callback code and the corresponding associated parameter sequence.
- the notification mechanism is invoked when the configuration tree manager gets a distributed cache of data change notifications.
- the notification mechanism further checks if the parameter change hits the internal cache data. If hit, the associated client code callback function is called.
- FIG. 7a-7b are schematic flowcharts of a parameter management mechanism according to an alternative embodiment of the present invention.
- the system flow of the optional embodiment of the present invention mainly includes two parts of initialization and query update, which are respectively described as follows.
- the process includes the following methods:
- the parameter management service creates a configuration tree manager, a notification mechanism, and an interface
- FIG. 7a is an initialization process in a system flow according to an alternative embodiment of the present invention. As shown in FIG. 7a, the process further includes the following steps:
- Step S701 Create a configuration manager.
- Step S702 Loading a global configuration tree.
- Step S703 Loading a server-level configuration tree
- Step S704 Load a process type level configuration tree.
- Step S705 Load a process instance configuration tree.
- Step S706 Create a configuration tree object.
- Step S707 Associate the configuration cache
- Step S708 data legality check
- Step S709 Reporting an error.
- the query update process of this embodiment is described below, and the process includes the following methods:
- the client code calls the interface of the parameter management mechanism
- the configuration manager locates the definition tree
- the configuration tree manager generates a context object for the query, and the context is associated with the root node of the current configuration tree;
- the interface queries the configuration tree through the context.
- the configuration tree passes the query to the caching proxy provided by the configuration tree manager;
- the configuration tree searches for parameters in the distributed cache.
- FIG. 7b is a query update process in the system flow of the optional embodiment of the present invention.
- the process treasure store has the following steps:
- Step S710 Invoking a configuration query interface
- Step S711 Generate a context for the query
- Step S712 Query the configuration tree by using the context
- Step S713 The configuration manager connects to the cache loading data
- Step S714 whether it is found
- Step S715 parsing the result
- Step S716 Whether a conversion is needed
- Step S717 The result is returned.
- the large-scale application software applied to the multi-process distributed component framework provides a hierarchical software parameter management mechanism with clear structure and comprehensive functions, thereby simplifying the development and maintenance workload for software parameters, and Conducive to the definition of user-friendly software parameters.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in a storage device for execution by the computing device, or they may be separately fabricated into individual integrated circuit modules. Blocks, or a plurality of modules or steps in them, are implemented as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
- the software parameter information in the loading configuration tree is used, and the software parameter information is managed by using the association relationship of the software parameter information, thereby solving the relatively simple software parameter management method in the related technology, which is not conducive to the software. Management issues have improved the efficiency of software management.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本发明提供了一种软件参数的管理方法及装置,其中该方法采用了加载用于存放软件参数信息的配置树,其中,参数信息包括:各参数之间的关联关系;在配置树中利用关联关系对所述软件参数信息进行管理。解决了相关技术中比较简单的软件参数的管理方式,而不利于软件管理问题,提高了对软件管理的效率。
Description
本发明涉及计算机领域,具体而言,涉及一种软件参数的管理方法及装置。
相关技术在基于组件框架的多进程分布式软件的运行过程中,系统各部分需要通过多种参数来定制其运行时的行为特征。这些参数有别于在开发阶段就已经写入某些配置文件(如xml)的数据,它们受运行环境影响且代表用户一贯的要求,因而不能在产品开发阶段将其固化,只能等到安装、部署,甚至运行阶段才能最终确定。这些数据在系统升级的时候往往需要进行保留。我们将这些参数称为部署参数,简称为参数。
在大型软件中,系统各部分的参数往往很多,且通常随组件的集成而动态变化。系统各部分对这些参数都需要读取和更新。对于开发阶段确定的配置项,可由系统各部分自行存放和维护,不需要考虑集中的管理,在系统打补丁和升级的时候,直接随版本更新即可。对于部署参数,如果让系统各部分自己处理,则会造成混乱,不利于软件的升级和维护。因此,需要提供统一的管理和访问机制供系统各部分使用。在系统安装部署的时候统一考虑其初始化,在系统运行期统一考虑其读取写入和持久化,在补丁升级过程中还要统一考虑其数据迁移。为了便于维护,在此基础上,可以开发一个可视化的工具,将配置参数以树或图、表的形式呈现给操作维护人员,进行统一的集中管理。
在多进程分布式组件框架的应用系统中,还存在多个进程实例需要共享参数、参数局部定义覆盖全局定义、参数变化通知等需求。
软件参数配置领域长期以来都是不被重视的领域,大多数应用软件仅采用简单的配置文件方式,进行参数管理,并没有形成专门的参数管理机制。其主要原因在于一般的应用程序,在配置方面的需求比较简单,不需要设计复杂的参数管理机制。但在由多项目组成的分布式组件框架领域,由于存在分布式共享、框架和组件的分离、组件的扩展性等复杂问题,对专门的参数管理机制的需求就显得特别突出。
目前比较复杂的参数管理机制有windows的注册表机制等。相关的专利有CN1848760发明名称:为软件组件参数配置方法及系统、及其终端设备。该发明公开
了一种软件组件参数配置方法,包括步骤:设备管理服务器下发软件组件参数到终端设备;所述终端设备将接收的软件组件参数配置给对应的软件组件。相应的,该发明还公开了一种软件组件参数配置系统及其相应的终端设备。
可见相关技术中主要用于配置中心对终端软件参数的下发,当被下发的软件参数所服务的软件系统为分布式多进程的复杂系统,该专利其功能不能解决分布式多进程的复杂系统应用场景的需求。
针对相关技术中比较简单的软件参数的管理方式,而不利于软件的管理问题,目前尚未提出有效的解决方案。
发明内容
本发明提供了一种软件参数的管理方法及装置,以至少解决相关技术中比较简单的软件参数的管理方式,而不利于软件的管理问题。
根据本发明的一个实施例,提供了一种软件参数的管理方法,包括:加载用于存放软件参数信息的配置树,其中,所述参数信息包括:各参数之间的关联关系;在所述配置树中利用所述关联关系对所述软件参数信息进行管理。
可选地,所述软件参数信息中还包括:参数值;所述配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;所述定义树用于记录所述各参数之间的关联关系,并将所述关联关系存储在程序区,其中,所述关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录所述参数值中固化的参数缺省值,并将所述固化的参数缺省值存储在所述程序区;所述实例值树用于记录对所述参数缺省值进行修改后得到的参数值,将所述需要修改的缺省值存储在数据区。
可选地,加载用于存放软件参数信息的配置树包括:从所述程序区加载所述定义树和所述缺省值树;从所述数据区加载所述实例值树。
可选地,所述方法还包括:当所述软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的所述实例值树上。
可选地,所述实例值树包括:局部实例值树和全局实例值树,其中,所述局部实例值树的优先级高于所述全局实例值树的优先级。
可选地,所述实例值树存储在分布式缓存中,其中,所述分布式缓存用于实现多进程实例树对所述软件参数信息的共享。
可选地,在所述配置树中利用所述关联关系对所述软件参数信息进行管理,包括:接收用户的管理请求信息,其中,所述管理请求信息中携带有用户代码;通过所述用户代码调用与所述用户代码对应的指定接口对所述软件参数信息进行管理,其中,所述指定接口用于指示所述软件参数信息的管理方式。
可选地,所述管理包括查询和/或更新;通过所述用户代码调用与所述用户代码对应的指定接口对所述软件参数信息进行管理包括:根据所述配置树的优先级和所述用户代码定位所述软件参数信息所在的配置树;在定位的配置树中查找所述软件参数信息中的参数值;和/或,在所述定位的配置树中未查找到所述参数值时,在分布式缓存中的其它配置树中进一步查找所述参数值。
根据本发明的另一个实施例,提供了一种软件参数的管理装置,包括:加载模块,设置为加载用于存放软件参数信息的配置树,其中,所述参数信息包括:各参数之间的关联关系;管理模块,设置为在所述配置树中利用所述关联关系对所述软件参数信息进行管理。
可选地,所述软件参数信息中还包括:参数值;所述配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;所述定义树用于记录所述各参数之间的关联关系,并将所述关联关系存储在程序区,其中,所述关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录所述参数值中固化的参数缺省值,并将所述固化的参数缺省值存储在所述程序区;所述实例值树用于记录对所述参数缺省值进行修改后得到的参数值,将所述需要修改的缺省值存储在数据区。
可选地,所述加载装置还设置为,从所述程序区加载所述定义树和所述缺省值树;从所述数据区加载所述实例值树。
可选地,所述装置还包括:放置模块,设置为当所述软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的所述实例值树上。
可选地,所述实例值树包括:局部实例值树和全局实例值树,其中,所述局部实例值树的优先级高于所述全局实例值树的优先级。
可选地,所述实例值树存储在分布式缓存中,其中,所述分布式缓存,用于实现多进程实例树对所述软件参数信息的共享。
可选地,所述加载模块包括:接收单元,设置为接收用户的管理请求信息,其中,所述管理请求信息中携带有用户代码;管理单元,设置为通过所述用户代码调用与所
述用户代码对应的指定接口对所述软件参数信息进行管理,其中,所述指定接口用于指示所述软件参数信息的管理方式。
可选地,所述管理包括查询和/或更新;所述管理单元还设置为,根据所述配置树的优先级和所述用户代码定位所述软件参数信息所在的配置树;在定位的配置树中查找所述软件参数信息中的参数值;和/或,在所述定位的配置树中未查找到所述参数值时,在分布式缓存中的其它配置树中进一步查找所述参数值。
通过本发明实施例,采用加载配置树中的软件参数信息,利用软件参数信息的关联关系对软件参数信息进行管理的方式,解决了相关技术中比较简单的软件参数的管理方式,而不利于软件管理问题,提高了对软件管理的效率。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的软件参数的管理方法的流程示意图;
图2是根据本发明实施例的软件参数的管理装置的结构框图;
图3是根据本发明实施例的软件参数的管理装置的可选结构框图一;
图4是根据本发明实施例的软件参数的管理装置的可选结构框图二;
图5a~5b是根据本发明可选实施例的参数管理机制的原理示意图;
图6是根据本发明可选实施例的参数管理机制的结构示意图;
图7a~7b是根据本发明可选实施例的参数管理机制的流程示意图。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。
本发明实施例提供了一种软件参数管理的方法及装置,图1是根据本发明实施例的软件参数管理的方法的流程示意图,如图1所示,包括如下的步骤:
步骤S102:加载用于存放软件参数信息的配置树,其中,参数信息包括:各参数之间的关联关系;
步骤S104:在配置树中利用关联关系对软件参数信息进行管理。
通过本发明实施例,通过加载配置树中的软件参数信息,利用软件参数信息的关联关系对软件参数信息进行管理的方式,解决了相关技术中比较简单的软件参数的管理方式,而不利于软件管理问题,提高了对软件管理的效率。
可选地,软件参数信息中还包括:参数值;配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;定义树用于记录各参数之间的关联关系,并将关联关系存储在程序区,其中,关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录参数值中固化的参数缺省值,并将固化的参数缺省值存储在程序区;实例值树用于记录对参数缺省值进行修改后得到的参数值,将需要修改的缺省值存储在数据区。
可选地,加载用于存放软件参数信息的配置树包括:从程序区加载定义树和缺省值树;从数据区加载实例值树。
可选地,本发明实施例还包括:当软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的实例值树上。
可选地,实例值树包括:局部实例值树和全局实例值树,其中,局部实例值树的优先级高于全局实例值树的优先级。
可选地,实例值树存储在分布式缓存中,其中,分布式缓存,用于实现多进程实例树对软件参数信息的共享。
可选地,在配置树中利用关联关系对软件参数信息进行管理,包括:接收用户的管理请求信息,其中,所述管理请求信息中携带有用户代码;通过所述用户代码调用与所述用户代码对应的指定接口对软件参数信息进行管理,其中,指定接口用于指示软件参数信息的管理方式。
可选地,管理包括查询和/或更新;通过用户代码调用与用户代码对应的指定接口对软件参数信息进行管理包括:根据配置树的优先级和用户代码定位软件参数信息所在的配置树;在定位的配置树中查找软件参数信息中的参数值;和/或,在定位的配置树中未查找到参数值时,在分布式缓存中的其它配置树中进一步查找参数值。
本发明实施例还提供了一种软件参数的管理装置,该装置可以用于实现上述本发明方法实施例。图2是根据本发明实施例的软件参数的管理装置的结构框图,如图2所示,该装置包括:加载模块22,设置为加载用于存放软件参数信息的配置树,其中,参数信息包括:各参数之间的关联关系;管理模块24,设置为在配置树中利用关联关系对软件参数信息进行管理。
可选地,软件参数信息中还包括:参数值;配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;定义树用于记录各参数之间的关联关系,并将关联关系存储在程序区,其中,关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录参数值中固化的参数缺省值,并将固化的参数缺省值存储在程序区;实例值树用于记录对参数缺省值进行修改后得到的参数值,将需要修改的缺省值存储在数据区。
可选地,加载装置还设置为,从程序区加载定义树和缺省值树;从数据区加载实例值树。
图3是根据本发明实施例的软件参数的管理装置的可选结构框图一,如图3所示:该装置还包括:放置模块32,设置为当软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的实例值树上。
可选地,实例值树包括:局部实例值树和全局实例值树,其中,局部实例值树的优先级高于全局实例值树的优先级。
可选地,实例值树存储在分布式缓存中,其中,分布式缓存,用于实现多进程实例树对软件参数信息的共享。
图4是根据本发明实施例的软件参数的管理装置的可选结构框图二,如图4所示加载模块22包括:接收单元222,设置为接收用户的管理请求信息,其中,管理请求信息中携带有用户代码;管理单元224,设置为通过用户代码调用与用户代码对应的指定接口对软件参数信息进行管理,其中,指定接口用于指示软件参数信息的管理方式。
为了使本发明的技术方案和实现方法更加清楚,下面将结合可选的实施例对其实现过程进行详细描述。
本发明可选实施例的目的在于,提供一种通用的参数配置机制,满足分布式、多进程、以及组件框架扩展所需要的功能,使应用组件开发者、现场配置者和用户都能很好的协作,共同完成复杂软件功能的定制。本发明可选实施例采用以下技术方案:
本发明可选实施中组成部件包括:(1)接口,用于接受客户代码的请求,定义参数管理机制的功能范围;(2)配置树,用于存放软件参数、关联关系及参数值等信息;(3)配置树管理器,用于管理各配置树,维护配置树之间的连接关系,管理配置树和后端缓存之间的关系;(4)上下文对象,用于描述某次查询的状态信息;(5)通知机制,用于管理客户代码对需要跟踪变化的参数项的注册,并在适当的时候向客户代码发出参数变化通知;(6)缓存代理,用于隔离配置树和具体持久化机制的耦合关系,使配置树可以连接不同的后端持久化机制;(7)分布式缓存,用于实现参数配置的高可用性,和多进程实例的参数共享。
本发明可选实施例工作流程包括以下步骤:
步骤A.加载参数管理机制。该流程主要用于进程初始化的时候加载参数管理服务。该过程由进程初始化程序发起,创建配置树管理器、连接后端分布式缓存,并加载各配置树,进行一些参数合法性检查。是参数管理服务最终处于一种可服务的状态;
步骤B.注册项查询和更新。当参数管理机制加载成功以后,客户代码可以使用接口对参数进行查询和更新。这些操作都被传递到配置树管理器和相关的分布式缓存,最后经过结果解析,返回一个解析后的参数值,或者将新的参数设置到合适的配置树上;
步骤C.参数更新通知。先由客户代码向参数管理机制注册需要跟踪变更的参数,以及相关的回调函数。此后通知机制分析该参数关联的参数列表,对其进行缓存。最后,配置树管理器监听到分布式缓存的参数变更通知后,调用通知机制进行参数过滤,并回调有参数变化的客户回调函数。
针对上述步骤,需要对本发明可选实施例的术语进行解释(1)配置树,是存放软件参数项及其值的数据结构;(2)参数关联关系,是参数之间的一种关系,即一个参数的值依赖于另一个或多个参数的值这样的依赖关系;(3)参数缺省值,是在开发阶段由开发人员事先为参数选择的一个值,该值是和软件版本关联在一起的;(4)参数实例值,是进程实际安装部署以后,为参数设置的值,该值受具体运行环境的影响,并可能在实际运行中改变。
与现有技术相比较,本发明可选实施例的技术方案能够支持分布式、多重覆盖、开发与配置独立、参数定义的结构性和良好的参数组织方式。而现有技术并未提供本发明可选实施例这样全面的解决方案。
下面结合本发明可选实施例的附图对本发明可选实施例分布式消息跟踪的实现方法进行详细的说明。
图5a~5b是根据本发明可选实施例的参数管理机制的原理示意图,如图5a所示,本发明可选实施例使用树形结构展现参数。参数为key=value形式的字符串名值对。参数的名值对存放在树形结构的各级节点中,通过由根节点开始的路径和参数名字进行唯一标识。树形结构的一个节点相当于一个参数命名空间,该命名空间可以包含多个子空间和多个参数名值对。同一个命名空间中参数名字不能重复,但不同命名空间中的参数和子空间可以取相同的名字。层次化的参数定义方式使组件开发者可以只关心自己模块分配到的子空间,使本模块的参数定义集中在一个便于管理的小范围内,而不用担心其他模块的参数会不会和本模块的参数定义相冲突。
在大型系统中,参数之间可能存在关联关系。例如C/S结构中客户端的连接端口参数和服务端的监听端口参数需要保持一致。这实际上说明客户端模块和服务端模块的某些参数具有关联关系。对于这种关联关系,当需要修改参数值时,如果没有一种程序化的机制进行维护,单靠操作手册和手工同步修改的方式,很难保证正确性。因此,在本发明中,引入了宏定义来描述参数之间的这种关联关系。宏定义使得不同的参数可以指向同一个变量,通过修改这个变量就能使修改同时在多个参数中生效。引入宏定义还有一个好处,它将面向程序的配置和面向用户的配置独立开来。模块开发人员定义的参数多是面向程序结构的,这种参数便于程序开发人员理解但不便于用户使用。使用宏定义,可以完全独立于程序定义用户易于理解的参数名字和层次结构,然后将两者通过宏定义关联起来。用户只需操作定义良好的参数,即可影响到程序内部定义的参数。参数的关联关系作为程序固有的属性,不会在应用现场发生改变,因此使用一个独立的配置树来记录,并将其存放在程序区,使用户不能在现场进行修改,这个树就是定义树502。
在大型程序中,各部分的参数定义会非常多,但在现场应用中通常只需要修改少量参数。为了减少维护工作量,各参数都要定义缺省值。在升级的时候,缺省值可能会发生变化,为了同用户修改造成的缺省值变化相区别,本发明将缺省值固化,存放在程序区,而将对缺省值的修改部分存放在数据区,这样就有了缺省值树和实例值树的分别。本发明通过实例值树优先于缺省值树的方式来实现用户对缺省值的修改,同时又能保持缺省值升级的便利性。图5中,504是缺省值树,503是实例值树。
定义树、实例值树和缺省值树是本发明内部的数据结构,三颗树按照502、503、504优先级逐级降低的顺序叠加在一起,使得从客户代码的角度看到唯一的参数配置树。客户代码对参数的查询首先定位到定义树,然后依次到实例值树和缺省值树。如果在前面的树上找到参数项,则获取其值,然后进行解析;如果没有在前面的树上找到该参数项,则跳到下一颗树上继续查询。对于取得的参数值,本发明要进一步对其进行解析,如果存在宏定义,则要从第一颗树开始对宏定义进行上述操作,并将结果替换会原来宏定义的区域。
基于分布式组件框架的应用程序部署在多台物理机器上,在每台机器上有多个不同的进程类型,每种进程类型定义了不同的组件组合方式;在运行期每种进程类型又可以实例化为多个进程实例。在这些进程实例中,用到的参数可以有不同的特性,可以分为下列几类:各服务器上都相同参数、同一服务器上各进程类型都相同的参数、同一服务器上某种进程类型的所有进程可见的参数、仅某个进程实例可见的参数。本发明可选实施例将不同可见性的参数放置在不同的实例树上,并将这些实例树按照先局部后全局的方式组织成树林,从而实现既能全局共享,又能局部覆盖的功能要求。如图5b所示,515覆盖518,再覆盖514,最后覆盖512。
为了实现分布式共享,本发明可选实施例将实例树存放在分布式缓存中,按照服务器全局、服务器实例、特定服务器进程类型全局、进程类型、等层次结构进行组织。各进程启动的时候,根据自己的服务器实例标识、进程类型标识、进程实例标识找到自己的实例树,并进行数据映射。
在组件框架应用中,为了避免组件和框架的参数互相冲突,在数据结构的根节点下定义了frame和component两个子目录,在存储上,将组件和框架的参数存放在不同的物理位置,系统启动的时候将其加载拼合成同一棵树。由于分目录分别存放,在加载的时候系统很容易判断组件和框架定义的非法参数,从而避免了参数的冲突。
多进程系统中的参数覆盖带来一个问题,虽然大部分参数可以使用局部值覆盖全局值,但也有的参数是必须各进程完全相同的,而另一些则是是各进程必须不同的。对于这类参数,本发明采用public、protected、private几个子空间来进行区分。Public中存放的是可以被局部覆盖的参数项、protected存放不能被局部覆盖的参数项、private存放的是必须在局部定义的参数项。通过限制不同的实例树加载不同的子空间,并在定义树指明参数项的上述路径属性,就能实现参数覆盖性的限制。
本发明可选实施例支持参数变化通知。客户代码首先以注册的方式表明对某个参数项的变化进行跟踪。然后由参数管理机制找出该参数项的所有依赖参数项,并缓存
在内部数据结构中。当某个参数项发生改变的时候,参数管理机制自动查询受到影响的注册项,然后更新注册参数项的依赖关系,并通知客户代码。
图6是根据本发明可选实施例的参数管理机制的结构示意图,如图6所示,本发明可选实施例的应用场景包含客户代码和参数管理机制两部分。501客户代码是本发明的使用者,调用参数管理机制提供的接口进行参数的查询和更新操作,参数管理机制则负责响应客户代码的请求,对参数进行加载和持久化、检查和解析,并在参数变化的时候通知注册的客户代码。参数管理机制包括接口、配置树管理器、通知机制、分布式缓存等组件。
接口601负责和客户代码交互,接受来自客户代码的查询或更新请求,然后转发给配置树管理器和通知机制。
配置树管理器602负责管理核心数据结构,接受接口601和通知机制607的请求信息,并为配置树提供分布式缓存的代理。
各配置树603,包括定义树、实例值树和缺省值树,实例值树又按照局部层次关系分成多树。各树之间按照定义、局部实例、全局实例、缺省值的顺序组成树林。604是某棵树上的查找上下文,代表某次查找的中间状态。
分布式缓存体系包括缓存代理605和分布式缓存606,它使各进程实例的参数管理机制能够共享参数数据,并在某个参数发生改变的时候,通知各进程实例的配置树管理器。分布式缓存606中参数数据按照图5的方式存储。
通知机制607,接受客户代码对某个参数项的跟踪注册。其在内部维持客户端回调代码和对应的关联参数序列的关系。当配置树管理器得到分布式缓存的数据变化通知时,将调用通知机制。通知机制进一步检查该参数变更是否命中内部缓存数据。如果命中,则调用相关的客户代码回调函数。
图7a~7b是根据本发明可选实施例的参数管理机制的流程示意图,如图7a和7b所示,本发明可选实施例系统流程主要包括初始化和查询更新两部分,分别描述如下。
首先对本实施例的初始化流程进行说明,该流程包括以下方式:
a:进程启动,加载参数管理服务;
b:参数管理服务创建配置树管理器、通知机制和接口;
c:连接分布式缓存;
d:从程序区加载定义树和缺省值树;
e:从分布式缓存加载服务器全局树;
f:从分布式缓存加载本服务器全局树;
g:从分布式缓存加载本进程类型全局树;
h:从分布式缓存加载本进程实例树。
图7a是本发明可选实施例系统流程中初始化流程,如图7a所示,该流程进一步的包括以下步骤:
步骤S701:创建配置管理器;
步骤S702:加载全局配置树;
步骤S703:加载服务器级配置树;
步骤S704:加载进程类型级配置树;
步骤S705:加载进程实例配置树;
步骤S706:创建配置树对象;
步骤S707:关联配置缓存;
步骤S708:数据合法性检查;
步骤S709:报告错误。
下面对本实施例的查询更新流程进行说明,该流程包括以下方式:
a:客户代码调用参数管理机制的接口;
b:配置管理器定位到定义树;
c:配置树管理器为本次查询生成上下文对象,该上下文关联到当前配置树的根节点;
d:接口通过上下文查询配置树;
e:配置树将查询传递给配置树管理器提供的缓存代理;
f:配置树在分布式缓存中查找参数;
g:如果找到则解析结果,如果没有找到,则转到下一配置树,重复c)流程;
h:如果解析结果发现有宏定义,则取出宏定义的字符串作为参数项,转到b)流程;
i:将查询的结果替换当前的宏定义串;
j:返回查询结果
下面对本实施例的查询更新流程进行进一步的说明,图7b是本发明可选实施例系统流程中查询更新流程,如图7b所示,该流程宝库以下步骤:
步骤S710:调用配置查询接口;
步骤S711:为本次查询生成上下文;
步骤S712:通过上下文查询配置树;
步骤S713:配置管理器连接缓存装载数据;
步骤S714:是否查到;
步骤S715:解析结果;
步骤S716:是否需要转换;
步骤S717:返回结果。
通过本发明可选实施例,应用于多进程分布式组件框架的大型应用软件,提供了结构清晰,功能全面的层次化软件参数管理机制,从而简化针对软件参数的开发和维护工作量,同时有利于定义出面向用户友好的软件参数。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模
块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
通过本发明实施例,采用加载配置树中的软件参数信息,利用软件参数信息的关联关系对软件参数信息进行管理的方式,解决了相关技术中比较简单的软件参数的管理方式,而不利于软件管理问题,提高了对软件管理的效率。
Claims (16)
- 一种软件参数的管理方法,包括:加载用于存放软件参数信息的配置树,其中,所述参数信息包括:各参数之间的关联关系;在所述配置树中利用所述关联关系对所述软件参数信息进行管理。
- 根据权利要求1所述的方法,其中,所述软件参数信息中还包括:参数值;所述配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;所述定义树用于记录所述各参数之间的关联关系,并将所述关联关系存储在程序区,其中,所述关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录所述参数值中固化的参数缺省值,并将所述固化的参数缺省值存储在所述程序区;所述实例值树用于记录对所述参数缺省值进行修改后得到的参数值,将需要修改的缺省值存储在数据区。
- 根据权利要求2所述的方法,其中,加载用于存放软件参数信息的配置树包括:从所述程序区加载所述定义树和所述缺省值树;从所述数据区加载所述实例值树。
- 根据权利要求3所述的方法,其中,所述方法还包括:当所述软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的所述实例值树上。
- 根据权利要求4所述的方法,其中,所述实例值树包括:局部实例值树和全局实例值树,其中,所述局部实例值树的优先级高于所述全局实例值树的优先级。
- 根据权利要求2至5中任一项所述的方法,其中,所述实例值树存储在分布式缓存中,其中,所述分布式缓存,用于实现多进程实例树对所述软件参数信息的共享。
- 根据权利要求1所述的方法,其中,在所述配置树中利用所述关联关系对所述软件参数信息进行管理,包括:接收用户的管理请求信息,其中,所述管理请求信息中携带有用户代码;通过所述用户代码调用与所述用户代码对应的指定接口对所述软件参数信息进行管理,其中,所述指定接口用于指示所述软件参数信息的管理方式。
- 根据权利要求7所述的方法,其中,所述管理包括查询和/或更新;通过所述用户代码调用与所述用户代码对应的指定接口对所述软件参数信息进行管理包括:根据所述配置树的优先级和所述用户代码定位所述软件参数信息所在的配置树;在定位的配置树中查找所述软件参数信息中的参数值;和/或,在所述定位的配置树中未查找到所述参数值时,在分布式缓存中的其它配置树中进一步查找所述参数值。
- 一种软件参数的管理装置,包括:加载模块,设置为加载用于存放软件参数信息的配置树,其中,所述参数信息包括:各参数之间的关联关系;管理模块,设置为在所述配置树中利用所述关联关系对所述软件参数信息进行管理。
- 根据权利要求9所述的装置,其中,所述软件参数信息中还包括:参数值;所述配置树包括:优先级依次递减的定义树、实例值树以及缺省值树;所述定义树用于记录所述各参数之间的关联关系,并将所述关联关系存储在程序区,其中,所述关联关系通过宏定义来描述,该宏定义用于使不同的参数指向同一个变量;缺省值树用于记录所述参数值中固化的参数缺省值,并将所述固化的参数缺省值存储在所述程序区;所述实例值树用于记录对所述参数缺省值进行修改后得到的参数值,将需要修改的缺省值存储在数据区。
- 根据权利要求10所述的装置,其中,所述加载装置还设置为,从所述程序区加载所述定义树和所述缺省值树;从所述数据区加载所述实例值树。
- 根据权利要求11所述的装置,其中,所述装置还包括:放置模块,设置为当所述软件参数信息部署在多台物理机器上时,将不同物理机器上的多个进程实例分别放置不同的所述实例值树上。
- 根据权利要求12所述的装置,其中,所述实例值树包括:局部实例值树和全局实例值树,其中,所述局部实例值树的优先级高于所述全局实例值树的优先级。
- 根据权利要求10至13中任一项所述的装置,其中,所述实例值树存储在分布式缓存中,其中,所述分布式缓存,用于实现多进程实例树对所述软件参数信息的共享。
- 根据权利要求9所述的装置,其中,所述加载模块包括:接收单元,设置为接收用户的管理请求信息,其中,所述管理请求信息中携带有用户代码;管理单元,设置为通过所述用户代码调用与所述用户代码对应的指定接口对所述软件参数信息进行管理,其中,所述指定接口用于指示所述软件参数信息的管理方式。
- 根据权利要求15所述的装置,其中,所述管理包括查询和/或更新;所述管理单元还设置为,根据所述配置树的优先级和所述用户代码定位所述软件参数信息所在的配置树;在定位的配置树中查找所述软件参数信息中的参数值;和/或,在所述定位的配置树中未查找到所述参数值时,在分布式缓存中的其它配置树中进一步查找所述参数值。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410461459.1 | 2014-09-11 | ||
CN201410461459.1A CN105446724B (zh) | 2014-09-11 | 2014-09-11 | 软件参数的管理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015154435A1 true WO2015154435A1 (zh) | 2015-10-15 |
Family
ID=54287198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/089500 WO2015154435A1 (zh) | 2014-09-11 | 2014-10-24 | 软件参数的管理方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105446724B (zh) |
WO (1) | WO2015154435A1 (zh) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984204A (zh) * | 2018-06-29 | 2018-12-11 | 南京南瑞继保电气有限公司 | 一种嵌入式装置关联定值的修改方法 |
CN109344050B (zh) * | 2018-08-20 | 2023-07-21 | 中国平安人寿保险股份有限公司 | 一种基于结构树的接口参数分析方法及装置 |
CN109697131B (zh) * | 2018-12-06 | 2021-08-24 | 京信网络系统股份有限公司 | 进程间参数管理、同步方法及装置 |
CN109976799B (zh) * | 2019-02-19 | 2022-07-08 | 武大吉奥信息技术有限公司 | 一种基于树形结构软件配置模型的实现方法及装置 |
CN110427175A (zh) * | 2019-08-05 | 2019-11-08 | 深圳科蓝金信科技发展有限公司 | 基于通讯接口的前端界面及后台服务生成方法及系统 |
CN110825409B (zh) * | 2019-10-30 | 2023-10-31 | 炬星科技(深圳)有限公司 | 参数管理方法、电子设备及计算机存储介质 |
CN114035860B (zh) * | 2021-11-04 | 2023-06-13 | 四川启睿克科技有限公司 | 一种基于rpa全局变量模块的流程参数配置系统 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848760A (zh) * | 2005-08-30 | 2006-10-18 | 华为技术有限公司 | 软件组件参数配置方法及系统、及其终端设备 |
CN101651679A (zh) * | 2009-09-16 | 2010-02-17 | 清华大学 | 一种基于树形结构的数据帧解析和处理系统和方法 |
CN103593432A (zh) * | 2013-11-11 | 2014-02-19 | 中广核工程有限公司 | 一种设计参数数据库的设计参数变更方法及装置 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100270915B1 (ko) * | 1998-10-17 | 2000-11-01 | 서평원 | 망 관리 플랫폼 및 방법 |
CN1485775A (zh) * | 2002-09-27 | 2004-03-31 | 英业达股份有限公司 | 树形结构节点数据显示处理系统与方法 |
-
2014
- 2014-09-11 CN CN201410461459.1A patent/CN105446724B/zh active Active
- 2014-10-24 WO PCT/CN2014/089500 patent/WO2015154435A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848760A (zh) * | 2005-08-30 | 2006-10-18 | 华为技术有限公司 | 软件组件参数配置方法及系统、及其终端设备 |
CN101651679A (zh) * | 2009-09-16 | 2010-02-17 | 清华大学 | 一种基于树形结构的数据帧解析和处理系统和方法 |
CN103593432A (zh) * | 2013-11-11 | 2014-02-19 | 中广核工程有限公司 | 一种设计参数数据库的设计参数变更方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN105446724B (zh) | 2019-11-29 |
CN105446724A (zh) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11757720B2 (en) | Distributed computing dependency management system | |
WO2015154435A1 (zh) | 软件参数的管理方法及装置 | |
US10795733B2 (en) | Server farm management | |
US10776104B2 (en) | Systems and methods for tracking configuration file changes | |
US20210405629A1 (en) | System and method for interoperable communication of an automation system component with multiple information sources | |
CN106020930B (zh) | 一种基于应用容器的应用管理方法及系统 | |
US9729468B2 (en) | Configuring a service based on manipulations of graphical representations of abstractions of resources | |
CN111061817B (zh) | 自适应业务构建系统、方法及计算机可读介质 | |
US8321549B2 (en) | Action execution management for service configuration items | |
CN102103518B (zh) | 一种在虚拟化环境中管理资源的系统及其实现方法 | |
US6895586B1 (en) | Enterprise management system and method which includes a common enterprise-wide namespace and prototype-based hierarchical inheritance | |
US10440138B2 (en) | Provisioning IaaS services | |
US11159390B2 (en) | Systems and methods for service-aware mapping of a system infrastructure | |
US20120102506A1 (en) | Web service patterns for globally distributed service fabric | |
US10230567B2 (en) | Management of a plurality of system control networks | |
CN112417051A (zh) | 容器编排引擎资源管理方法及装置、可读介质及电子设备 | |
US8549129B2 (en) | Live migration method for large-scale IT management systems | |
SG189390A1 (en) | Installing software remotely using a high privilege process | |
JP5613295B2 (ja) | 装置へのコンテンツの分配を管理するシステムと方法とプログラムを提供する記憶媒体 | |
US12074953B2 (en) | Framework for managing configurations of cloud computing resources | |
US20230246916A1 (en) | Service map conversion with preserved historical information | |
CN118337643A (zh) | 一种基于配置的数联网核心元素运维系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14889050 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14889050 Country of ref document: EP Kind code of ref document: A1 |