CN110119292A - System operational parameters querying method, matching process, device and node device - Google Patents
System operational parameters querying method, matching process, device and node device Download PDFInfo
- Publication number
- CN110119292A CN110119292A CN201810123376.XA CN201810123376A CN110119292A CN 110119292 A CN110119292 A CN 110119292A CN 201810123376 A CN201810123376 A CN 201810123376A CN 110119292 A CN110119292 A CN 110119292A
- Authority
- CN
- China
- Prior art keywords
- operational parameters
- matching
- value
- system operational
- information
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例提供一种系统运行参数查询方法、匹配方法、装置、节点设备及存储介质,预先在系统参数数据库中存储各主键值对应的系统运行参数值集合,并为系统运行参数值集合中的各系统运行参数值设置与业务实体属性关联的约束条件;然后在接收到业务实体发送的包含主键值的系统运行参数查询请求后,根据该业务实体的属性信息确认匹配规则随该系统运行参数查询请求一起发到作为服务端;服务端根据该请求中的主键值和匹配规则,从系统参数数据库中匹配出对应的系统运行参数值。本发明提供的系统运行查询、匹配方案,并不需要对主键值进行修改,当需要更新查询字段时,仅需在对应的约束条件中更新即可,可沿用原来的软件系统和数据存储结构。
The embodiments of the present invention provide a system operating parameter query method, matching method, device, node device and storage medium, in which the system operating parameter value set corresponding to each primary key value is stored in the system parameter database in advance, and the system operating parameter value set is the system operating parameter value set. Each system operating parameter value in the set of constraints associated with the attributes of the business entity; then, after receiving the query request for the system operating parameters containing the primary key value sent by the business entity, confirm the matching rule according to the attribute information of the business entity with the system. The running parameter query request is sent to the server together; the server matches the corresponding system running parameter value from the system parameter database according to the primary key value and matching rule in the request. The system running the query and matching scheme provided by the present invention does not need to modify the primary key value. When the query field needs to be updated, it only needs to be updated in the corresponding constraint conditions, and the original software system and data storage structure can be used. .
Description
技术领域technical field
本发明涉及通信领域,尤其涉及一种系统运行参数查询方法、匹配方法、装置及节点设备。The present invention relates to the field of communications, and in particular, to a system operation parameter query method, matching method, device and node device.
背景技术Background technique
通信设备上的软件系统通常需要在运行时获取一些定制的系统运行参数(也即简称为系统参数,如系统名称、静态路由数、接入用户数等)来定义并约束各软件模块的行为,以适应特定产品、硬件、业务的运行要求。为了提高软件系统的可扩展性,降低研发成本,可以脚本的形式描述这些系统运行参数,这样通过对系统运行参数脚本进行简单的定制就可以把同一套软件系统部署到形态各异的通信产品上。The software system on the communication device usually needs to obtain some customized system operating parameters (also referred to as system parameters, such as system name, number of static routes, number of access users, etc.) at runtime to define and constrain the behavior of each software module. In order to adapt to the operation requirements of specific products, hardware and business. In order to improve the scalability of the software system and reduce the cost of research and development, the operating parameters of these systems can be described in the form of scripts, so that the same software system can be deployed to different forms of communication products by simply customizing the script of the operating parameters of the system. .
对于系统运行参数的集中管理方式,一般是通过key(主键)-value(参数值)存储查询的方式进行管理。一个key值对应一个参数值。但对于大型分布式通信设备而言,单个设备上存在多种类型的单板、CPU(Central Processing Unit,中央处理器)、PCB(PrintedCircuit Board,印制电路板),运行着各种类型的业务,这就导致上层应用在不同的硬件属性(比如不同的单板、PCB等)、和软件属性所需适配的系统运行参数值可能不一样。针对上述问题,目前以扩展主键key(即通过多个key组合)来对更为多样化的系统运行参数值进行管理,以满足不同属性的上层应用对应不同系统运行参数值的需求,例如现有一种典型的key值组合的数据存储结构为:((type,boardid,bomid,pcbid),value):For the centralized management of system operating parameters, it is generally managed by means of key (primary key)-value (parameter value) storage and query. A key value corresponds to a parameter value. However, for large-scale distributed communication equipment, there are various types of single boards, CPU (Central Processing Unit, central processing unit), PCB (Printed Circuit Board, printed circuit board) on a single device, running various types of business. , which leads to different hardware properties (such as different boards, PCBs, etc.) applied by the upper layer, and the system operating parameter values that need to be adapted to the software properties may be different. In view of the above problems, at present, more diverse system operating parameter values are managed by extending the primary key key (that is, by combining multiple keys) to meet the needs of upper-layer applications with different attributes corresponding to different system operating parameter values. A typical key-value combination data storage structure is: ((type, boardid, bomid, pcbid), value):
typedef struct{typedef struct{
int type;int type;
int boardid;int boardid;
int bomid;int bomid;
int pcbid;int pcbid;
int value;int value;
}}
其中(type,boardid,bomid,pcbid)为组合key,boardid、bomid、pcbid分别为单板号、物料号和电路板号。这样就有一个问题,当系统需要扩展,比如以前只根据type,boardid,bomid,pcb查询的,后来要增加作业单号jno、等字段,就需对原有的软件系统中的主键key以及系统运行参数的数据存储结构进行全部修改,而修改数据结构就需要升级系统中断业务,导致成本高,可扩展性和通用性差。(type, boardid, bomid, pcbid) is the combination key, and boardid, bomid, and pcbid are the board number, material number, and circuit board number, respectively. In this way, there is a problem. When the system needs to be expanded, for example, in the past, it was only queried based on type, boardid, bomid, and pcb. Later, to add fields such as job order number jno, etc., it is necessary to change the primary key key in the original software system and the system The data storage structure of the operating parameters needs to be completely modified, and modifying the data structure requires upgrading the system to interrupt services, resulting in high cost and poor scalability and generality.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供的系统运行参数查询方法、匹配方法、装置及节点设备,主要解决的技术问题是:现有通过扩展主键key对系统运行参数进行管理而需要对软件系统及系统运行参数的数据存储结构进行修改,成本高,可扩展性和通用性差。The system operating parameter query method, matching method, device, and node device provided by the embodiments of the present invention mainly solve the technical problem that the existing system operating parameters are managed by extending the primary key, and the data of the software system and the system operating parameters needs to be managed. The storage structure is modified, the cost is high, and the scalability and generality are poor.
为解决上述技术问题,本发明实施例提供一种系统运行参数查询方法,包括:To solve the above technical problems, an embodiment of the present invention provides a method for querying system operating parameters, including:
接收来自业务实体的系统运行参数查询请求,所述系统运行参数查询请求包括主键值;receiving a system operating parameter query request from a business entity, where the system operating parameter query request includes a primary key value;
根据所述业务实体的属性信息确认匹配规则,所述匹配规则包括用于进行系统运行参数匹配的辅助匹配信息,并将所述匹配规则添加到所述系统运行参数查询请求中;Confirming a matching rule according to the attribute information of the business entity, where the matching rule includes auxiliary matching information for performing system operating parameter matching, and adding the matching rule to the system operating parameter query request;
将所述系统运行参数查询请求发给主控节点设备进行系统运行参数查询。Sending the system operation parameter query request to the main control node device for system operation parameter query.
本发明实施例还提供一种系统运行参数匹配方法,包括:An embodiment of the present invention also provides a method for matching system operating parameters, including:
接收业务节点设备发送的系统运行参数查询请求,所述系统运行参数查询请求包括主键值和匹配规则,所述匹配规则包括用于进行系统运行参数匹配的辅助匹配信息;receiving a system operating parameter query request sent by a service node device, the system operating parameter query request including a primary key value and a matching rule, and the matching rule including auxiliary matching information for performing system operating parameter matching;
根据所述主键值和所述匹配规则从系统参数数据库中匹配出对应的目标系统运行参数值,其中,所述系统参数数据库中预先存储有各主键值对应的系统运行参数值集合,各系统运行参数值集合中包括至少一个系统运行参数值,且各系统运行参数值配置有约束条件,所述约束条件包括用于与所述辅助匹配信息进行匹配的约束匹配信息。According to the primary key value and the matching rule, the corresponding target system operating parameter value is matched from the system parameter database, wherein the system parameter database is pre-stored with a set of system operating parameter values corresponding to each primary key value. The system operating parameter value set includes at least one system operating parameter value, and each system operating parameter value is configured with a constraint condition, where the constraint condition includes constraint matching information for matching with the auxiliary matching information.
本发明实施例还提供一种系统运行参数查询装置,包括:The embodiment of the present invention also provides a system operation parameter query device, including:
请求处理模块,用于接收来自业务实体的系统运行参数查询请求,所述系统运行参数查询请求包括主键值,以及用于根据所述业务实体的属性信息确认的匹配规则,并将所述匹配规则添加到所述系统运行参数查询请求中,所述匹配规则包括用于进行系统运行参数匹配的辅助匹配信息;The request processing module is configured to receive a system operation parameter query request from a business entity, where the system operation parameter query request includes a primary key value, and a matching rule for confirming according to the attribute information of the business entity, and the matching A rule is added to the system operating parameter query request, and the matching rule includes auxiliary matching information for performing system operating parameter matching;
请求发送模块,用于将所述系统运行参数查询请求发给主控节点设备进行系统运行参数查询。The request sending module is configured to send the system operating parameter query request to the main control node device to query the system operating parameters.
本发明实施例还提供一种系统运行参数匹配装置,包括:The embodiment of the present invention also provides a system operating parameter matching device, including:
请求接收模块,用于接收业务节点设备发送的系统运行参数查询请求,所述系统运行参数查询请求包括主键值和匹配规则,所述匹配规则包括用于进行系统运行参数匹配的辅助匹配信息;a request receiving module, configured to receive a system operating parameter query request sent by a service node device, where the system operating parameter query request includes a primary key value and a matching rule, and the matching rule includes auxiliary matching information for performing system operating parameter matching;
匹配模块,用于根据所述主键值和所述匹配规则从系统参数数据库中匹配出对应的系统运行参数值;其中,所述系统参数数据库中预先存储有各主键值对应的系统运行参数值集合,各系统运行参数值集合中包括至少一个系统运行参数值,且各系统系统参数值配置有约束条件,所述约束条件包括用于与所述辅助匹配信息进行匹配的约束匹配信息。A matching module, configured to match the corresponding system operating parameter values from the system parameter database according to the primary key value and the matching rule; wherein, the system parameter database is pre-stored with the system operating parameters corresponding to each primary key value A value set, each system operating parameter value set includes at least one system operating parameter value, and each system system parameter value is configured with a constraint condition, the constraint condition includes constraint matching information for matching with the auxiliary matching information.
本发明实施例还提供一种业务节点设备,包括第一处理器、第一存储器及第一通信总线;An embodiment of the present invention further provides a service node device, including a first processor, a first memory and a first communication bus;
所述第一通信总线用于实现第一处理器和第一存储器之间的连接通信;The first communication bus is used to realize the connection communication between the first processor and the first memory;
所述第一处理器用于执行第一存储器中存储的一个或者多个第一程序,以实现如上所述的系统运行参数查询方法的步骤。The first processor is configured to execute one or more first programs stored in the first memory, so as to implement the steps of the above method for querying system operating parameters.
本发明实施例还提供一种主控节点设备,包括第二处理器、第二存储器及第二通信总线;An embodiment of the present invention further provides a master node device, including a second processor, a second memory, and a second communication bus;
所述第二通信总线用于实现第二处理器和第二存储器之间的连接通信;The second communication bus is used to realize the connection communication between the second processor and the second memory;
所述第二处理器用于执行第二存储器中存储的一个或者多个第二程序,以实现如上所述的系统运行参数匹配方法的步骤。The second processor is configured to execute one or more second programs stored in the second memory, so as to implement the steps of the system operating parameter matching method as described above.
本发明实施例还提供一种计算机存储介质,所述计算机可读存储介质存储有一个或者多个第一程序,所述一个或者多个第一程序可被一个或者多个处理器执行,以实现如上所述的系统运行参数查询方法的步骤;或,所述计算机可读存储介质存储有一个或者多个第二程序,所述一个或者多个第二程序可被一个或者多个处理器执行,以实现如上所述的系统运行参数匹配方法的步骤。An embodiment of the present invention further provides a computer storage medium, where the computer-readable storage medium stores one or more first programs, and the one or more first programs can be executed by one or more processors to implement The steps of the system operating parameter query method as described above; or, the computer-readable storage medium stores one or more second programs, and the one or more second programs can be executed by one or more processors, In order to realize the steps of the above-mentioned system operation parameter matching method.
本发明的有益效果是:The beneficial effects of the present invention are:
根据本发明实施例提供的系统运行参数查询方法、匹配方法、装置、节点设备及计算机存储介质,预先在系统参数数据库中存储各主键值对应的系统运行参数值集合,并为系统运行参数值集合中的各系统运行参数值设置与业务实体属性关联的约束条件;然后在接收到业务实体发送的包含主键值的系统运行参数查询请求后,可以根据该业务实体的属性信息确认匹配规则随该系统运行参数查询请求一起发到作为服务端的主控节点设备;服务端可以根据该请求中的主键值和匹配规则,从系统参数数据库中匹配出对应的系统运行参数值。本发明提供的系统运行查询、匹配方案,并不需要对主键key进行修改,只需在现有数据存储结构基础上为各系统运行参数值设置对应的约束条件作为辅助匹配条件即可,当需要增加查询字段时,仅需在对应的约束条件中增加即可,而不用对主键key做任何修改,可沿用原来的软件系统和数据存储结构,在降低成本的同时,可提升扩展性和通用性,同时也能避免因修改数据结构升级系统而中断业务。According to the system operation parameter query method, matching method, device, node device, and computer storage medium provided by the embodiments of the present invention, the system operation parameter value set corresponding to each primary key value is stored in the system parameter database in advance, and the system operation parameter value is Each system operating parameter value in the collection sets the constraints associated with the attributes of the business entity; then, after receiving the query request for the system operating parameters containing the primary key value sent by the business entity, the matching rules can be confirmed according to the attribute information of the business entity. The system operating parameter query request is sent to the master node device as the server together; the server can match the corresponding system operating parameter value from the system parameter database according to the primary key value and matching rule in the request. The system operation query and matching scheme provided by the present invention does not need to modify the primary key, and only needs to set the corresponding constraint conditions as auxiliary matching conditions for each system operation parameter value on the basis of the existing data storage structure. When adding query fields, you only need to add them in the corresponding constraints without any modification to the primary key. The original software system and data storage structure can be used, which can improve scalability and versatility while reducing costs. At the same time, it can also avoid business interruption due to modifying the data structure and upgrading the system.
本发明其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本发明说明书中的记载变的显而易见。Other features of the present invention and corresponding benefits are set forth in later parts of the specification, and it should be understood that at least some of the benefits will become apparent from the description of the present specification.
附图说明Description of drawings
图1为本发明实施例一的主键值和系统运行参数值集合对应关系示意图;1 is a schematic diagram of the corresponding relationship between a primary key value and a set of system operating parameter values according to Embodiment 1 of the present invention;
图2为本发明实施例一的系统运行参数查询方法流程示意图;2 is a schematic flowchart of a method for querying system operating parameters according to Embodiment 1 of the present invention;
图3为本发明实施例一的确认匹配规则流程示意图;3 is a schematic flowchart of a confirmation matching rule according to Embodiment 1 of the present invention;
图4为本发明实施例一的系统运行参数匹配的方法流程示意图;4 is a schematic flowchart of a method for matching system operating parameters according to Embodiment 1 of the present invention;
图5为本发明实施例一的匹配流程示意图;5 is a schematic diagram of a matching process according to Embodiment 1 of the present invention;
图6为本发明实施例二的系统运行参数查询装置结构示意图;6 is a schematic structural diagram of an apparatus for querying system operating parameters according to Embodiment 2 of the present invention;
图7为本发明实施例二的系统运行参数匹配装置结构示意图;7 is a schematic structural diagram of a system operating parameter matching device according to Embodiment 2 of the present invention;
图8为本发明实施例二的解析得到的配置数据示意图;8 is a schematic diagram of configuration data obtained by analysis according to Embodiment 2 of the present invention;
图9为本发明实施例二的系统运行参数查询、匹配方法流程示意图;9 is a schematic flowchart of a method for querying and matching system operating parameters according to Embodiment 2 of the present invention;
图10为本发明实施例三的业务节点设备结构示意图;10 is a schematic structural diagram of a service node device according to Embodiment 3 of the present invention;
图11为本发明实施例三的主控节点设备结构示意图;11 is a schematic structural diagram of a master control node device according to Embodiment 3 of the present invention;
图12为本发明实施例三的系统参数查询交互过程示意图;12 is a schematic diagram of a system parameter query interaction process according to Embodiment 3 of the present invention;
图13为本发明实施例三的系统运行参数值查询过程示意图。FIG. 13 is a schematic diagram of a process of querying system operating parameter values according to Embodiment 3 of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
实施例一:Example 1:
针对现有通过扩展主键key对系统运行参数进行管理而需要对软件系统及系统运行参数的数据存储结构进行修改,成本高,可扩展性和通用性差的问题。本实施例预先在系统参数数据库中存储各主键值对应的系统运行参数值集合,并为系统运行参数值集合中的各系统运行参数值设置与应用属性关联的约束条件(也即是系统运行参数值的约束条件)。也即在本实施例中,系统参数数据库中的一个主键值(key值)对应的是一个系统运行参数值集合。例如一种对应关系参见表1所示,假设包含n个主键值,一个主键值对应一个系统运行参数值集合,则主键值与系统运行参数值的集合如表1所示。In view of the existing problems of high cost and poor scalability and generality, the software system and the data storage structure of the system operating parameters need to be modified to manage the system operating parameters by extending the primary key. In this embodiment, the system operating parameter value set corresponding to each primary key value is stored in the system parameter database in advance, and the constraint condition associated with the application attribute (that is, the system operating parameter value) is set for each system operating parameter value in the system operating parameter value set. constraints on parameter values). That is, in this embodiment, a primary key value (key value) in the system parameter database corresponds to a set of system operating parameter values. For example, a corresponding relationship is shown in Table 1. Assuming that there are n primary key values, and one primary key value corresponds to a set of system operating parameter values, the set of primary key values and system operating parameter values is shown in Table 1.
表1Table 1
在本实施例中,一个系统运行参数值集合values中可能进包含一个系统运行参数值,也可能包含多个系统运行参数值。在本实施例中,各系统运行参数值集合中的各系统运行参数值设置有对应的约束条件,该约束条件与业务实体(此处的业务实体是指作为查询实体的对象,其可以是任何需要进行系统运行参数查询的应用进程或线程,且应用例如包括但不限于上层应用,该上层应用包括但不限于业务协议、应用层协议、路由协议相关的各种应用)的属性相关联,可以表征业务实体的属性。一种示例的数据存储结构可为:(type,value,constraint);In this embodiment, a system operation parameter value set values may further include one system operation parameter value, or may include multiple system operation parameter values. In this embodiment, each system operating parameter value in each system operating parameter value set is set with a corresponding constraint condition, and the constraint condition is related to the business entity (here, the business entity refers to the object as the query entity, which can be any The application process or thread that needs to perform system operation parameter query, and the application includes, but is not limited to, upper-layer applications, including but not limited to business protocols, application-layer protocols, and various applications related to routing protocols. Attributes that characterize a business entity. An example data storage structure may be: (type, value, constraint);
typedef struct{typedef struct{
int type;int type;
int value;int value;
string constraint;string constraint;
}}
其中constraint为约束条件,其包括约束匹配信息,且其可为字符流类型的字段,且其格式也可以灵活设定,例如一种示例格式可类似“shelftype=2;boardid=1;”,此时该约束条件包括的约束匹配信息为shelftype=2,且boardid=1,本实施例中shelftype、boardid等参数称为组成约束匹配信息的约束匹配参数。这种设置方式当需要增加查询字段时,对constraint进行相应的修改即可,也即只要修改服务端的配置文件即可支持。比如要对一个value值增加一个硬件属性叫做机框类型,shelftype=21,且假设该value值之前的constraint为boardid=1,则需要将其constraint修改为<value shelftype=”21”boardid=”1”>即可。也即本实施例提供的上述数据存储结构方案是弹性可定制的,约束条件不管采用硬件属性,还是软件属性,或采用二者的结合,都是可以任意灵活添加组合的。The constraint is a constraint condition, which includes constraint matching information, and it can be a character stream type field, and its format can also be set flexibly. For example, an example format can be similar to "shelftype=2; boardid=1;", this When the constraint matching information included in the constraint condition is shelftype=2, and boardid=1, parameters such as shelftype and boardid in this embodiment are called constraint matching parameters constituting the constraint matching information. When you need to add query fields in this setting method, you can modify the constraint accordingly, that is, you only need to modify the configuration file of the server to support it. For example, to add a hardware attribute to a value called shelf type, shelftype=21, and assuming that the constraint before the value is boardid=1, it needs to be modified to <value shelftype=”21” boardid=”1 ”> to do so. That is, the above-mentioned data storage structure solution provided in this embodiment is flexible and customizable, and the constraints can be added and combined arbitrarily and flexibly regardless of whether hardware attributes, software attributes, or a combination of the two are used.
在本实施例中,一个系统运行参数值集合里的参数可以为同样参数类型的参数。例如对于用户接入数,在不同单板类型、不同的作业单号、不同的业务类型值就不一样,但都属于用户接入数,因此可将其设置到一个集合中。当然,也可以根据具体的应用场景灵活的设定其他归类规则,并不限于上述参数类型规类规则。In this embodiment, parameters in a system operating parameter value set may be parameters of the same parameter type. For example, the user access number has different values for different board types, job ticket numbers, and different service types, but all belong to the user access number, so it can be set into a set. Of course, other classification rules can also be flexibly set according to specific application scenarios, and are not limited to the above parameter type rules.
但应当理解的是,在本实施例中,可能会存在一个或多个系统运行参数值的约束条件包括的约束匹配信息为空,例如对于适用于任何属性的应用的系统运行参数值,其约束条件包括的约束匹配信息可以设置为空。例如,参见图1所示,在一种示例中,主键值keyi对应系统运行参数值集合values i,其中系统运行参数值集合values i包含三个系统运行参数值iA、iB、iC,且这三个系统运行参数值对应的约束条件分别为iAi、iBi、iCi。当然,应当理解的是,系统中包含的主键值的具体个数以及各主键值对应的系统运行参数集合中的系统运行参数值的个数是可以根据具体应用场景和具体网络场景灵活设置和动态调整的。However, it should be understood that, in this embodiment, there may be one or more constraints on system operating parameter values that include constraint matching information that is empty. Constraint matching information included in the condition can be set to empty. For example, as shown in FIG. 1 , in an example, the primary key value keyi corresponds to the system operating parameter value set values i, wherein the system operating parameter value set values i includes three system operating parameter values iA, iB, and iC, and these The constraints corresponding to the three system operating parameter values are iAi, iBi, and iCi, respectively. Of course, it should be understood that the specific number of primary key values contained in the system and the number of system operating parameter values in the system operating parameter set corresponding to each primary key value can be flexibly set according to specific application scenarios and specific network scenarios. and dynamically adjusted.
本实施例中的系统参数数据库应用于分布式通信设备时,其可以设置于作为参数匹配服务端的中控节点设备上,也可以设置于中控节点设备之外但可被中控节点设备调用。应用于其他网络环境时,则可根据具体的网络环境灵活设定。When the system parameter database in this embodiment is applied to a distributed communication device, it can be set on the central control node device serving as the parameter matching server, or can be set outside the central control node device but can be called by the central control node device. When applied to other network environments, it can be flexibly set according to the specific network environment.
应当理解的是,本实施例中,主键值与系统运行参数值集合的对应关系,系统运行参数值集合中的各系统运行参数值的约束条件可以通过配置文件进行配置,且该配置文件可通过脚本或其他方式形成。It should be understood that, in this embodiment, the corresponding relationship between the primary key value and the system operating parameter value set, and the constraints of each system operating parameter value in the system operating parameter value set can be configured through a configuration file, and the configuration file can be configured. Formed by script or otherwise.
基于上述设置,在本实施例中,当客户端侧的应用在运行过程中需要获取一些定制的系统运行参数时,此时的系统运行参数查询方法参见图2所示,包括:Based on the above settings, in this embodiment, when the application on the client side needs to obtain some customized system operating parameters during the running process, the system operating parameter query method at this time is shown in FIG. 2 , including:
S201:接收来自应用的系统运行参数查询请求,该系统运行参数查询请求包括主键值。S201: Receive a system operating parameter query request from an application, where the system operating parameter query request includes a primary key value.
本实施例中,在分布式通信设备场景下,应用可以运行业务节点设备上,此时应用设备具体可以通过调用相应客户端接口并发送系统运行参数查询请求,也即传入相应的主键值key值。In this embodiment, in the distributed communication device scenario, the application can run on the service node device. At this time, the application device can specifically call the corresponding client interface and send a system operating parameter query request, that is, pass in the corresponding primary key value. key value.
本实施例中,应用具体可以根据其当前的需求灵活的选择相应的主键值发起相应的系统运行参数值查询。In this embodiment, the application can flexibly select the corresponding primary key value according to its current demand to initiate the corresponding query of the system operating parameter value.
S202:根据发起系统运行参数查询请求的应用的属性信息确认匹配规则。S202: Confirm the matching rule according to the attribute information of the application that initiates the system operating parameter query request.
在本实施例中,当接收到一个应用发起的系统运行参数查询请求后,可以根据该应用的属性信息确认该应用对应的匹配规则,确定的匹配规则包括用于进行系统运行参数匹配的辅助匹配信息,以在后续参数匹配过程中通过“单主键值key+匹配规则”的方式匹配出与该应用最为匹配的系统运行参数,以满足应用的需求;当然,本实施例中的主键也可以是多个主键组合而成,且这多个主键是都必要的、不需要进行改动或很少进行改动的主键。In this embodiment, after receiving a system operating parameter query request initiated by an application, a matching rule corresponding to the application can be confirmed according to the attribute information of the application, and the determined matching rule includes an auxiliary matching used for system operating parameter matching information, in the subsequent parameter matching process, the system operating parameters that best match the application are matched by the method of "single primary key value key + matching rule" to meet the needs of the application; of course, the primary key in this embodiment can also be It is composed of multiple primary keys, and these multiple primary keys are all necessary primary keys that do not need to be changed or are rarely changed.
在本实施例中,对于各应用的属性信息,可以通过客户端自动获取,也可以通过其他方式获取。具体确认辅助匹配信息的过程参见图3所示,包括:In this embodiment, the attribute information of each application may be automatically acquired by the client, or may be acquired in other ways. The specific process of confirming the auxiliary matching information is shown in Figure 3, including:
S301:获取业务实体的属性信息。S301: Obtain attribute information of a business entity.
本实施例中,获取的业务实体的属性信息包括但不限于业务实体的硬件属性信息和软件属性信息中的至少一种,具体获取硬件属性信息还是软件属性信息或者同时获取硬件属性信息和软件属性信息可以灵活设定。且本实施例中,硬件属性信息具体包含的内容和软件属性信息具体包含的内容也可以灵活设定,只要能准确的反应业务实体的具体需求即可。In this embodiment, the acquired attribute information of the business entity includes, but is not limited to, at least one of hardware attribute information and software attribute information of the business entity. Specifically, whether to acquire hardware attribute information or software attribute information or to acquire both hardware attribute information and software attribute information Information can be set flexibly. In addition, in this embodiment, the content specifically included in the hardware attribute information and the content specifically included in the software attribute information can also be set flexibly, as long as they can accurately reflect the specific needs of the business entity.
例如:当获取的属性信息包括业务实体的硬件属性信息时,该硬件属性信息包括但不限于业务实体所在单板的单板号boardid、所在电路板的电路板号pcbid、所在物料的物料号bomid中的至少一种,此时确认匹配规则包括:将获取的单板号、电路板号和物料号中的至少一个作为匹配规则的辅助匹配信息。例如辅助匹配信息包括单板号、电路板号、物料号时,则此时的辅助匹配信息包括三个辅助匹配参数,分别为单板号、电路板号、物料号。本实施例中,业务实体所在的单板、电路板等硬件,是指这些硬件作为该业务实体运行的硬件基础。For example: when the acquired attribute information includes the hardware attribute information of the business entity, the hardware attribute information includes but is not limited to the board number boardid of the board where the business entity is located, the circuit board number pcbid of the circuit board where the business entity is located, and the material number bomid of the material where the business entity is located. At least one of the following, confirming the matching rule at this time includes: taking at least one of the acquired board number, circuit board number and material number as auxiliary matching information for the matching rule. For example, when the auxiliary matching information includes a board number, a circuit board number, and a material number, the auxiliary matching information at this time includes three auxiliary matching parameters, which are the board number, the circuit board number, and the material number. In this embodiment, hardware such as a single board, a circuit board, etc., where the business entity is located means that these hardwares serve as the hardware basis for the operation of the business entity.
又例如:当获取的属性信息包括业务实体的软件属性信息时,软件属性信息包括业务实体的作业单号jno和业务名称sevice-name中的至少一种,此时确认匹配规则包括:将获取的作业单号和业务名称中的至少一个作为匹配规则的辅助匹配信息。例如辅助匹配信息包括作业单号和业务名称,则此时的辅助匹配信息包括两个辅助匹配参数,分别为作业单号和业务名称。Another example: when the acquired attribute information includes the software attribute information of the business entity, the software attribute information includes at least one of the job order number jno of the business entity and the service name sevice-name, and the confirmation matching rule at this time includes: At least one of the job order number and the business name is used as auxiliary matching information for the matching rule. For example, the auxiliary matching information includes the job order number and the business name, and the auxiliary matching information at this time includes two auxiliary matching parameters, which are the job order number and the business name respectively.
应当理解的是,本实施例中,各业务实体确认匹配规则的规则可以相同,例如可以都是根据业务实体的硬件属性和软件属性确认;不同业务实体确认匹配规则的规则也可以不相同,例如针对A类业务实体,根据其硬件属性信息确认匹配规则,针对B类业务实体,根据其软件属性信息或软件属性信息结合硬件属性信息确认匹配规则。且应当理解的是,本实施例中确认的匹配规则的辅助匹配信息所包括的辅助匹配参数以及个数也都是可以根据具体业务实体场景确定的。It should be understood that, in this embodiment, the rules for confirming matching rules for each business entity may be the same, for example, they may be confirmed according to the hardware attributes and software attributes of the business entities; the rules for confirming matching rules for different business entities may also be different, for example For class A business entities, the matching rules are confirmed according to their hardware attribute information, and for class B business entities, matching rules are confirmed according to their software attribute information or software attribute information combined with hardware attribute information. It should be understood that, the auxiliary matching parameters and the number of auxiliary matching parameters included in the auxiliary matching information of the matching rule confirmed in this embodiment can also be determined according to specific business entity scenarios.
S302:根据获取的属性信息确认业务实体的匹配规则。S302: Confirm the matching rule of the business entity according to the acquired attribute information.
例如假设获取到的业务实体的属性信息包括单板号20、电路板号10、作业单号5,则确认匹配规则的辅助匹配信息包括三个辅助匹配参数,分别是单板号20、电路板号10、作业单号5。For example, assuming that the acquired attribute information of the business entity includes board number 20, circuit board number 10, and job order number 5, the auxiliary matching information for confirming the matching rule includes three auxiliary matching parameters, namely board number 20, circuit board number 20, and circuit board number 5. No. 10, work order No. 5.
S203:将匹配规则添加到系统运行参数查询请求中。S203: Add the matching rule to the system operating parameter query request.
本步骤中,将匹配规则添加到系统运行参数查询请求的方式可以是直接将匹配规则添加到原来接收到的系统运行参数查询请求中;也可以从原来接收到的系统运行参数查询请求中提取出主键值,然后与匹配规则一起重新确认一个系统运行参数查询请求。In this step, the method of adding the matching rule to the system operating parameter query request may be to directly add the matching rule to the originally received system operating parameter query request; or extract the matching rule from the originally received system operating parameter query request The primary key value is then revalidated with the matching rule for a system run parameter query request.
应当理解的是,在本实施例中,匹配规则和主键值发给进行参数匹配操作的服务端(例如主控节点设备)时,二者可以一起发送(例如一起通过系统运行参数查询请求发送),也可以分别发送,且分别发送时,二者可以通过相同的请求,也可以通过不同的请求发送,且二者可以同时发送,可以不同时发送。但在分别发送时,需要添加可以表征二者关联关系的标识信息,以供服务端接收到后进行识别配对。It should be understood that, in this embodiment, when the matching rule and the primary key value are sent to the server that performs the parameter matching operation (for example, the master node device), the two can be sent together (for example, sent together through a system operating parameter query request). ), can also be sent separately, and when they are sent separately, the two can be sent through the same request or through different requests, and they can be sent at the same time or not at the same time. However, when sending them separately, it is necessary to add identification information that can represent the relationship between the two, so that the server can identify and pair them after receiving them.
S204:将系统运行参数查询请求发给服务端,例如包括但不限于主控节点设备(该主控节点设备作为系统匹配的服务端,但应当理解的也可通过其他设备实现,此时的其他设备则等同于本实施例中的主控节点设备)进行系统运行参数查询。S204: Send the system operating parameter query request to the server, for example, including but not limited to the main control node device (the main control node device is used as the server that matches the system, but it should be understood that it can also be implemented by other devices, and other The device is equivalent to the main control node device in this embodiment) to query the system operating parameters.
相应的,作为系统运行参数匹配操作侧的服务端(例如主控节点设备),其接收到的系统运行参数查询请求(如上所述,可以是业务节点设备发送的)就包含一个主键值和匹配规则,此时其进行系统运行参数匹配的方法参见图4所示,包括:Correspondingly, as a server (such as the master node device) on the operating side of the system operating parameter matching operation, the system operating parameter query request it receives (as described above, may be sent by the service node device) contains a primary key value and Matching rules, at this time, the method for matching system operating parameters is shown in Figure 4, including:
S401:接收业务节点设备发送的系统运行参数查询请求。S401: Receive a system operation parameter query request sent by a service node device.
该步骤中接收到的系统运行参数查询请求来自业务节点设备上的业务实体,其包括主键值和匹配规则。The system operation parameter query request received in this step comes from the business entity on the business node device, and includes a primary key value and a matching rule.
S402:提取接收到的系统运行参数查询请求中的主键值和匹配规则。S402: Extract the primary key value and matching rule in the received system operating parameter query request.
S403:根据提取的主键值和匹配规则从系统参数数据库中匹配出对应的系统运行参数值。S403: Match the corresponding system operating parameter value from the system parameter database according to the extracted primary key value and the matching rule.
在该步骤中,可以先通过主键值匹配出对应的系统运行参数值集合,然后再根据匹配规则从该系统运行参数值集合中匹配出与该匹配规则对应的系统运行参数值,例如参见图5所示,包括:In this step, the corresponding system operating parameter value set may be matched first through the primary key value, and then the system operating parameter value corresponding to the matching rule may be matched from the system operating parameter value set according to the matching rule. For example, see Fig. 5, including:
S501:根据提取的主键值从系统参数数据库中匹配出与该主键值对应的系统运行参数值集合。S501: Match a set of system operating parameter values corresponding to the primary key value from the system parameter database according to the extracted primary key value.
S502:根据提取的匹配规则从S501得到的系统运行参数值集合中匹配出与该匹配规则对应的系统运行参数值,作为目标系统运行参数值。S502: According to the extracted matching rule, the system operating parameter value corresponding to the matching rule is matched from the system operating parameter value set obtained in S501 as the target system operating parameter value.
当然,在一些示例中,也可先从系统参数数据库中找到与提取的匹配规则相匹配的各系统运行参数值,然后再从得到的各系统运行参数值中匹配出与提取的主键值对应的系统运行参数值,但这种匹配方式可能会存在漏匹配的情况。Of course, in some examples, the system operating parameter values that match the extracted matching rules can also be found from the system parameter database, and then the extracted primary key values can be matched from the obtained system operating parameter values. , but this matching method may have missing matches.
如上所述分析,本实施例中提取的匹配规则包括辅助匹配信息,辅助匹配信息包括至少一个辅助匹配参数,各系统运行参数值对应的约束条件包括用于与所述辅助匹配信息进行匹配的约束匹配信息,约束匹配信息包括至少一个约束匹配参数。因此在上述S502根据匹配规则从系统运行参数值集合中匹配出与匹配规则对应的系统运行参数值作为目标系统运行参数值,具体可包括:将提取的匹配规则包括的辅助匹配信息中的辅助匹配参数与系统运行参数值集合中各系统运行参数值的约束条件包括约束匹配信息中的约束匹配参数进行匹配,将约束匹配参数与辅助匹配参数匹配成功数最多的系统运行参数值,作为目标系统运行参数值,也即作为发起查询的业务实体对应的系统运行参数值。As analyzed above, the matching rules extracted in this embodiment include auxiliary matching information, the auxiliary matching information includes at least one auxiliary matching parameter, and the constraints corresponding to the values of each system operating parameter include constraints for matching with the auxiliary matching information Matching information, the constraint matching information includes at least one constraint matching parameter. Therefore, in the above S502 according to the matching rule, the system operating parameter value corresponding to the matching rule is matched from the system operating parameter value set as the target system operating parameter value. The parameters and the constraints of each system operating parameter value in the system operating parameter value set include the constraint matching parameters in the constraint matching information to match, and the system operating parameter value with the largest number of successful matching between the constraint matching parameter and the auxiliary matching parameter is used as the target system operation. The parameter value, that is, the system operating parameter value corresponding to the business entity that initiates the query.
可见,在本实施例中,仍采用单主键值与系统运行参数的对应关系存储结构实现系统运行参数的查询和匹配,具体通过单主键值+业务实体的属性信息对应的约束条件实现系统运行参数的准确、快速的查询和匹配,改动小,易实现,成本低,且可扩展性和通用性好。It can be seen that, in this embodiment, the corresponding relationship storage structure between the single primary key value and the system operating parameters is still used to query and match the system operating parameters. Specifically, the system is implemented through the constraints corresponding to the single primary key value + the attribute information of the business entity. Accurate and fast query and matching of operating parameters, small changes, easy implementation, low cost, and good scalability and versatility.
实施例二:Embodiment 2:
本实施例提供给了一种系统运行参数查询装置,其可以应用于作为系统运行参数查询发起的设备侧,且其所包括的各模块的功能可通过相应设备的处理器实现,例如业务节点设备。参见图6所示,该系统运行参数查询装置包括:This embodiment provides an apparatus for querying system operating parameters, which can be applied to the device side that initiates querying of system operating parameters, and the functions of each module included in the device can be implemented by processors of corresponding devices, such as service node devices . Referring to Figure 6, the system operating parameter query device includes:
请求处理模块61,用于接收来自业务实体的系统运行参数查询请求,如上所述,该系统运行参数查询请求包括主键值,以及用于根据所述业务实体的属性信息确认的匹配规则,并将匹配规则添加到系统运行参数查询请求中。The request processing module 61 is configured to receive a system operation parameter query request from a business entity. As mentioned above, the system operation parameter query request includes a primary key value and a matching rule for confirmation according to the attribute information of the business entity, and Add matching rules to the system running parameter query request.
在本实施例中,请求处理模块61具体可通过客户端接口接收业务实体的系统运行参数查询请求;且具体可通过客户端获取业务实体的属性信息。具体属性信息获取方式以及获取的内容参见上述实施例所示,在此不再赘述。In this embodiment, the request processing module 61 can specifically receive the query request of the system operating parameters of the business entity through the client interface; and can specifically obtain the attribute information of the business entity through the client. The specific method of acquiring the attribute information and the acquired content are shown in the foregoing embodiments, and details are not described herein again.
另外,本实施例中,请求处理模块61确认匹配规则的方式,以及发送匹配规则和主键值的方式也可参见上述实施例所示,在此不再赘述。In addition, in this embodiment, the manner in which the request processing module 61 confirms the matching rule and the manner in which the matching rule and the primary key value are sent can also be referred to as shown in the above-mentioned embodiments, which will not be repeated here.
请求发送模块62,用于将来自请求处理模块61的系统运行参数查询请求发给主控节点设备进行系统运行参数查询。The request sending module 62 is configured to send the system operating parameter query request from the request processing module 61 to the main control node device for querying the system operating parameters.
相应的,本实施例还提供了一种系统运行参数匹配装置,其可应用于执行系运行参数匹配作为服务端的设备上,且其所包含的各模块的功能也可通过相应设备的处理器实现,参见图7所示,该系统运行参数匹配装置包括:Correspondingly, this embodiment also provides a system operating parameter matching device, which can be applied to a device that performs operating parameter matching as a server, and the functions of each module included in it can also be implemented by the processor of the corresponding device. , as shown in Figure 7, the system operating parameter matching device includes:
请求接收模块71,用于接收业务节点设备发送的系统运行参数查询请求,如上所述,接收到的系统运行参数查询请求包括主键值和匹配规则。The request receiving module 71 is configured to receive a system operating parameter query request sent by the service node device. As described above, the received system operating parameter query request includes a primary key value and a matching rule.
匹配模块72,用于提取接收到的系统运行参数查询请求中的主键值和匹配规则,根据提取的主键值和匹配规则从系统参数数据库中匹配出对应的系统运行参数值。The matching module 72 is used for extracting the primary key value and the matching rule in the received system operating parameter query request, and matching the corresponding system operating parameter value from the system parameter database according to the extracted primary key value and the matching rule.
匹配模块72可以先通过主键值匹配出对应的系统运行参数值集合,然后再根据匹配规则从该系统运行参数值集合中匹配出与该匹配规则对应的系统运行参数值;也可以先从系统参数数据库中找到与提取的匹配规则相匹配的各系统运行参数值,然后再从得到的各系统运行参数值中匹配出与提取的主键值对应的系统运行参数值,具体匹配方式可以根据具体业务实体场景灵活设定。The matching module 72 can first match the corresponding system operating parameter value set through the primary key value, and then match the system operating parameter value corresponding to the matching rule from the system operating parameter value set according to the matching rule; Find the system operating parameter values that match the extracted matching rules in the parameter database, and then match the system operating parameter values corresponding to the extracted primary key values from the obtained system operating parameter values. Flexible setting of business entity scenarios.
且在本实施例中,匹配模块72可将提取的匹配规则包括的辅助匹配信息中的辅助匹配参数与系统运行参数值集合中各系统运行参数值对应的约束条件包括的约束匹配信息中的约束匹配参数进行匹配,将约束匹配参数与辅助匹配参数匹配成功数最多的系统运行参数值作为目标系统运行参数值,也即作为上述业务实体对应的系统运行参数值。And in this embodiment, the matching module 72 can match the auxiliary matching parameters in the auxiliary matching information included in the extracted matching rules with the constraints in the constraint matching information included in the constraints corresponding to the system operating parameter values in the system operating parameter value set. The matching parameters are matched, and the system operating parameter value with the largest number of successful matches between the constraint matching parameter and the auxiliary matching parameter is used as the target system operating parameter value, that is, the system operating parameter value corresponding to the above business entity.
参见图7所示,在本实施例中的系统运行参数匹配装置还可包括配置模块70,用于在系统参数数据库中预先配置各主键值对应的系统运行参数值集合,各系统运行参数值集合中包括至少一个系统运行参数值,且各系统系统参数值具有对应的约束条件。例如,参见图8所示,配置模块70可以读取并解析相应的配置文件,将解析出的数据存入系统参数数据库。图8中,解析出的主键值key分别有67175400、67175401和67175402,其中,67175400对应的values中的value分别依次有7、7、7、3、1000、100、101、101、102、1000和5,其中第一个value=7的约束条件为空,第二个value=7的约束条件为boardid=“1”,第三个value=7的约束条件为boardid=“1”,bomid=“10”,剩余的其他value的约束条件则具体参见图8所示。对于67175401和67175402具体对应的values中的value以及各value对应的约束条件也参见图8所示,在此不再赘述。Referring to FIG. 7 , the system operating parameter matching device in this embodiment may further include a configuration module 70 for preconfiguring a set of system operating parameter values corresponding to each primary key value in the system parameter database, and each system operating parameter value The set includes at least one system operating parameter value, and each system parameter value has a corresponding constraint condition. For example, as shown in FIG. 8 , the configuration module 70 may read and parse the corresponding configuration file, and store the parsed data into the system parameter database. In Figure 8, the parsed primary key value keys are 67175400, 67175401 and 67175402 respectively, among which, the values in the values corresponding to 67175400 are 7, 7, 7, 3, 1000, 100, 101, 101, 102, 1000 respectively. and 5, where the constraint condition of the first value=7 is empty, the constraint condition of the second value=7 is boardid="1", the constraint condition of the third value=7 is boardid="1", and the bomid= "10", the constraints of the remaining other values are shown in Figure 8 for details. The values in the values corresponding to 67175401 and 67175402 and the constraints corresponding to each value are also shown in Figure 8, and will not be repeated here.
为了便利理解本发明,下面结合一个完整的系统运行参数查询匹配过程为示例进行说明。In order to facilitate understanding of the present invention, the following description will be given by taking a complete query and matching process of system operating parameters as an example.
在本示例中,业务实体(也即发起系统运行参数查询的查询实体)调用客户端接口并传入key,客户端自动检测查询业务实体的硬件属性信息和软件属性信息(也即该业务实体所在的软硬件环境(如包括但不限于boardid、bomid、pcbid、jno、sevice-name),并组合成健值对字符串的形式作为辅助匹配信息和主键值key一起传递到服务端,服务端根据key查询到对应集合values,再用values集合中每个value的约束条件去适配匹配规则,选择匹配度最高的系统运行参数值value返回给客户端。该过程参见图9所示,包括:In this example, the business entity (that is, the query entity that initiates the system operating parameter query) calls the client interface and passes in the key, and the client automatically detects and queries the hardware attribute information and software attribute information of the business entity (that is, where the business entity is located). The hardware and software environment (such as including but not limited to boardid, bomid, pcbid, jno, and service-name), and combined into a key-value pair string form as auxiliary matching information and primary key value key together to pass to the server, the server Query the corresponding set values according to the key, and then use the constraints of each value in the values set to adapt the matching rules, and select the system operating parameter value with the highest matching degree and return it to the client. The process is shown in Figure 9, including:
S901:服务端进程启动,读取并解析系统参数配置文件,并将解析出的数据存入系统参数数据库。S901: The server process starts, reads and parses the system parameter configuration file, and stores the parsed data in the system parameter database.
S902:业务实体调用客户端接口,传入key进行查询。S902: The business entity invokes the client interface, and passes in the key for query.
S903:客户端检测业务实体所在软硬件环境,以健值对字符串的形式(如"boardid=1;bomid=2;pcbid=3;jno=4;")作为匹配规则同key一起传递到服务端。S903: The client detects the software and hardware environment where the business entity is located, and transmits it to the service together with the key in the form of a key-value pair string (such as "boardid=1; bomid=2; pcbid=3; jno=4;") as a matching rule end.
S904:服务端根据key值从系统数据库中查询到对应的集合values(以下称集合V),集合V中的集合value附带约束条件。S904: The server queries the corresponding set values (hereinafter referred to as set V) from the system database according to the key value, and the set value in the set V has constraints.
S905:按积分制进行匹配,选择积分最高的value为最优匹配项。该匹配过程具体如下:S905: Match according to the point system, and select the value with the highest point as the optimal matching item. The matching process is as follows:
从集合V中取一个value,设初始计1分(当然也可以计为0分),假定该value的约束条件有N个约束匹配参数,取出第一个约束匹配参数;Take a value from the set V, and the initial design is 1 point (of course, it can also be counted as 0 points), assuming that the constraint condition of the value has N constraint matching parameters, take out the first constraint matching parameter;
使用取出的约束匹配参数和匹配规则包括的辅助匹配消息中的辅助匹配参数进行匹配,如匹配上加1分,匹配不上则淘汰该value,取下一个value重复进行上述匹配过程,如果该value的所有约束匹配参数都匹配上,则该value计N+1分;Use the extracted constraint matching parameters and the auxiliary matching parameters in the auxiliary matching message included in the matching rule to match. If the matching is added, 1 point is added. If it does not match, the value will be eliminated, and the next value will be repeated to perform the above matching process. If the value All constraint matching parameters of are matched, then the value counts N+1 points;
将当前value与备选value进行积分比较,取积分高者为备选value。如果没有备选value则直接将当前value设置为备选value;如果积分与备选value相同且当前还剩余有未比对的value,则将当前的value淘汰而保留原来的备选value;如果还存在未比对的value,取下一个value,不断循环上述比对过程,直到集合V中的value遍历完,最终返回的备选value即为最优匹配的系统运行参数。Compare the current value with the alternative value, and take the higher score as the alternative value. If there is no alternative value, the current value is directly set as the alternative value; if the integral is the same as the alternative value and there are still unmatched values, the current value is eliminated and the original alternative value is retained; If there is an unmatched value, take the next value, and repeat the above comparison process continuously until the values in the set V are traversed, and the final returned candidate value is the optimal matching system operating parameter.
本实施例提供的系统运行参数查询匹配方案,提高了系统运行参数查询软件的可扩展性,在不修改查询软件实现、不修改数据库结构的情况下能更好地业务实体在不同的软硬件环境上。同时,由于本实施例采用业务实体自定义匹配规则查询的方式,可以支持分布式设备不同的节点采用不同的匹配规则(空间上的差异)、以及业务实体运行环境动态改变时对匹配规则进行动态的调整(时间上的差异),从而最大程度上支持了系统运行参数匹配的应变性和灵活性。The system operating parameter query matching scheme provided by this embodiment improves the scalability of the system operating parameter query software, and can better enable business entities to operate in different software and hardware environments without modifying the query software implementation or database structure. superior. At the same time, because this embodiment adopts the way of querying business entity self-defined matching rules, it can support different nodes of distributed devices to adopt different matching rules (differences in space), and to dynamically perform matching rules when the operating environment of business entities changes dynamically. adjustment (difference in time), thus supporting the adaptability and flexibility of system operating parameter matching to the greatest extent.
实施例三:Embodiment three:
本实施例提供了一种业务节点设备,其可应用于分布式网络,参见图10所示,其包括第一处理器1001、第一存储器1002及第一通信总线1003;This embodiment provides a service node device, which can be applied to a distributed network. Referring to FIG. 10 , it includes a first processor 1001, a first memory 1002, and a first communication bus 1003;
第一通信总线1003用于实现第一处理器1001和第一存储器1002之间的连接通信;The first communication bus 1003 is used to realize the connection communication between the first processor 1001 and the first memory 1002;
第一处理器1001用于执行第一存储器1002中存储的一个或者多个第一程序,以实现如上述各实施例所述的系统运行参数查询方法的步骤。The first processor 1001 is configured to execute one or more first programs stored in the first memory 1002, so as to implement the steps of the method for querying system operating parameters as described in the foregoing embodiments.
本实施例还提供了一种主控节点设备,其也可应用于分布式网络,参见图11所示,其包括第二处理器1101、第二存储器1102及第二通信总线1103;This embodiment also provides a master node device, which can also be applied to a distributed network, as shown in FIG. 11 , which includes a second processor 1101, a second memory 1102, and a second communication bus 1103;
第二通信总线1103用于实现第二处理器1101和第二存储器1102之间的连接通信;The second communication bus 1103 is used to realize the connection communication between the second processor 1101 and the second memory 1102;
第二处理器1101用于执行第二存储器1102中存储的一个或者多个第二程序,以实现如上述各实施例所述的系统运行参数匹配方法的步骤。The second processor 1101 is configured to execute one or more second programs stored in the second memory 1102, so as to implement the steps of the method for matching system operating parameters as described in the foregoing embodiments.
本发明实施例还提供一种计算机存储介质,该计算机存储介质可以应用于各种通信设备。该计算机可读存储介质可用于存储一个或者多个第一程序,该一个或者多个第一程序可被一个或者多个处理器执行,以实现如上各实施例所示的系统运行参数查询方法的步骤;或,该计算机可读存储介质存储用于存储一个或者多个第二程序,该一个或者多个第二程序可被一个或者多个处理器执行,以实现如上各实施例所示的系统运行参数匹配方法的步骤。Embodiments of the present invention also provide a computer storage medium, which can be applied to various communication devices. The computer-readable storage medium can be used to store one or more first programs, and the one or more first programs can be executed by one or more processors, so as to realize the method for querying system operating parameters as shown in the above embodiments. or, the computer-readable storage medium is stored for storing one or more second programs, and the one or more second programs can be executed by one or more processors to implement the system shown in the above embodiments Steps to run the parameter matching method.
为了便于理解,本实施例结合一种具体应用场景的系统运行参数查询和匹配过程进行示例说明。For ease of understanding, this embodiment is described in conjunction with a system operating parameter query and matching process in a specific application scenario.
下面结合附图对技术方案的实施作进一步的详细描述:The implementation of the technical solution is described in further detail below in conjunction with the accompanying drawings:
服务端进程启动,读取并解析系统参数配置文件,并将解析出的数据存入数据库,其中key为查询关键字,value为系统运行参数值,其他如boardid、bomid、pcb等为约束匹配参数组合成字符串作为约束条件(如"boardid=2;bomid=10;pcb=101;")进行存储。The server process starts, reads and parses the system parameter configuration file, and stores the parsed data in the database, where key is the query keyword, value is the system operating parameter value, and other parameters such as boardid, bomid, and pcb are constraint matching parameters Combine them into strings and store them as constraints (eg "boardid=2; bomid=10; pcb=101;").
系统运行参数查询交互过程如图12所示,业务实体调用客户端接口,传入参数key(本示例中key值以图8中的67175400为例),客户端自动检查应用所在的软硬件环境,将各辅助匹配参数组合成匹配规则同key一起传递到服务端,假定检测到该业务实体所在boardid为2、料单号bomid为10、pcb为101,选取这三项作为辅助匹配参数组成匹配规则,则该匹配规则包含的辅助匹配消息为"boardid=2;bomid=10;pcb=101"。The interactive process of system operation parameter query is shown in Figure 12. The business entity calls the client interface and passes in the parameter key (in this example, the key value is 67175400 in Figure 8), and the client automatically checks the software and hardware environment where the application is located. Combine the auxiliary matching parameters into a matching rule and pass it to the server together with the key. Assume that the boardid where the business entity is located is 2, the bill of material bomid is 10, and the pcb is 101, and these three items are selected as auxiliary matching parameters to form a matching rule , the auxiliary matching message included in the matching rule is "boardid=2; bomid=10; pcb=101".
如图13所示,服务端接收到到客户端的查询请求,先使用key(67175400)查询到key(67175400)对应的所有value及各value对应的约束条件,假定为集合V,然后从集合V中以积分制(当然也可以其他方式)的方式选出最适合的value,该匹配过程如下:As shown in Figure 13, when the server receives the query request from the client, it first uses the key (67175400) to query all the values corresponding to the key (67175400) and the constraints corresponding to each value, assuming the set V, and then from the set V The most suitable value is selected by the point system (of course, other methods are also possible), and the matching process is as follows:
从集合V中选第一个value,如图13所示,该value没有约束条件,适配任意匹配规则,初始积分为1,备选value设置为该value;Select the first value from the set V, as shown in Figure 13, this value has no constraints and is adapted to any matching rule, the initial integral is 1, and the alternative value is set to this value;
取第二条value,该value的约束条件为"boardid=1;",匹配规则为"boardid=2;bomid=10;pcb=101;",约束条件的约束匹配参数boardid=1匹配失败;Take the second value, the constraint condition of this value is "boardid=1;", the matching rule is "boardid=2; bomid=10; pcb=101;", the constraint matching parameter boardid=1 of the constraint condition fails to match;
取第三条value,该value的约束条件为"boardid=1;bomid=10",匹配规则为"boardid=2;bomid=10;pcb=101",约束条件的约束匹配参数boardid=1匹配失败;Take the third value, the constraint condition of this value is "boardid=1; bomid=10", the matching rule is "boardid=2; bomid=10; pcb=101", the constraint matching parameter boardid=1 of the constraint condition fails to match ;
取第四条value,该value的约束条件为"boardid=2;",匹配成功,积分为2,和备选value(积分1)比较,该value积分较高,将备选value设置为当前value;Take the fourth value, the constraint condition of this value is "boardid=2;", the match is successful, the score is 2, compared with the alternative value (integration 1), the value of this value has a higher score, and the alternative value is set as the current value ;
取第五条value,该value的约束条件为"boardid=2;bomid=10;",匹配成功,积分为3,和备选value(积分2)比较,该value积分较高,将备选value设置为当前value;Take the fifth value, the constraint condition of this value is "boardid=2; bomid=10;", the match is successful, the score is 3, and compared with the alternative value (integration 2), the value of this value has a higher score, and the alternative value set to the current value;
取第六条value,该value的约束条件为"boardid=2;bomid=10;pcb=100",约束条件的约束匹配参数pcb=100匹配失败;Take the sixth value, the constraint condition of this value is "boardid=2; bomid=10; pcb=100", the constraint matching parameter pcb=100 of the constraint condition fails to match;
取第七条value,该value的约束条件为"boardid=2;bomid=10;pcb=101",匹配成功,积分为4,和备选value(积分3)比较,该value积分较高,将备选value设置为当前value;Take the seventh value, the constraint condition of this value is "boardid=2; bomid=10; pcb=101", the match is successful, and the score is 4. Compared with the alternative value (integration 3), the value of this value has a higher score and will be The alternative value is set to the current value;
取第八条value,该value的约束条件为"boardid=2;bomid=10;pcb=101;jno=100",约束条件的约束匹配参数jno=100匹配失败;Take the eighth value, the constraint condition of this value is "boardid=2; bomid=10; pcb=101; jno=100", the constraint matching parameter jno=100 of the constraint condition fails to match;
取第九条value,该value的约束条件为"boardid=2;bomid=10;pcb=102;jno=101",约束条件的约束匹配参数pcb=102匹配失败;Take the ninth value, the constraint condition of this value is "boardid=2; bomid=10; pcb=102; jno=101", the constraint matching parameter pcb=102 of the constraint condition fails to match;
遍历完剩下value,最终选出积分最高的第七条value为最适合系统运行参数值。After traversing the remaining values, the seventh value with the highest score is finally selected as the most suitable value for the system operating parameters.
显然,本领域的技术人员应该明白,上述本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned embodiments of the present invention may be implemented by a general-purpose computing device, and they may be centralized on a single computing device, or distributed among multiple computing devices. On the network, they can optionally be implemented with program code executable by a computing device, so that they can be stored in a computer storage medium (ROM/RAM, magnetic disk, optical disk) for execution by the computing device, and in a certain In some cases, the steps shown or described may be performed in a different order than herein, either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module. . Therefore, the present invention is not limited to any particular combination of hardware and software.
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the embodiments of the present invention in combination with specific embodiments, and it cannot be considered that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field of the present invention, without departing from the concept of the present invention, some simple deductions or substitutions can be made, which should be regarded as belonging to the protection scope of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810123376.XA CN110119292B (en) | 2018-02-07 | 2018-02-07 | System operation parameter query method, matching method, device and node equipment |
| PCT/CN2019/074551 WO2019154353A1 (en) | 2018-02-07 | 2019-02-02 | System running parameter query method, matching method and apparatus, and node device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810123376.XA CN110119292B (en) | 2018-02-07 | 2018-02-07 | System operation parameter query method, matching method, device and node equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110119292A true CN110119292A (en) | 2019-08-13 |
| CN110119292B CN110119292B (en) | 2023-02-07 |
Family
ID=67520113
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810123376.XA Active CN110119292B (en) | 2018-02-07 | 2018-02-07 | System operation parameter query method, matching method, device and node equipment |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110119292B (en) |
| WO (1) | WO2019154353A1 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112256737A (en) * | 2020-10-30 | 2021-01-22 | 深圳前海微众银行股份有限公司 | A method, device and storage medium for HIVE rule matching data |
| CN112699149A (en) * | 2020-12-31 | 2021-04-23 | 青岛海尔科技有限公司 | Target data acquisition method and device, storage medium and electronic device |
| CN112818012A (en) * | 2021-01-26 | 2021-05-18 | 深圳力维智联技术有限公司 | Equipment data matching method, device, equipment and storage medium |
| CN113285816A (en) * | 2020-02-19 | 2021-08-20 | 华为技术有限公司 | Control request sending method, device and system based on key value configuration |
| CN114297411A (en) * | 2022-03-08 | 2022-04-08 | 支付宝(杭州)信息技术有限公司 | Configuration method, analysis method and device of entities in knowledge graph |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110955460B (en) * | 2019-11-15 | 2023-10-03 | 北京金山云网络技术有限公司 | Service process starting method and device, electronic equipment and storage medium |
| CN111311329B (en) * | 2020-02-20 | 2023-07-25 | 口碑(上海)信息技术有限公司 | Tag data acquisition method, device, equipment and readable storage medium |
| CN113282274B (en) * | 2020-02-20 | 2023-09-22 | 北京京东振世信息技术有限公司 | Data processing method and device |
| CN113535769B (en) * | 2020-04-15 | 2023-11-03 | 北京京东振世信息技术有限公司 | Method and device for inquiring information |
| CN111953517B (en) * | 2020-07-09 | 2023-08-29 | 北京思特奇信息技术股份有限公司 | Method and system for realizing service rule hot loading |
| CN112328392B (en) * | 2020-10-27 | 2024-05-28 | 金蝶软件(中国)有限公司 | Data processing method and related equipment |
| CN116127026A (en) * | 2022-11-03 | 2023-05-16 | 马上消费金融股份有限公司 | Automatic question and answer method and device, electronic equipment and storage medium |
| CN116257301A (en) * | 2023-03-01 | 2023-06-13 | 上海中通吉网络技术有限公司 | A lightweight dynamic configuration method and electronic device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8572091B1 (en) * | 2011-06-27 | 2013-10-29 | Amazon Technologies, Inc. | System and method for partitioning and indexing table data using a composite primary key |
| CN103617108A (en) * | 2013-12-17 | 2014-03-05 | 昆山中创软件工程有限责任公司 | Method and device for monitoring computer equipment operating states |
| CN104125274A (en) * | 2014-07-16 | 2014-10-29 | 美的集团武汉制冷设备有限公司 | Electric quantity control method, internet of things terminal and internet of things server |
| CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101673372A (en) * | 2009-09-16 | 2010-03-17 | 金蝶软件(中国)有限公司 | Method and device for updating bill of material |
| CN102707976B (en) * | 2012-05-14 | 2017-02-08 | 中兴通讯股份有限公司 | ATCA (advanced telecom computing architecture) system and method for managing firmware versions by ATCA system |
| US9104707B1 (en) * | 2013-03-14 | 2015-08-11 | Amazon Technologies, Inc. | Iterative generation of partial column schema |
| CN103338189B (en) * | 2013-06-08 | 2014-07-16 | 临沂市拓普网络股份有限公司 | Data sharing control device, system and method with various types of communication protocol interfaces |
| CN104573845B (en) * | 2014-12-03 | 2018-07-27 | 国家电网公司 | Information system equipment state overhauling aid decision-making method |
| CN106886371B (en) * | 2017-02-15 | 2019-08-06 | 中国保险信息技术管理有限责任公司 | Caching data processing method and device |
-
2018
- 2018-02-07 CN CN201810123376.XA patent/CN110119292B/en active Active
-
2019
- 2019-02-02 WO PCT/CN2019/074551 patent/WO2019154353A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8572091B1 (en) * | 2011-06-27 | 2013-10-29 | Amazon Technologies, Inc. | System and method for partitioning and indexing table data using a composite primary key |
| CN103617108A (en) * | 2013-12-17 | 2014-03-05 | 昆山中创软件工程有限责任公司 | Method and device for monitoring computer equipment operating states |
| CN104125274A (en) * | 2014-07-16 | 2014-10-29 | 美的集团武汉制冷设备有限公司 | Electric quantity control method, internet of things terminal and internet of things server |
| CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113285816A (en) * | 2020-02-19 | 2021-08-20 | 华为技术有限公司 | Control request sending method, device and system based on key value configuration |
| WO2021164330A1 (en) * | 2020-02-19 | 2021-08-26 | 华为技术有限公司 | Key value configuration-based control request sending method, apparatus and system |
| CN113285816B (en) * | 2020-02-19 | 2022-10-28 | 华为技术有限公司 | Control request sending method, device and system based on key value configuration |
| US12323293B2 (en) | 2020-02-19 | 2025-06-03 | Huawei Technologies Co., Ltd | Method, apparatus, and system for sending control request based on key value configuration |
| CN112256737A (en) * | 2020-10-30 | 2021-01-22 | 深圳前海微众银行股份有限公司 | A method, device and storage medium for HIVE rule matching data |
| CN112256737B (en) * | 2020-10-30 | 2024-05-28 | 深圳前海微众银行股份有限公司 | Method, equipment and storage medium for matching HIVE rule with data |
| CN112699149A (en) * | 2020-12-31 | 2021-04-23 | 青岛海尔科技有限公司 | Target data acquisition method and device, storage medium and electronic device |
| CN112699149B (en) * | 2020-12-31 | 2023-09-19 | 青岛海尔科技有限公司 | Target data acquisition method, device, storage medium and electronic device |
| CN112818012A (en) * | 2021-01-26 | 2021-05-18 | 深圳力维智联技术有限公司 | Equipment data matching method, device, equipment and storage medium |
| CN114297411A (en) * | 2022-03-08 | 2022-04-08 | 支付宝(杭州)信息技术有限公司 | Configuration method, analysis method and device of entities in knowledge graph |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110119292B (en) | 2023-02-07 |
| WO2019154353A1 (en) | 2019-08-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110119292B (en) | System operation parameter query method, matching method, device and node equipment | |
| US10237295B2 (en) | Automated event ID field analysis on heterogeneous logs | |
| US8918507B2 (en) | Dynamic grouping of enterprise assets | |
| CN110399388A (en) | Data query method, system and equipment | |
| US20250315273A1 (en) | API Governance Enforcement Architecture | |
| WO2021023149A1 (en) | Method and apparatus for dynamically returning message | |
| CN114168149A (en) | Data conversion method and device | |
| CN112650804B (en) | Big data access method, device, system and storage medium | |
| CN115529271B (en) | Service request distribution method, device, equipment and medium | |
| CN108885633A (en) | For finding and being connected to the technology of REST interface automatically | |
| CN107045466A (en) | Auditing method, the apparatus and system of business datum | |
| CN113760987A (en) | Data processing method and data processing platform | |
| CN112837156A (en) | Transaction method and device with fixed execution order | |
| CN114327493B (en) | Data processing method and device, electronic device, and computer readable medium | |
| CN116303428A (en) | Data processing method and device | |
| CN105227599B (en) | The recognition methods of Web applications and device | |
| US8549090B2 (en) | Messaging tracking system and method | |
| CN108696549A (en) | Load-balancing method, device and system | |
| US12177076B2 (en) | Restoration of a network slice | |
| US10599728B1 (en) | Metadata agent for query management | |
| CN115599823A (en) | Data acquisition method, device, equipment and storage medium in microservice scenario | |
| CN114328557A (en) | Data processing method and device, electronic equipment and storage medium | |
| CN115114364A (en) | Method, device, equipment and computer readable medium for matching interface | |
| CN113726885A (en) | Method and device for adjusting flow quota | |
| US12483597B2 (en) | Hybrid-type authorization policy evaluation |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |