+

CN111327679A - Rule analysis method and device - Google Patents

Rule analysis method and device Download PDF

Info

Publication number
CN111327679A
CN111327679A CN202010068013.8A CN202010068013A CN111327679A CN 111327679 A CN111327679 A CN 111327679A CN 202010068013 A CN202010068013 A CN 202010068013A CN 111327679 A CN111327679 A CN 111327679A
Authority
CN
China
Prior art keywords
label
tag
message
rule
component
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
Application number
CN202010068013.8A
Other languages
Chinese (zh)
Other versions
CN111327679B (en
Inventor
陈小明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Suning Cloud Computing Co ltd
SuningCom Co ltd
Original Assignee
Suning Cloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010068013.8A priority Critical patent/CN111327679B/en
Publication of CN111327679A publication Critical patent/CN111327679A/en
Application granted granted Critical
Publication of CN111327679B publication Critical patent/CN111327679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a rule analysis method and a device, and the rule analysis method comprises the following steps: receiving a label rule message, wherein the label rule message is generated according to a first predefined message format; decomposing the label rule message to obtain label identification codes and label field information of the N labels; inquiring a tag database according to the tag identification code of the tag to obtain a tag data dictionary of the tag; and combining the label data dictionaries of the N labels and the label field information to assemble to obtain the query condition message. In the invention, after different business systems carry out label rule configuration, label rule messages are generated according to the uniformly agreed predefined message format, the label rule messages generated by all the business systems have the same format and the same analysis logic, and can be uniformly analyzed by only one set of analysis codes, thereby reducing the development workload.

Description

一种规则解析方法及装置A rule parsing method and device

技术领域technical field

本发明涉及大数据技术领域,具体涉及一种规则解析方法及装置。The present invention relates to the technical field of big data, in particular to a rule parsing method and device.

背景技术Background technique

在大数据领域,使用标签来描述业务实体特征,通过标签进行规则配置,可进行数据筛选和分析。用户标签用来对用户进行刻画,有“年龄”标签,“性别”标签,“地区”标签,“兴趣爱好”标签以及“产品偏好”标签等,通过用户标签可筛选出不同特征的客群。例如,根据“年龄”标签和“会员等级”标签,用来配置客群筛选规则,筛选出年龄范围21-22且会员等级为V1的会员客群。In the field of big data, tags are used to describe the characteristics of business entities, and rules can be configured through tags, and data can be filtered and analyzed. User tags are used to describe users. There are "age" tags, "gender" tags, "region" tags, "hobbies" tags, and "product preference" tags. Through user tags, you can filter out customer groups with different characteristics. For example, according to the "age" label and the "membership level" label, it is used to configure the customer group filtering rules to filter out the member customer group with the age range of 21-22 and the membership level is V1.

然而,目前对于相同标签,各业务系统定义规范各不相同,如果新增加一个标签用于配置规则,各业务系统需要各自开发该标签的解析代码,开发工作量大,周期长。However, at present, for the same label, the definition specifications of each business system are different. If a new label is added to configure rules, each business system needs to develop the parsing code of the label, which requires a large amount of development work and a long cycle.

发明内容SUMMARY OF THE INVENTION

本发明的实施例提供一种规则解析方法及装置,对标签规则进行统一解析,减少开发工作量。Embodiments of the present invention provide a rule parsing method and device, which can uniformly parse label rules and reduce development workload.

为达到上述目的,本发明的实施例采用如下技术方案:To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

第一方面,本发明的实施例提供一种规则解析方法,包括:In a first aspect, an embodiment of the present invention provides a rule parsing method, including:

接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;receiving a label rule message, where the label rule message is generated according to a first predefined message format;

分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,N表示大于等于1的整数;Decompose the label rule message to obtain label identification codes and label field information of N labels, where N represents an integer greater than or equal to 1;

根据标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;According to the tag identification code of the tag, query the tag database to obtain the tag data dictionary of the tag;

结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。Combined with the tag data dictionary and tag field information of the N tags, the query condition message is assembled.

结合第一方面,在第一方面的第一种可能的实现方式中,所述分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,具体包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the labeling rule packet is decomposed to obtain label identification codes and label field information of N labels, specifically including:

根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。The label rule message is checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain label identifiers and label field information of N labels.

结合第一方面,在第一方面的第二种可能的实现方式中,在所述接收标签规则报文前,还包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, before the receiving the label rule message, the method further includes:

从原子组件集合中选择标签原子组件;Select the tag atomic component from the atomic component collection;

基于所选标签原子组件构建标签,生成所述标签的标签数据字典;Build a tag based on the selected tag atomic component, and generate a tag data dictionary of the tag;

将所述标签数据字典存储在标签数据库中。The tag data dictionary is stored in a tag database.

结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述方法还包括:推送所述标签,具体包括:With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes: pushing the tag, specifically including:

按照第二预定义报文格式,根据所述标签的标签数据字典,生成所述标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置界面。According to the second predefined message format, according to the label data dictionary of the label, a front-end message of the label is generated, and the front-end message is sent, and the front-end message is used to generate a label rule configuration interface.

结合第一方面的第二种可能的实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:With reference to the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes:

获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合。Obtain component information, construct a label atomic component according to the component information, and add the label atomic component to the atomic component set.

第二方面,本发明的实施例提供一种规则解析装置,包括:In a second aspect, an embodiment of the present invention provides a rule parsing apparatus, including:

接收模块,用于接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;a receiving module, configured to receive a label rule message, where the label rule message is generated according to a first predefined message format;

分解模块,用于分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息;a decomposition module, configured to decompose the label rule message to obtain the label identification codes and label field information of the N labels;

查询模块,用于根据所述标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;a query module, configured to query the label database according to the label identification code of the label to obtain the label data dictionary of the label;

组装模块,用于结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。The assembly module is used to combine the tag data dictionary and tag field information of N tags to assemble the query condition message.

结合第二方面,在第二方面的第一种可能的实现方式中,所述分解模块进一步用于:In conjunction with the second aspect, in a first possible implementation manner of the second aspect, the decomposition module is further configured to:

根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。The label rule message is checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain label identifiers and label field information of N labels.

结合第二方面,在第二方面的第二种可能的实现方式中,所述装置还包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, the apparatus further includes:

标签构建模块,用于从原子组件集合中选择标签原子组件;基于所选标签原子组件构建标签,生成所述标签的标签数据字典;将所述标签数据字典存储在标签数据库中。The label building module is used for selecting a label atom component from the set of atom components; constructing a label based on the selected label atom component, and generating a label data dictionary of the label; and storing the label data dictionary in a label database.

结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述装置还包括:With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the apparatus further includes:

标签推送模块,用于按照第二预定义报文格式,根据所选标签的标签数据字典,生成所选标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置界面。The label push module is configured to generate the front-end message of the selected label according to the label data dictionary of the selected label according to the second predefined message format, and send the front-end message, and the front-end message is used to generate label rules configuration interface.

结合第二方面的第二种可能的实现方式,在第二方面的第四种可能的实现方式中,所述装置还包括:With reference to the second possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus further includes:

组件构建模块,用于获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合。The component building module is used for acquiring component information, constructing a label atomic component according to the component information, and adding the label atomic component to the atomic component set.

本发明实施例提供的一种规则解析方法及装置,对标签规则进行统一解析,减少开发工作量。本发明实施例的规则解析方法,首先接收标签规则报文;然后分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,N表示大于等于1的整数;再根据标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;最后结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。本发明中,不同的业务系统进行标签规则配置后,按照统一约定的第一预定义报文格式生成标签规则报文,所有业务系统生成的标签规则报文格式相同,通过分解标签规则报文得到标签识别码和配置的标签字段信息,根据标签识别码查找用于定义标签的标签数据字典,将标签字段信息代入标签数据字典,组装得到底层数据源可以识别的查询条件报文,整个解析逻辑适用于所有业务系统,只需一套解析代码即可进行统一解析,减少开发工作量。The rule parsing method and device provided by the embodiments of the present invention perform unified parsing on labeling rules and reduce development workload. In the rule parsing method according to the embodiment of the present invention, a label rule message is first received; then the label rule message is decomposed to obtain label identification codes and label field information of N labels, where N represents an integer greater than or equal to 1; The tag identification code is used to query the tag database to obtain the tag data dictionary of the tag; finally, the query condition message is assembled by combining the tag data dictionary and tag field information of the N tags. In the present invention, after different business systems configure label rules, they generate label rule messages according to the first predefined message format agreed upon uniformly. The tag identification code and the configured tag field information, look up the tag data dictionary used to define the tag according to the tag identification code, substitute the tag field information into the tag data dictionary, and assemble the query condition message that the underlying data source can recognize. The whole parsing logic applies For all business systems, only one set of parsing codes can be used for unified parsing, reducing development workload.

附图说明Description of drawings

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

图1为本发明实施例提供的规则解析方法的流程图;1 is a flowchart of a rule parsing method provided by an embodiment of the present invention;

图2为本发明另一实施例提供的规则解析方法的流程图;2 is a flowchart of a rule parsing method provided by another embodiment of the present invention;

图3为本发明实施例提供的规则解析装置的结构框图;3 is a structural block diagram of a rule parsing apparatus provided by an embodiment of the present invention;

图4为本发明另一实施例提供的规则解析装置的结构框图。FIG. 4 is a structural block diagram of a rule parsing apparatus provided by another embodiment of the present invention.

具体实施方式Detailed ways

为使本领域技术人员更好地理解本发明的技术方案,下面结合附图和具体实施方式对本发明作进一步详细描述。显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的提前下所获得的实施例,都应属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, the embodiments obtained by those of ordinary skill in the art without making creative efforts in advance shall all belong to the protection scope of the present invention.

本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被理解为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It will be understood by those skilled in the art that the singular forms "a", "an", "the" and "the" as used herein can include the plural forms as well, unless expressly stated otherwise. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of stated features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components and/or groups thereof. In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as an example, illustration or illustration. Any embodiments or designs described as "exemplary" or "such as" in the embodiments of the present invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语)具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样定义,不会用理想化或过于正式的含义来解释。It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless defined as herein, are not to be taken in an idealized or overly formal sense. explain.

本发明实施例提供一种规则解析方法,如图1所示,包括:An embodiment of the present invention provides a rule parsing method, as shown in FIG. 1 , including:

S10,接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;S10, receive a label rule message, where the label rule message is generated according to a first predefined message format;

S20,分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,N表示大于等于1的整数;S20, decompose the label rule message to obtain label identification codes and label field information of N labels, where N represents an integer greater than or equal to 1;

S30,根据标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;S30, according to the tag identification code of the tag, query the tag database to obtain the tag data dictionary of the tag;

S40,结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。S40, combine the tag data dictionary and tag field information of the N tags to assemble a query condition message.

本发明实施例的标签管理系统对接所有业务系统,接收业务系统发送的标签规则报文,该标签规则报文是按照约定的第一预定义报文格式生成,故不同的业务系统发送给的标签规则报文的格式均相同,标签管理系统根据第一预定义报文格式,对标签规则报文进行统一解析,得到底层数据源可识别的查询条件报文,底层数据源依据查询条件报文进行数据的筛选。由于不同的业务系统发送给的标签规则报文的格式均相同,故对标签规则报文的解析逻辑相同,可使用同一套解析代码进行不同业务系统的标签规则的解析,无需各业务系统针对不同的标签规则进行解析代码的开发,减少开发工作量,新增标签或新增标签规则时,无需开发对应的解析代码,加快标签上线速度。The label management system of the embodiment of the present invention is connected to all business systems, and receives the label rule message sent by the business system. The label rule message is generated according to the agreed first predefined message format, so the labels sent by different business systems The format of the rule message is the same. The label management system uniformly parses the label rule message according to the first predefined message format, and obtains the query condition message that can be identified by the underlying data source. filtering of data. Since the format of the label rule message sent by different business systems is the same, the parsing logic of the label rule message is the same, and the same set of parsing codes can be used to parse the label rules of different business systems, without the need for each business system for different The development of the parsing code based on the labeling rules reduces the development workload. When adding a new label or adding a new labeling rule, there is no need to develop the corresponding parsing code, which speeds up the launch of the label.

步骤S20中,根据本发明的一个实施例,先根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。本发明实施例在解析前先进行格式校验,只有校验通过才进行解析,可以提高解析的准确率。In step S20, according to an embodiment of the present invention, the label rule message is first checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain N labels. Tag identifier and tag field information. In the embodiment of the present invention, format verification is performed before parsing, and parsing is performed only after the verification is passed, which can improve the accuracy of parsing.

本发明实施例中,标签管理系统将接收到的标签规则报文,按照第一预定义报文格式进行格式校验,若校验通过,则将标签规则报文解析得标签的单标签信息,如果有两个以上标签,还包括解析得到各标签之间的逻辑关系。单标签信息包括该标签的标签识别码和该标签的标签字段信息,标签字段信息包括值域类型字段、值域值字段等。例如,业务系统A使用“年龄”标签和“会员等级”标签配置了一条规则“年龄范围在21-22岁且会员等级为V1”,标签管理系统接收到业务系统A发送的标签规则报文后,解析得到两个标签,这两个标签的逻辑关系是“and”,两个标签的单标签信息为:标签识别码“101”,值域类型字段“>=”和“<=”,值域值字段“21”和“22”等;标签识别码“423”,值域类型字段“IN”,值域值字段“145998009”(代表V1)等。In the embodiment of the present invention, the label management system performs format verification on the received label rule message according to the first predefined message format, and if the check passes, parses the label rule message to obtain the single label information of the label, If there are more than two tags, it also includes the logical relationship between the tags obtained by parsing. The single tag information includes the tag identification code of the tag and the tag field information of the tag, and the tag field information includes a range type field, a range value field, and the like. For example, business system A uses the "age" label and the "membership level" label to configure a rule "age range is 21-22 years old and membership level is V1". After receiving the labeling rule message sent by business system A, the label management system , two tags are obtained by parsing, the logical relationship of these two tags is "and", the single tag information of the two tags is: tag identification code "101", value field type fields ">=" and "<=", value The field value fields "21" and "22", etc.; the label identification code "423", the value field type field "IN", the value field value field "145998009" (representing V1) and so on.

步骤S30中,根据标签的标签识别码,查询得到该标签的标签数据字典,所述标签数据字典在构建标签时生成,包括标签定义信息。In step S30, according to the tag identification code of the tag, a tag data dictionary of the tag is obtained by query, and the tag data dictionary is generated when the tag is constructed, and includes tag definition information.

步骤S40中,对应标签数据字典,从标签字段信息选择字段数据替换标签数据字典中的参数,过滤掉标签数据字典中的未替换参数。如果步骤S20解析得到一个标签,则直接组装得到查询条件报文。如果步骤S20解析得到两个以上标签,根据解析得到的各标签之间的逻辑关系,组成得到查询条件报文,用于下发给底层数据源进行数据筛选。查询条件报文可以是sql查询语句。In step S40, corresponding to the tag data dictionary, select field data from the tag field information to replace the parameters in the tag data dictionary, and filter out the unreplaced parameters in the tag data dictionary. If a tag is obtained by parsing in step S20, the query condition message is directly assembled and obtained. If two or more tags are obtained by parsing in step S20, a query condition message is formed according to the logical relationship between the tags obtained by parsing, and is used for delivering to the underlying data source for data screening. The query condition message can be a SQL query statement.

本发明实施例将按照第一预定义报文格式的标签规则报文,先进行分解,提取至少一个标签的标签识别码和标签字段信息,该标签字段信息为业务系统在配置标签规则时设定的参数值,根据标签识别码去查找对应的业务系统对该标签的定义,即标签数据字典,根据标签数据字典和标签字段信息,组装成查询条件报文,用于下发给底层数据源进行数据筛选,所有业务系统生成的标签规则报文格式相同,这个解析逻辑相同,只需一套解析代码即可进行统一解析,减少开发工作量。In this embodiment of the present invention, the label rule message in the first predefined message format is first decomposed, and the label identification code and label field information of at least one label are extracted, and the label field information is set by the business system when configuring the label rule. The parameter value of the tag, according to the tag identification code, to find the definition of the tag in the corresponding business system, that is, the tag data dictionary. According to the tag data dictionary and tag field information, a query condition message is assembled and sent to the underlying data source for processing For data filtering, the format of the label rule message generated by all business systems is the same, and the parsing logic is the same. Only one set of parsing codes can be used for unified parsing, reducing the development workload.

根据本发明的一个实施例,在接收标签规则报文前,还包括:According to an embodiment of the present invention, before receiving the label rule message, the method further includes:

步骤S00,如果使用现有标签可进行配置待配置规则,则执行步骤S03,否则构建标签并下发,执行步骤S01。Step S00, if the existing label can be used to configure the to-be-configured rule, step S03 is performed; otherwise, a label is constructed and issued, and step S01 is performed.

步骤S01,从原子组件集合中选择标签原子组件。Step S01, selecting a tag atomic component from the atomic component set.

本发明实施例中,所述标签原子组件为构成标签的通用展现形态单元,比如数值(范围)、多选、单选、日期范围等等。通过一个或多个标签原子组件可构建标签,例如数值(范围)可构成年龄标签,多选可构成会员等级标签。In the embodiment of the present invention, the tag atomic component is a general presentation form unit constituting a tag, such as numerical value (range), multiple selection, single selection, date range, and the like. A tag can be constructed by one or more tag atomic components. For example, a numerical value (range) can constitute an age tag, and multiple selections can constitute a membership level tag.

如果原子组件集合中的标签原子组件可构建待构建标签,则执行步骤S01,否则在步骤S01前还包括:获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合。所述组件信息包括组件名称、逻辑运算符和参数类型。其中逻辑运算符为=、<、<=、!=等常用操作符,参数类型分为单值(String)和列表(List)两种。获取组件信息后,随机生成组件ID,根据组件信息与组件ID生成一条组件数据,并存储到数据库的组件表中,即构建一个标签原子组件。所有标签原子组件组成原子组件集合,每新建一个标签原子组件,数据库的组件表中对应新增一条组件数据,原子组件集合中增加一个标签原子组件。例如,构建数值(范围)标签原子组件时,获取的组件信息如下:组件名称为“数值(范围)”,逻辑运算符为“>=”和“<=”,参数类型为“String”。If the label atom component in the atom component set can construct the label to be constructed, step S01 is executed, otherwise, before step S01, the method further includes: acquiring component information, constructing a label atom component according to the component information, and adding the label atom component to the atom A collection of components. The component information includes component name, logical operator and parameter type. The logical operators are =, <, <=, ! = and other common operators, the parameter types are divided into two types: single value (String) and list (List). After obtaining the component information, the component ID is randomly generated, a piece of component data is generated according to the component information and the component ID, and stored in the component table of the database, that is, a label atomic component is constructed. All tag atomic components form an atomic component set. Each time a new tag atomic component is created, a corresponding component data is added to the component table of the database, and a tag atomic component is added to the atomic component set. For example, when constructing an atomic component with a numeric (range) tag, the obtained component information is as follows: the component name is "numeric (range)", the logical operators are ">=" and "<=", and the parameter type is "String".

在一些实施例中,通过原子配置交互界面获取组件信息。标签管理系统生成原子配置交互界面,标签管理人员可以在原子配置交互界面上填写组件信息,标签管理系统后台获取组件信息。通过交互界面获取组件信息来构建标签原子组件,操作简单方便,可快速构建标签原子组件,提高工作效率。In some embodiments, component information is obtained through an atomic configuration interface. The tag management system generates the atomic configuration interactive interface, and the tag management personnel can fill in the component information on the atomic configuration interactive interface, and the tag management system obtains the component information in the background. Obtaining component information through the interactive interface to build a label atomic component is simple and convenient to operate, and can quickly build a label atomic component to improve work efficiency.

步骤S01具体包括,获取标签信息,根据所述标签信息从所述原子组件集合中选择标签原子组件。所述标签信息包括标签基本信息和原子信息,标签基本信息包括标签识别码和标签名称,原子信息包括可构建该标签的标签原子组件的组件名称和组件字段。Step S01 specifically includes: acquiring label information, and selecting a label atom component from the atom component set according to the label information. The label information includes basic label information and atom information, the basic information of the label includes the label identification code and the label name, and the atom information includes the component name and component field of the label atomic component that can construct the label.

在一些实施例中,通过标签组件配置交互界面获得标签信息。标签管理系统生成标签组件配置交互界面,标签组件配置交互界面展示原子组件集合中所有标签原子组件的基本信息,基本信息包括组件名称和组件ID。标签管理人员在标签组件配置交互界面填写标签信息,标签管理系统后台获取上述信息后,根据标签信息找到数据库的组件表中构建该标签的标签原子组件的组件数据。In some embodiments, the tag information is obtained through the tag component configuration interface. The tag management system generates a tag component configuration interface, and the tag component configuration interface displays the basic information of all the tag atom components in the atom component set, and the basic information includes component name and component ID. The label manager fills in the label information in the label component configuration interactive interface. After the label management system obtains the above information in the background, it finds the component data of the label atom component that constructs the label in the component table of the database according to the label information.

步骤S02,基于所选标签原子组件构建标签,生成所述标签的标签数据字典。Step S02, constructing a tag based on the selected tag atom component, and generating a tag data dictionary of the tag.

步骤S03,将所述标签数据字典存储在标签数据库中,并将所述标签加入标签集合。Step S03, store the label data dictionary in a label database, and add the label to a label set.

本实施例中,生成一条新的标签数据,存储到数据库的标签表中,将标签数据与该组件数据建立数据连接,根据标签数据和组件数据生成标签数据字典并存储。In this embodiment, a new piece of label data is generated, stored in the label table of the database, a data connection is established between the label data and the component data, and a label data dictionary is generated and stored according to the label data and the component data.

作为优选,通过交互界面配置标签信息,操作简单方便,可快速选择标签原子组件构建标签,减少工作量,提高工作效率。Preferably, the label information is configured through the interactive interface, the operation is simple and convenient, and the label atomic components can be quickly selected to construct the label, which reduces the workload and improves the work efficiency.

本发明实施例通过抽取标签通用展现形态,将标签组件化,通过构建原子组件,基于原子组件构建标签,使得复杂的标签能够通过多个原子组件拼接形成,相似标签只要构成的原子组件相同,即可重用,增加重用性,避免重复开发。新增标签时,若已有的标签原子组件可以构成,则不需要开发,更新标签时,只需修改原子组件,由该原子组件构建的标签均可得到更新,大幅减少工作量,提高标签管理效率,降低更新或新增标签上线的难度。In the embodiment of the present invention, by extracting the general presentation form of the label, the label is componentized, and by constructing the atomic component, the label is constructed based on the atomic component, so that the complex label can be formed by splicing multiple atomic components. Similar labels only need to form the same atomic components, namely Reusable, increase reusability and avoid repetitive development. When adding a tag, if the existing tag atomic component can be formed, there is no need to develop it. When updating a tag, you only need to modify the atomic component, and the tags constructed by the atomic component can be updated, which greatly reduces the workload and improves tag management. Efficiency, reducing the difficulty of updating or adding new tags online.

根据本发明的一个实施例,还包括步骤S04,从所述标签集合中选择标签,推送所述标签。According to an embodiment of the present invention, step S04 is further included, selecting a tag from the tag set, and pushing the tag.

在一些实施例中,通过标签下发交互界面获取待下发的标签名称及业务系统名称,根据待下发的标签名称,将对应的标签通过推送渠道推送给待下达的业务系统。标签管理人员可以在标签下发交互界面选择待下发的业务系统及待下发的标签,操作简单方便,提高工作效率。In some embodiments, the name of the label to be issued and the name of the business system are obtained through the label issuing interface, and according to the name of the label to be issued, the corresponding label is pushed to the business system to be issued through a push channel. The label manager can select the business system to be issued and the label to be issued in the label release interactive interface, which is simple and convenient to operate and improves work efficiency.

根据本发明的一个实施例,推送所述标签具体包括:According to an embodiment of the present invention, pushing the label specifically includes:

按照第二预定义报文格式,根据所选标签的标签数据字典,生成所选标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置交互界面。According to the second predefined message format, according to the tag data dictionary of the selected tag, a front-end message of the selected tag is generated, and the front-end message is sent, and the front-end message is used to generate a tag rule configuration interactive interface.

其中,生成所述标签的前端报文具体是根据该标签的标签数据字典,提取所述标签的标签数据和与该标签数据建立数据连接的组件数据,按照第二预定义报文格式生成该标签的前端报文。第二预定义报文格式由标签管理系统和所有业务系统约定形成,标签管理系统按照第二预定义报文格式生成的报文,业务系统可解析生成对应的交互界面。Specifically, generating the front-end message of the label is to extract the label data of the label and the component data that establishes a data connection with the label data according to the label data dictionary of the label, and generate the label according to the second predefined message format. front-end message. The second predefined message format is formed by agreement between the label management system and all business systems, and the business system can parse the message generated by the label management system according to the second predefined message format to generate a corresponding interactive interface.

业务系统收到标签管理系统发送的前端报文后,解析前端报文,生成标签规则配置界面。用户在标签规则配置界面进行规则配置,业务系统获取标签规则参数后,按照第一预定义报文格式生成该规则的标签规则报文,并将该标签规则报文发送给标签管理系统。After receiving the front-end message sent by the label management system, the business system parses the front-end message and generates a label rule configuration interface. The user configures the rules on the label rule configuration interface. After obtaining the label rule parameters, the business system generates a label rule message of the rule according to the first predefined message format, and sends the label rule message to the label management system.

本发明实施例标签管理系统按照第二预定义报文格式,生成下发标签的前端报文发送给业务系统,使得业务系统解析报文后自动生成标签规则配置界面,无需人工开发业务系统的标签规则配置界面,避免因人为理解标签定义错误导致标签开发错误,不需要维护标签规则配置界面的前端代码,减少工作量,简化了新增或更新标签时的上线流程。According to the second predefined message format, the label management system according to the embodiment of the present invention generates a front-end message for issuing labels and sends them to the business system, so that the business system automatically generates a label rule configuration interface after parsing the message, and does not need to manually develop labels for the business system. The rule configuration interface avoids label development errors caused by human understanding of label definition errors, does not need to maintain the front-end code of the label rule configuration interface, reduces workload, and simplifies the online process when adding or updating labels.

图2示出了本发明实施例另一实施例规则解析方法的流程图,该实施例以解析规则“年龄范围在21-22岁”为例,介绍构建数值(范围)标签原子组件,从而构建年龄标签,并使用年龄标签配置规则“年龄范围在21-22岁”,解析上述规则的方法流程。FIG. 2 shows a flowchart of a rule parsing method according to another embodiment of the present invention. This embodiment takes the parsing rule “age range is 21-22 years old” as an example to introduce the construction of a numerical (range) label atomic component, so as to construct Age tag, and use the age tag to configure the rule "age range is 21-22 years old", and the method flow of parsing the above rules.

步骤60、标签管理系统构建数值(范围)标签原子组件。Step 60: The tag management system constructs a numerical (range) tag atomic component.

步骤601、通过原子配置交互界面获取标签管理人员配置的组件信息。标签管理人员在原子配置交互界面上填写组件名称为“数值(范围)”,逻辑运算符为“>=”和“<=”,参数类型为“String”。Step 601: Obtain the component information configured by the tag manager through the atomic configuration interactive interface. The label manager fills in the component name as "value (range)" on the atomic configuration interactive interface, the logical operators as ">=" and "<=", and the parameter type as "String".

步骤602、生成数值(范围)标签原子组件的组件ID为10。Step 602 , the component ID of the atomic component of the generated value (range) tag is 10.

步骤603、根据组件信息和组件ID生成数值(范围)标签原子组件的组件数据,存储到数据库的组件表中。Step 603: Generate the component data of the numerical (range) tag atomic component according to the component information and the component ID, and store the component data in the component table of the database.

步骤61、标签管理系统构建年龄标签。Step 61, the tag management system constructs an age tag.

步骤611、通过标签组件配置交互界面获取标签管理人员配置的标签信息,包括选择的标签原子组件和配置的组件字段。标签管理人员在标签组件配置界面填写标签名称“年龄”,选择标签原子组件“数值(范围)”,填写数值(范围)标签原子组件的两个起始字段。Step 611: Acquire the tag information configured by the tag manager through the tag component configuration interactive interface, including the selected tag atom component and the configured component field. The label manager fills in the label name "age" in the label component configuration interface, selects the label atom component "value (range)", and fills in the two start fields of the value (range) label atom component.

步骤612、生成年龄标签数据存储到数据库的标签表中,年龄标签数据包括上述获得的标签名称和组件字段,并将该年龄标签数据与数据库中的数值(范围)标签原子组件的组件数据建立数据连接。Step 612, generate age tag data and store it in the tag table of the database, the age tag data includes the tag name and component field obtained above, and the age tag data and the component data of the numerical value (range) tag atomic component in the database are established data. connect.

步骤62、标签管理系统将年龄标签发送给业务系统。Step 62: The tag management system sends the age tag to the business system.

步骤621、获取标签管理人员配置的待下发标签为年龄标签,以及待下发系统为业务系统A后,提取数据库中年龄标签的标签数据以及与其连接的数值(范围)标签原子组件的组件数据。Step 621: After obtaining the label to be issued configured by the label manager as an age label, and after the system to be issued is business system A, extract the label data of the age label in the database and the component data of the numerical (range) label atomic component connected to it. .

步骤623、将上述数据按照第二预定义报文格式组装成前端报文,通过中间消息组件发送给业务系统A。Step 623: Assemble the above data into a front-end message according to the second predefined message format, and send it to the service system A through an intermediate message component.

步骤63、业务系统A生成年龄标签规则配置界面。Step 63: The business system A generates an age tag rule configuration interface.

业务系统A接收标签管理系统发送的前端报文,解析生成年龄标签规则配置界面。The business system A receives the front-end message sent by the tag management system, and parses it to generate an age tag rule configuration interface.

其中,生成年龄标签规则配置界面具体步骤如下:加载数值(范围)的界面控件,将界面控件绑定组件的起始字段。The specific steps for generating an age label rule configuration interface are as follows: load an interface control with a numerical value (range), and bind the interface control to the start field of the component.

步骤64、业务系统A获取标签规则参数,按照第一预定义报文格式生成标签规则报文。Step 64: The service system A obtains the label rule parameters, and generates a label rule message according to the first predefined message format.

业务系统A获取用户在年龄标签规则配置界面上配置的标签规则参数(21、22)后,根据年龄标签的标签数据和数值(范围)标签原子组件的组件数据,按照第一预定义报文格式生成标签规则报文。After the business system A obtains the tag rule parameters (21, 22) configured by the user on the age tag rule configuration interface, according to the tag data of the age tag and the component data of the value (range) tag atomic component, according to the first predefined message format Generate label rule packets.

步骤65、业务系统A将标签规则报文发送给标签管理系统。Step 65: The service system A sends the label rule message to the label management system.

步骤66、标签管理系统收到标签规则报文,解析标签规则报文,得到查询条件报文。Step 66: The label management system receives the label rule message, parses the label rule message, and obtains the query condition message.

步骤661、解析标签规则报文,得到年龄标签的标签识别码“101”,值域类型字段“>=”和“<=”,值域值字段“21”和“22”等标签字段信息。Step 661: Parse the label rule message to obtain label field information such as the label identifier "101" of the age label, the value field type fields ">=" and "<=", and the value field value fields "21" and "22".

步骤662、根据标签识别码,查询数据库,得到年龄标签的标签数据字典。Step 662: Query the database according to the tag identification code to obtain the tag data dictionary of the age tag.

步骤663、结合标签数据字典和所述标签字段信息,组装得到查询条件报文。Step 663: Combine the tag data dictionary and the tag field information to assemble the query condition message.

本发明实施例提供的规则解析方法,通过抽取标签通用展现形态,将标签组件化,通过构建原子组件,基于原子组件构建标签,使得复杂的标签能够通过多个原子组件拼接形成,相似标签只要构成的原子组件相同,即可重用,增加重用性,避免重复开发。新增标签时,若已有的标签原子组件可以构成,则不需要开发,更新标签时,只需修改原子组件,由该原子组件构建的标签均可得到更新,大幅减少工作量,提高标签管理效率,降低更新或新增标签上线的难度。按照第二预定义报文格式,生成下发标签的前端报文发送给业务系统,使得业务系统解析报文后自动生成标签规则配置界面,无需人工开发业务系统的标签规则配置界面,避免因人为理解标签定义错误导致标签开发错误,不需要维护标签规则配置界面的前端代码,减少工作量,简化了新增或更新标签时的上线流程。不同的业务系统进行标签规则配置后,按照统一约定的第一预定义报文格式生成标签规则报文,所有业务系统生成的标签规则报文格式相同,解析逻辑相同,只需一套解析代码即可进行统一解析,减少开发工作量。The rule parsing method provided by the embodiment of the present invention, by extracting the general presentation form of the label, componentizing the label, constructing the atomic component, and constructing the label based on the atomic component, so that the complex label can be formed by splicing multiple atomic components, and similar labels only need to form The atomic components are the same, which can be reused, increasing the reusability and avoiding repeated development. When adding a tag, if the existing tag atomic component can be formed, there is no need to develop it. When updating a tag, you only need to modify the atomic component, and the tags constructed by the atomic component can be updated, which greatly reduces the workload and improves tag management. Efficiency, reducing the difficulty of updating or adding new tags online. According to the second predefined message format, the front-end message of the issued label is generated and sent to the business system, so that the business system can automatically generate the label rule configuration interface after parsing the message, and it is not necessary to manually develop the label rule configuration interface of the business system. Understand that label definition errors lead to label development errors. There is no need to maintain the front-end code of the label rule configuration interface, which reduces the workload and simplifies the online process when adding or updating labels. After configuring labeling rules in different business systems, labeling rules messages are generated according to the first predefined message format agreed upon by all business systems. The labeling rules messages generated by all business systems have the same format and the same parsing logic. Unified analysis can be performed to reduce development workload.

本发明实施例还提供一种规则解析装置,如图3所示,包括:An embodiment of the present invention also provides a rule parsing apparatus, as shown in FIG. 3 , including:

接收模块,用于接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;a receiving module, configured to receive a label rule message, where the label rule message is generated according to a first predefined message format;

分解模块,用于分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息;a decomposition module, configured to decompose the label rule message to obtain the label identification codes and label field information of the N labels;

查询模块,用于根据所述标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;a query module, configured to query the label database according to the label identification code of the label to obtain the label data dictionary of the label;

组装模块,用于结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。The assembly module is used to combine the tag data dictionary and tag field information of N tags to assemble the query condition message.

根据本发明的一个实施例,所述分解模块进一步用于:According to an embodiment of the present invention, the decomposition module is further used for:

根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。The label rule message is checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain label identifiers and label field information of N labels.

根据本发明的一个实施例,如图4所示,所述装置还包括:According to an embodiment of the present invention, as shown in FIG. 4 , the apparatus further includes:

标签构建模块,用于从原子组件集合中选择标签原子组件;基于所选标签原子组件构建标签,生成所述标签的标签数据字典;将所述标签数据字典存储在标签数据库中。The label building module is used for selecting a label atom component from the set of atom components; constructing a label based on the selected label atom component, and generating a label data dictionary of the label; and storing the label data dictionary in a label database.

根据本发明的一个实施例,所述装置还包括:According to an embodiment of the present invention, the apparatus further includes:

标签推送模块,用于按照第二预定义报文格式,根据所选标签的标签数据字典,生成所选标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置界面。The label push module is configured to generate the front-end message of the selected label according to the label data dictionary of the selected label according to the second predefined message format, and send the front-end message, and the front-end message is used to generate label rules configuration interface.

根据本发明的一个实施例,所述装置还包括:According to an embodiment of the present invention, the apparatus further includes:

组件构建模块,用于获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合The component building module is used to obtain component information, build a label atomic component according to the component information, and add the label atomic component to the atomic component set

本发明实施例提供的一种规则解析装置,对标签规则进行统一解析,减少开发工作量。本发明实施例的规则解析装置,不同的业务系统进行标签规则配置后,按照统一约定的第一预定义报文格式生成标签规则报文,所有业务系统生成的标签规则报文格式相同,解析逻辑相同,只需一套解析代码即可进行统一解析,减少开发工作量。A rule parsing apparatus provided by an embodiment of the present invention performs unified parsing of label rules, thereby reducing development workload. In the rule parsing device of the embodiment of the present invention, after different business systems configure label rules, they generate label rule messages according to the first predefined message format agreed upon uniformly. The format of label rule messages generated by all business systems is the same, and the analysis logic In the same way, only one set of parsing codes can be used for unified parsing, reducing the development workload.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。本领域技术人员可以理解,可以对实施例中的装置中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个装置中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for related parts. Those skilled in the art can understand that the modules in the apparatus in the embodiment can be adaptively changed and arranged in one or more apparatuses different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed by the present invention can easily think of changes or substitutions. All should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

1.一种规则解析方法,其特征在于,包括:1. a rule parsing method, is characterized in that, comprises: 接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;receiving a label rule message, where the label rule message is generated according to a first predefined message format; 分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,N表示大于等于1的整数;Decompose the label rule message to obtain label identification codes and label field information of N labels, where N represents an integer greater than or equal to 1; 根据标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;According to the tag identification code of the tag, query the tag database to obtain the tag data dictionary of the tag; 结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。Combined with the tag data dictionary and tag field information of the N tags, the query condition message is assembled. 2.根据权利要求1所述的方法,其特征在于,所述分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息,具体包括:2. The method according to claim 1, characterized in that, decomposing the label rule message to obtain the label identification codes and label field information of N labels, specifically comprising: 根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。The label rule message is checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain label identifiers and label field information of N labels. 3.根据权利要求1所述的方法,其特征在于,在所述接收标签规则报文前,还包括:3. The method according to claim 1, wherein before the receiving the label rule message, further comprising: 从原子组件集合中选择标签原子组件;Select the tag atomic component from the atomic component collection; 基于所选标签原子组件构建标签,生成所述标签的标签数据字典;Build a tag based on the selected tag atomic component, and generate a tag data dictionary of the tag; 将所述标签数据字典存储在标签数据库中。The tag data dictionary is stored in a tag database. 4.根据权利要求3所述的方法,其特征在于,所述方法还包括:推送所述标签,具体包括:4. The method according to claim 3, wherein the method further comprises: pushing the label, which specifically comprises: 按照第二预定义报文格式,根据所述标签的标签数据字典,生成所述标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置界面。According to the second predefined message format, according to the label data dictionary of the label, a front-end message of the label is generated, and the front-end message is sent, and the front-end message is used to generate a label rule configuration interface. 5.根据权利要求3所述的方法,其特征在于,所述方法还包括:5. The method according to claim 3, wherein the method further comprises: 获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合。Obtain component information, construct a label atomic component according to the component information, and add the label atomic component to the atomic component set. 6.一种规则解析装置,其特征在于,包括:6. A rule parsing device, characterized in that, comprising: 接收模块,用于接收标签规则报文,所述标签规则报文按照第一预定义报文格式生成;a receiving module, configured to receive a label rule message, where the label rule message is generated according to a first predefined message format; 分解模块,用于分解所述标签规则报文,得到N个标签的标签识别码和标签字段信息;a decomposition module, configured to decompose the label rule message to obtain the label identification codes and label field information of the N labels; 查询模块,用于根据所述标签的标签识别码,查询标签数据库,得到所述标签的标签数据字典;a query module, configured to query the label database according to the label identification code of the label to obtain the label data dictionary of the label; 组装模块,用于结合N个标签的标签数据字典和标签字段信息,组装得到查询条件报文。The assembly module is used to combine the tag data dictionary and tag field information of N tags to assemble the query condition message. 7.根据权利要求6所述的装置,其特征在于,所述分解模块进一步用于:7. The device according to claim 6, wherein the decomposition module is further used for: 根据第一预定义报文格式,校验所述标签规则报文,如果校验通过,则解析所述标签规则报文,得到N个标签的标签识别码和标签字段信息。The label rule message is checked according to the first predefined message format, and if the check is passed, the label rule message is parsed to obtain label identifiers and label field information of N labels. 8.根据权利要求6所述的装置,其特征在于,所述装置还包括:8. The apparatus of claim 6, wherein the apparatus further comprises: 标签构建模块,用于从原子组件集合中选择标签原子组件;基于所选标签原子组件构建标签,生成所述标签的标签数据字典;将所述标签数据字典存储在标签数据库中。The label building module is used for selecting a label atom component from the set of atom components; constructing a label based on the selected label atom component, and generating a label data dictionary of the label; and storing the label data dictionary in a label database. 9.根据权利要求8所述的装置,其特征在于,所述装置还包括:9. The apparatus of claim 8, wherein the apparatus further comprises: 标签推送模块,用于按照第二预定义报文格式,根据所选标签的标签数据字典,生成所选标签的前端报文,发送所述前端报文,所述前端报文用于生成标签规则配置界面。The label push module is configured to generate the front-end message of the selected label according to the label data dictionary of the selected label according to the second predefined message format, and send the front-end message, and the front-end message is used to generate label rules configuration interface. 10.根据权利要求8所述的装置,其特征在于,所述装置还包括:10. The apparatus of claim 8, wherein the apparatus further comprises: 组件构建模块,用于获取组件信息,根据所述组件信息构建标签原子组件,将所述标签原子组件加入原子组件集合。The component building module is used for acquiring component information, constructing a label atomic component according to the component information, and adding the label atomic component to the atomic component set.
CN202010068013.8A 2020-01-19 2020-01-19 A rule parsing method and device Active CN111327679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010068013.8A CN111327679B (en) 2020-01-19 2020-01-19 A rule parsing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010068013.8A CN111327679B (en) 2020-01-19 2020-01-19 A rule parsing method and device

Publications (2)

Publication Number Publication Date
CN111327679A true CN111327679A (en) 2020-06-23
CN111327679B CN111327679B (en) 2022-06-17

Family

ID=71168649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010068013.8A Active CN111327679B (en) 2020-01-19 2020-01-19 A rule parsing method and device

Country Status (1)

Country Link
CN (1) CN111327679B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641662A (en) * 2020-07-01 2020-09-08 中国银行股份有限公司 Message format inspection method and device
CN112052171A (en) * 2020-09-03 2020-12-08 上海复深蓝软件股份有限公司 Test message processing method and device, computer equipment and storage medium
CN112231568A (en) * 2020-10-22 2021-01-15 携程计算机技术(上海)有限公司 Hotel label automatic configuration method and device, electronic equipment and storage medium
CN112785368A (en) * 2020-12-24 2021-05-11 江苏苏宁云计算有限公司 Label production method, management method, device and system
CN113127690A (en) * 2021-05-18 2021-07-16 中国银行股份有限公司 Information processing method, back-end server and information processing system
CN113205705A (en) * 2021-03-26 2021-08-03 南京莱斯信息技术股份有限公司 Flight telegram centralized processing system and method based on telegram label
CN113872963A (en) * 2021-09-26 2021-12-31 中水北方勘测设计研究有限责任公司 Message protocol rapid analysis method and system based on free label splicing technology
CN114530216A (en) * 2020-11-23 2022-05-24 中移物联网有限公司 Spectral analysis method, device and readable storage medium
CN115834736A (en) * 2022-11-14 2023-03-21 四川启睿克科技有限公司 Declaration type message decoding method for binary message

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170024431A1 (en) * 2015-07-24 2017-01-26 International Business Machines Corporation Generating and executing query language statements from natural language
CN107277006A (en) * 2017-06-15 2017-10-20 中国银行股份有限公司 A kind of message parsing method and device
CN109144501A (en) * 2018-08-30 2019-01-04 杭州数澜科技有限公司 A kind of method and system generating API by label

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170024431A1 (en) * 2015-07-24 2017-01-26 International Business Machines Corporation Generating and executing query language statements from natural language
CN107277006A (en) * 2017-06-15 2017-10-20 中国银行股份有限公司 A kind of message parsing method and device
CN109144501A (en) * 2018-08-30 2019-01-04 杭州数澜科技有限公司 A kind of method and system generating API by label

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641662A (en) * 2020-07-01 2020-09-08 中国银行股份有限公司 Message format inspection method and device
CN112052171A (en) * 2020-09-03 2020-12-08 上海复深蓝软件股份有限公司 Test message processing method and device, computer equipment and storage medium
CN112231568A (en) * 2020-10-22 2021-01-15 携程计算机技术(上海)有限公司 Hotel label automatic configuration method and device, electronic equipment and storage medium
CN112231568B (en) * 2020-10-22 2023-11-03 携程计算机技术(上海)有限公司 Hotel label automatic configuration method and device, electronic equipment and storage medium
CN114530216A (en) * 2020-11-23 2022-05-24 中移物联网有限公司 Spectral analysis method, device and readable storage medium
CN112785368A (en) * 2020-12-24 2021-05-11 江苏苏宁云计算有限公司 Label production method, management method, device and system
CN113205705A (en) * 2021-03-26 2021-08-03 南京莱斯信息技术股份有限公司 Flight telegram centralized processing system and method based on telegram label
CN113205705B (en) * 2021-03-26 2022-05-27 南京莱斯信息技术股份有限公司 System and method for centralized processing of flight telegrams based on telegram tags
CN113127690A (en) * 2021-05-18 2021-07-16 中国银行股份有限公司 Information processing method, back-end server and information processing system
CN113872963A (en) * 2021-09-26 2021-12-31 中水北方勘测设计研究有限责任公司 Message protocol rapid analysis method and system based on free label splicing technology
CN113872963B (en) * 2021-09-26 2023-09-29 中水北方勘测设计研究有限责任公司 Method and system for rapidly analyzing message protocol based on free label splicing technology
CN115834736A (en) * 2022-11-14 2023-03-21 四川启睿克科技有限公司 Declaration type message decoding method for binary message

Also Published As

Publication number Publication date
CN111327679B (en) 2022-06-17

Similar Documents

Publication Publication Date Title
CN111327679B (en) A rule parsing method and device
US7631227B2 (en) Automated testing and control of networked devices
US8869111B2 (en) Method and system for generating test cases for a software application
CN104461531B (en) A kind of implementation method of reporting system SQL
WO2012155643A1 (en) Method for implementing configuration console based on database, configuration console, and system
CN112507273A (en) Webpage generating method and device and electronic equipment
EP4024251A1 (en) Method for verifying vulnerabilities of network devices using cve entries
CN113434742A (en) Account screening method and device, storage medium and electronic device
CN113448555B (en) Correlation analysis method, device, equipment and storage medium
CN103870939A (en) Object name generating method and system
CN110866054A (en) Label configuration method and device and computer storage medium
US20070162470A1 (en) Method and apparatus for event transformation and adaptive correlation for monitoring business solutions
CN106909435B (en) Method and device for analyzing command line of network security equipment
CN115934097A (en) Method, device, storage medium and electronic device for generating executable statement
JP2013214148A (en) Message conversion apparatus and message conversion program
WO2017117870A1 (en) Processing method and apparatus for trap instruction trap
US20230336410A1 (en) Method and apparatus for configuring node
CN115168365B (en) Data storage method and device, electronic equipment and storage medium
CN113504912B (en) Real-time task processing method and device, storage medium and electronic device
CN115480759A (en) Method for packaging universal system search assembly based on configuration items
CN116932604A (en) Multi-granularity data pattern mining method and related equipment
CN115018269A (en) Work order data processing method and system
CN110083583B (en) Streaming event processing method and device
Tothfalusi et al. TACO-A Generative AI Copilot for Intent-based Telecommunication Core Network Analysis
US12248775B2 (en) System to identify and characterize code changes

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210042

Patentee after: Jiangsu Suning cloud computing Co.,Ltd.

Country or region after: China

Address before: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210042

Patentee before: Suning Cloud Computing Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20241206

Address after: 210000, 1-5 story, Jinshan building, 8 Shanxi Road, Nanjing, Jiangsu.

Patentee after: SUNING.COM Co.,Ltd.

Country or region after: China

Address before: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210042

Patentee before: Jiangsu Suning cloud computing Co.,Ltd.

Country or region before: China

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载