[go: up one dir, main page]

CN114817209A - Processing method and device, processor and electronic device for monitoring rules - Google Patents

Processing method and device, processor and electronic device for monitoring rules Download PDF

Info

Publication number
CN114817209A
CN114817209A CN202210461506.7A CN202210461506A CN114817209A CN 114817209 A CN114817209 A CN 114817209A CN 202210461506 A CN202210461506 A CN 202210461506A CN 114817209 A CN114817209 A CN 114817209A
Authority
CN
China
Prior art keywords
target
monitoring rule
similarity
similarity value
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210461506.7A
Other languages
Chinese (zh)
Inventor
梁婷
孙少杰
贾小茹
韩奇城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210461506.7A priority Critical patent/CN114817209A/en
Publication of CN114817209A publication Critical patent/CN114817209A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a monitoring rule processing method and device, a processor and electronic equipment, and relates to the field of financial science and technology. The method comprises the following steps: acquiring first field information of target metadata of a monitoring rule to be configured; calculating the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain a plurality of initial similarity values; taking the initial similarity value with the highest similarity value as a target similarity value, and taking a monitoring rule corresponding to the target similarity value as a preset monitoring rule; and determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule. By the method and the device, the problem that deployment of the monitoring rules is low due to the fact that deployment of the monitoring rules can only be carried out on the target data information in a manual mode in the related technology is solved.

Description

监控规则的处理方法和装置、处理器及电子设备Processing method and device, processor and electronic device for monitoring rules

技术领域technical field

本申请涉及金融科技领域,具体而言,涉及一种监控规则的处理方法和装置、处理器及电子设备。The present application relates to the field of financial technology, and in particular, to a method and apparatus for processing monitoring rules, a processor, and an electronic device.

背景技术Background technique

在大数据领域,需要对数据质量进行合理性监控。通常是对目标数据配置一些监控规则策略,以保证目标数据的质量。当目标数据符合监控规则时,则目标数据正确,进入下一步目标数据加工任务;当目标数据不符合监控规则时,则目标数据正确数据错误,停止下一步工作。而随着大数据的发展,需要对目标数据设置各类监控规则,例如,数据字段的空值率小于10%、字段枚举值个数等于2等,但是这类监控规则目前无法实现自动化配置,只能通过技术人员基于过往经验进行人工配置。In the field of big data, reasonable monitoring of data quality is required. Usually, some monitoring rules and policies are configured on the target data to ensure the quality of the target data. When the target data complies with the monitoring rules, the target data is correct, and the next step is the target data processing task; when the target data does not meet the monitoring rules, the target data is correct and the data is wrong, and the next step is stopped. With the development of big data, it is necessary to set various monitoring rules for target data, for example, the null value rate of data fields is less than 10%, the number of field enumeration values is equal to 2, etc., but such monitoring rules cannot be automatically configured at present. , can only be manually configured by technicians based on past experience.

针对相关技术中只能通过人工的方式对目标数据信息进行监控规则的部署工作,导致部署监控规则的效率比较低的问题,目前尚未提出有效的解决方案。Aiming at the problem that monitoring rules can only be deployed on target data information manually in the related art, resulting in a relatively low efficiency of deploying monitoring rules, no effective solution has been proposed yet.

发明内容SUMMARY OF THE INVENTION

本申请的主要目的在于提供一种监控规则的处理方法和装置、处理器及电子设备,以解决相关技术中只能通过人工的方式对目标数据信息进行监控规则的部署工作,导致部署监控规则的效率比较低的问题。The main purpose of the present application is to provide a monitoring rule processing method and device, a processor and an electronic device, so as to solve the problem of deploying monitoring rules for target data information in the related art only by manual means, resulting in the deployment of monitoring rules. problem of low efficiency.

为了实现上述目的,根据本申请的一个方面,提供了一种监控规则的处理方法。该方法包括:获取待配置监控规则的目标元数据的第一字段信息;计算所述第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;将相似值最高的初始相似度值作为目标相似度值,并将所述目标相似度值对应的监控规则作为预设监控规则;依据所述目标相似度值和所述预设监控规则,确定所述目标元数据的目标监控规则。In order to achieve the above object, according to an aspect of the present application, a method for processing monitoring rules is provided. The method includes: acquiring first field information of target metadata of a monitoring rule to be configured; calculating the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base, and obtaining a plurality of initial similarities degree value; take the initial similarity value with the highest similarity value as the target similarity value, and take the monitoring rule corresponding to the target similarity value as the preset monitoring rule; according to the target similarity value and the preset monitoring rule , and determine the target monitoring rule of the target metadata.

进一步地,计算所述第一字段信息与每个监控规则的第二字段信息的相似度,得到多个初始相似度值,包括:计算所述第一字段信息中的第一字段名称和所述第二字段信息中的第二字段名称的相似度,得到相似度值一;计算所述第一字段信息中的第一字段中文描述信息和所述第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;计算所述第一字段信息中的第一字段类型和所述第二字段信息的第二字段类型的相似度,得到相似度值三;将所述相似度值一,所述相似度值二和所述相似度值三输入线性回归模型中进行计算处理,输出所述初始相似度值。Further, calculating the similarity between the first field information and the second field information of each monitoring rule to obtain multiple initial similarity values, including: calculating the first field name in the first field information and the The similarity of the second field name in the second field information is obtained, and the similarity value is one; the Chinese description information of the first field in the first field information and the Chinese description information of the second field in the second field information are calculated. The similarity of the first field information and the similarity of the second field type of the second field information are calculated to obtain the similarity value three; value 1, the similarity value 2 and the similarity value 3 are input into a linear regression model for calculation processing, and the initial similarity value is output.

进一步地,计算所述第一字段信息中的第一字段名称和所述第二字段信息中的第二字段名称的相似度,得到相似度值一,包括:将所述第一字段名称按照预设规则分割为多个第一元素;将所述第二字段名称按照所述预设规则分割为多个第二元素,其中,所述第一元素的数量和所述第二元素的数量相同;计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;将最大相似度值作为每个第一元素的相似度值;计算所有第一元素的相似度值的平均值,并将所述平均值作为所述相似度值一。Further, calculating the similarity between the first field name in the first field information and the second field name in the second field information to obtain a similarity value of one, comprising: assigning the first field name according to a predetermined Suppose the rule is divided into a plurality of first elements; the second field name is divided into a plurality of second elements according to the preset rule, wherein the number of the first elements is the same as the number of the second elements; Calculate the similarity between each first element and each second element, and obtain the set of similarity values corresponding to each first element; take the maximum similarity value as the similarity value of each first element; calculate all the first elements The average value of the similarity value of an element, and the average value is taken as the similarity value one.

进一步地,计算所述第一字段信息中的第一字段类型和所述第二字段信息的第二字段类型的相似度,得到相似度值三,包括:基于字段类型的隐式转换规则,计算所述第一字段类型和所述第二字段类型的相似度,得到相似度值三。Further, calculating the similarity between the first field type in the first field information and the second field type in the second field information, to obtain similarity value three, including: based on the implicit conversion rule of the field type, calculating The similarity between the first field type and the second field type obtains a similarity value of three.

进一步地,依据所述目标相似度值和所述预设监控规则,确定所述目标元数据的目标监控规则,包括:获取所述预设监控规则的类型,其中,所述预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;若所述预设监控规则的类型为所述比例类监控规则,判断所述目标相似度值是否大于预设数值一;若所述目标相似度值大于所述预设数值一,则将所述预设监控规则确定为所述目标元数据的目标监控规则。Further, determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule includes: acquiring the type of the preset monitoring rule, wherein the value of the preset monitoring rule is The type is one of the following: a proportional monitoring rule and a threshold monitoring rule; if the type of the preset monitoring rule is the proportional monitoring rule, determine whether the target similarity value is greater than a preset value of one; if the If the target similarity value is greater than the preset value of one, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

进一步地,所述方法还包括:若所述预设监控规则的类型为所述阈值类监控规则,判断所述目标相似度值是否大于预设数值二,其中,所述预设数值二大于所述预设数值一;若所述目标相似度值大于所述预设数值二,则将所述预设监控规则确定为所述目标元数据的目标监控规则。Further, the method further includes: if the type of the preset monitoring rule is the threshold type monitoring rule, judging whether the target similarity value is greater than a preset value two, wherein the preset value two is greater than the preset value two. The preset value is one; if the target similarity value is greater than the preset value two, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

进一步地,在依据所述目标相似度值和所述预设监控规则,确定所述目标元数据的目标监控规则之后,所述方法还包括:依据所述第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对所述目标元数据部署所述目标监控规则;在对所述目标元数据部署所述目标监控规则之后,将所述目标元数据与所述目标监控规则的对应关系存储至所述监控规则库中,以更新所述监控规则库。Further, after determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule, the method further includes: according to the first database name in the first field information , the first data table name and the first field name, the target monitoring rule is deployed to the target metadata; after the target monitoring rule is deployed to the target metadata, the target metadata and the target The corresponding relationship of the monitoring rules is stored in the monitoring rule base to update the monitoring rule base.

为了实现上述目的,根据本申请的另一方面,提供了一种监控规则的处理装置。该装置包括:获取单元,用于获取待配置监控规则的目标元数据的第一字段信息;计算单元,用于计算所述第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;选择单元,用于将相似值最高的初始相似度值作为目标相似度值,并将所述目标相似度值对应的监控规则作为预设监控规则;第一确定单元,用于依据所述目标相似度值和所述预设监控规则,确定所述目标元数据的目标监控规则。In order to achieve the above object, according to another aspect of the present application, a processing device for monitoring rules is provided. The device includes: an acquiring unit for acquiring first field information of target metadata of a monitoring rule to be configured; a calculating unit for calculating the first field information and the second field of each monitoring rule in the monitoring rule base The similarity of the information, to obtain a plurality of initial similarity values; the selection unit is used to take the initial similarity value with the highest similarity value as the target similarity value, and the monitoring rule corresponding to the target similarity value as the preset monitoring rule ; a first determining unit, configured to determine a target monitoring rule for the target metadata according to the target similarity value and the preset monitoring rule.

进一步地,所述计算单元包括:第一计算子单元,用于计算所述第一字段信息中的第一字段名称和所述第二字段信息中的第二字段名称的相似度,得到相似度值一;第二计算子单元,用于计算所述第一字段信息中的第一字段中文描述信息和所述第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;第三计算子单元,用于计算所述第一字段信息中的第一字段类型和所述第二字段信息的第二字段类型的相似度,得到相似度值三;第四计算子单元,用于将所述相似度值一,所述相似度值二和所述相似度值三输入线性回归模型中进行计算处理,输出所述初始相似度值。Further, the calculation unit includes: a first calculation subunit, configured to calculate the similarity between the first field name in the first field information and the second field name in the second field information to obtain the similarity The value is one; the second calculation subunit is used to calculate the similarity between the Chinese description information of the first field in the first field information and the Chinese description information of the second field in the second field information, and obtain a similarity value of two The third calculation subunit is used to calculate the similarity of the first field type in the first field information and the second field type of the second field information to obtain similarity value three; the fourth calculation subunit, It is used for inputting the similarity value 1, the similarity value 2 and the similarity value 3 into a linear regression model for calculation processing, and outputting the initial similarity value.

进一步地,所述第一计算子单元包括:第一分割模块,用于将所述第一字段名称按照预设规则分割为多个第一元素;第二分割模块,用于将所述第二字段名称按照所述预设规则分割为多个第二元素,其中,所述第一元素的数量和所述第二元素的数量相同;第一计算模块,用于计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;选择模块,用于将最大相似度值作为每个第一元素的相似度值;第二计算模块,用于计算所有第一元素的相似度值的平均值,并将所述平均值作为所述相似度值一。Further, the first calculation subunit includes: a first division module, used to divide the first field name into a plurality of first elements according to preset rules; a second division module, used to divide the second The field name is divided into a plurality of second elements according to the preset rule, wherein the number of the first elements is the same as the number of the second elements; the first calculation module is used to calculate the difference between each first element and each The similarity between the second elements is obtained, and the set of similarity values corresponding to each first element is obtained; the selection module is used to take the maximum similarity value as the similarity value of each first element; the second calculation module is used to use for calculating the average value of the similarity values of all the first elements, and using the average value as the similarity value one.

进一步地,所述第三计算子单元包括:第三计算模块,用于基于字段类型的隐式转换规则,计算所述第一字段类型和所述第二字段类型的相似度,得到相似度值三。Further, the third calculation subunit includes: a third calculation module, configured to calculate the similarity between the first field type and the second field type based on an implicit conversion rule of the field type to obtain a similarity value three.

进一步地,所述第一确定单元包括:获取子单元,用于获取所述预设监控规则的类型,其中,所述预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;判断子单元,用于若所述预设监控规则的类型为所述比例类监控规则,判断所述目标相似度值是否大于预设数值一;确定子单元,用于若所述目标相似度值大于所述预设数值一,则将所述预设监控规则确定为所述目标元数据的目标监控规则。Further, the first determining unit includes: an acquiring subunit, configured to acquire the type of the preset monitoring rule, wherein the type of the preset monitoring rule is one of the following: a proportional monitoring rule and a threshold monitoring rule; a judging subunit, used for judging whether the target similarity value is greater than a preset value one if the type of the preset monitoring rule is the proportional monitoring rule; a determining subunit, used for if the target is similar If the degree value is greater than the preset value of one, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

进一步地,所述装置还包括:判断单元,用于若所述预设监控规则的类型为所述阈值类监控规则,判断所述目标相似度值是否大于预设数值二,其中,所述预设数值二大于所述预设数值一;第二确定单元,用于若所述目标相似度值大于所述预设数值二,则将所述预设监控规则确定为所述目标元数据的目标监控规则。Further, the device further includes: a judging unit, configured to judge whether the target similarity value is greater than a preset value of two if the type of the preset monitoring rule is the threshold type monitoring rule, wherein the preset monitoring rule is Set the value of two to be greater than the preset value of one; the second determination unit is configured to determine the preset monitoring rule as the target of the target metadata if the target similarity value is greater than the preset value of two Monitoring rules.

进一步地,所述装置还包括:部署单元,用于在依据所述目标相似度值和所述预设监控规则,确定所述目标元数据的目标监控规则之后,依据所述第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对所述目标元数据部署所述目标监控规则;更新单元,用于在对所述目标元数据部署所述目标监控规则之后,将所述目标元数据与所述目标监控规则的对应关系存储至所述监控规则库中,以更新所述监控规则库。Further, the apparatus further includes: a deployment unit, configured to, after determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule, according to the first field information The name of the first database, the name of the first data table and the name of the first field are used to deploy the target monitoring rules to the target metadata; the updating unit is used to deploy the target monitoring rules to the target metadata, The corresponding relationship between the target metadata and the target monitoring rule is stored in the monitoring rule base, so as to update the monitoring rule base.

为了实现上述目的,根据本申请的一个方面,提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行上述任意一项所述的监控规则的处理方法。In order to achieve the above object, according to an aspect of the present application, a processor is provided, and the processor is used for running a program, wherein when the program runs, the processing method of any one of the monitoring rules described above is executed.

为了实现上述目的,根据本申请的一个方面,提供了一种电子设备,电子设备包括一个或多个处理器和存储器,存储器用于存储一个或多个处理器实现上述任意一项的监控规则的处理方法。In order to achieve the above object, according to an aspect of the present application, an electronic device is provided, the electronic device includes one or more processors and a memory, and the memory is used to store the information of the one or more processors implementing the monitoring rules of any one of the above. Approach.

通过本申请,采用以下步骤:获取待配置监控规则的目标元数据的第一字段信息;计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则;依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,解决了相关技术中只能通过人工的方式对目标数据信息进行监控规则的部署工作,导致部署监控规则的效率比较低的问题。通过计算目标元数据的第一字段信息与每个监控规则的第二字段信息的相似度,选取最高相似度值对应的预设监控规则,来实现对目标元数据部署监控规则的工作,进而达到了提高部署监控规则的效率的效果。Through the present application, the following steps are adopted: obtaining the first field information of the target metadata of the monitoring rule to be configured; calculating the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base, and obtaining a plurality of Initial similarity value; take the initial similarity value with the highest similarity value as the target similarity value, and take the monitoring rule corresponding to the target similarity value as the preset monitoring rule; determine the target element according to the target similarity value and the preset monitoring rule The target monitoring rule for data solves the problem that the monitoring rules can only be deployed manually for target data information in the related art, resulting in a relatively low efficiency of deploying monitoring rules. By calculating the similarity between the first field information of the target metadata and the second field information of each monitoring rule, and selecting the preset monitoring rule corresponding to the highest similarity value, the work of deploying monitoring rules on the target metadata is realized, and then the It has the effect of improving the efficiency of deploying monitoring rules.

附图说明Description of drawings

构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The accompanying drawings constituting a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:

图1是根据本申请实施例提供的监控规则的处理方法的流程图;1 is a flowchart of a method for processing monitoring rules provided according to an embodiment of the present application;

图2是根据本申请实施例提供的可选的监控规则的处理方法的流程图;2 is a flowchart of an optional monitoring rule processing method provided according to an embodiment of the present application;

图3是根据本申请实施例提供的监控规则的处理装置的示意图;3 is a schematic diagram of a processing device for monitoring rules provided according to an embodiment of the present application;

图4是根据本申请实施例提供的电子设备的示意图。FIG. 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application.

具体实施方式Detailed ways

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances for the embodiments of the application described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

下面结合优选的实施步骤对本发明进行说明,图1是根据本申请实施例提供的监控规则的处理方法的流程图,如图1所示,该方法包括如下步骤:The present invention will be described below with reference to the preferred implementation steps. FIG. 1 is a flowchart of a method for processing monitoring rules provided according to an embodiment of the present application. As shown in FIG. 1 , the method includes the following steps:

步骤S101,获取待配置监控规则的目标元数据的第一字段信息。Step S101: Obtain first field information of target metadata of the monitoring rule to be configured.

具体地,在监控规则库中,包括多个监控规则和每个监控规则与其监控元数据的对应关系。那么通过监控规则库中可以确定没有配置监控规则的元数据,即上述目标元数据。然后获取目标元数据的第一字段信息,第一字段信息中至少包括数据库名称、数据表名称、字段名称、字段中文描述信息和字段类型等信息。Specifically, the monitoring rule base includes a plurality of monitoring rules and the corresponding relationship between each monitoring rule and its monitoring metadata. Then, through the monitoring rule base, it can be determined that the metadata for which the monitoring rule is not configured, that is, the above-mentioned target metadata. Then, the first field information of the target metadata is obtained, and the first field information at least includes information such as database name, data table name, field name, field Chinese description information, and field type.

步骤S102,计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值。Step S102: Calculate the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain a plurality of initial similarity values.

具体地,每个监控规则包括数据库名称、数据表名称、字段名称、字段中文描述信息、字段类型、监控规则类型和监控规则算法等信息,即上述第二字段信息。计算第一字段信息与每个监控规则的第二字段信息的相似度,得到多个初始相似度值。Specifically, each monitoring rule includes information such as database name, data table name, field name, field Chinese description information, field type, monitoring rule type and monitoring rule algorithm, that is, the above-mentioned second field information. Calculate the similarity between the first field information and the second field information of each monitoring rule to obtain a plurality of initial similarity values.

步骤S103,将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则。Step S103, taking the initial similarity value with the highest similarity value as the target similarity value, and taking the monitoring rule corresponding to the target similarity value as the preset monitoring rule.

具体地,从所述多个初始相似度值中选取相似度值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则。Specifically, the initial similarity value with the highest similarity value is selected from the plurality of initial similarity values as the target similarity value, and the monitoring rule corresponding to the target similarity value is used as the preset monitoring rule.

步骤S104,依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则。Step S104: Determine the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule.

综上所述,通过计算目标元数据的第一字段信息与每个监控规则的第二字段信息的相似度,选取最高相似度值对应的预设监控规则,来实现对目标元数据部署监控规则的工作,避免人工部署监控规则,提高了部署监控规则的效率。To sum up, by calculating the similarity between the first field information of the target metadata and the second field information of each monitoring rule, and selecting the preset monitoring rule corresponding to the highest similarity value, the monitoring rules are deployed on the target metadata. It avoids manual deployment of monitoring rules and improves the efficiency of deploying monitoring rules.

可选地,在本申请实施例提供的监控规则的处理方法中,计算第一字段信息与每个监控规则的第二字段信息的相似度,得到多个初始相似度值,包括:计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一;计算第一字段信息中的第一字段中文描述信息和第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三;将相似度值一,相似度值二和相似度值三输入线性回归模型中进行计算处理,输出初始相似度值。Optionally, in the monitoring rule processing method provided in the embodiment of the present application, calculating the similarity between the first field information and the second field information of each monitoring rule to obtain a plurality of initial similarity values, including: calculating the first field information. The similarity between the first field name in the field information and the second field name in the second field information is obtained, and the similarity value is one; calculate the Chinese description information of the first field in the first field information and the first field in the second field information. The similarity of the Chinese description information of the two fields is obtained, and the similarity value 2 is obtained; the similarity between the first field type in the first field information and the second field type of the second field information is calculated, and the similarity value 3 is obtained; First, the similarity value two and the similarity value three are input into the linear regression model for calculation processing, and the initial similarity value is output.

具体地,分别计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,第一字段信息中的第一字段中文描述信息和第二字段信息中的第二字段中文描述信息的相似度,第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值一,相似度值二和相似度值三。通过线性回归模型计算得到初始相似度值。其中线性回归模型可以采用下述公式计算得到初始相似度值:初始相似度值=0.4*相似度值一+0.3*相似度值二+0.3*相似度值三。Specifically, the similarity between the first field name in the first field information and the second field name in the second field information is calculated respectively, the Chinese description information of the first field in the first field information and the first field name in the second field information are calculated respectively. The similarity of the two-field Chinese description information, the similarity of the first field type in the first field information and the similarity of the second field type of the second field information, the similarity value one, the similarity value two and the similarity value three are obtained. The initial similarity value is calculated by linear regression model. The linear regression model can use the following formula to calculate the initial similarity value: initial similarity value=0.4*similarity value one+0.3*similarity value two+0.3*similarity value three.

通过上述步骤,计算字段名称,字段中文描述信息和字段类型的相似度,能够有效提高确定目标元数据的监控规则的准确性。Through the above steps, the similarity of the field name, the Chinese description information of the field and the field type is calculated, which can effectively improve the accuracy of the monitoring rules for determining the target metadata.

可选地,在本申请实施例提供的监控规则的处理方法中,计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一,包括:将第一字段名称按照预设规则分割为多个第一元素;将第二字段名称按照预设规则分割为多个第二元素,其中,第一元素的数量和第二元素的数量相同;计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;将最大相似度值作为每个第一元素的相似度值;计算所有第一元素的相似度值的平均值,并将平均值作为相似度值一。Optionally, in the method for processing monitoring rules provided in the embodiment of the present application, the similarity between the first field name in the first field information and the second field name in the second field information is calculated to obtain a similarity value of one, Including: dividing the first field name into multiple first elements according to preset rules; dividing the second field name into multiple second elements according to preset rules, wherein the number of first elements is the same as the number of second elements ; Calculate the similarity between each first element and each second element, and obtain the set of similarity values corresponding to each first element; take the maximum similarity value as the similarity value of each first element; calculate all The average value of the similarity value of the first element, and the average value is taken as the similarity value one.

具体地,大数据开发对字段名称的命名规则一般为:修饰词_原子指标_时间窗口,例如,最近1年交易笔数的命名为“trade_cnt_1y”;当对于多个修饰词时,顺序则由数据开发人员自行定义,例如,最近1年某一支付平台渠道流出他行交易笔数,则可命名为“zfb_out_th_cnt_1y”,也可以命名为“zfb_th_out_cnt_1y”。Specifically, the naming rules for field names in big data development are generally: modifier_atomic indicator_time window, for example, the number of transactions in the last year is named "trade_cnt_1y"; when there are multiple modifiers, the order is given by Data developers can define by themselves. For example, the number of transactions flowing out of a certain payment platform channel in the last year can be named "zfb_out_th_cnt_1y" or "zfb_th_out_cnt_1y".

假设第一字段名称为“zfb_out_th_cnt_1y”,第二字段名称为“zfb_th_out_cnt_1y”那么计算相似度值一的步骤为:Assuming the name of the first field is "zfb_out_th_cnt_1y" and the name of the second field is "zfb_th_out_cnt_1y", then the steps for calculating similarity value one are:

步骤一:按照“_”作为分隔符,对第一字段名称和第二字段名称进行分割,对应得出第一元素和第二元素;例如,第一元素为[zfb,out,th,cnt,1y],第二元素为[zfb,th,out,cnt,1y]。步骤二:计算每个第一元素与每个第二元素之间的相似度,并取最大相似度值;例如,计算第一元素zfb到[zfb,th,out,cnt,1y]的相似度分别是[1,0,0,0,0],取最大相似度值则为1;继续计算其它第一元素到每个第二元素相似度,均可以得到最大相似度值均为1。步骤三,计算所有第一元素的相似度值的平均值,并将平均值作为相似度值一。例如,相似度值一为(1+1+1+1+1)/5=1。通过上述步骤,可以准确计算字段名称的相似度值。Step 1: According to "_" as the separator, the first field name and the second field name are divided, and the first element and the second element are obtained correspondingly; for example, the first element is [zfb, out, th, cnt, 1y], the second element is [zfb, th, out, cnt, 1y]. Step 2: Calculate the similarity between each first element and each second element, and take the maximum similarity value; for example, calculate the similarity between the first element zfb to [zfb, th, out, cnt, 1y] They are [1, 0, 0, 0, 0] respectively, and the maximum similarity value is 1; by continuing to calculate the similarity of other first elements to each second element, the maximum similarity value can be obtained as 1. Step 3: Calculate the average value of the similarity values of all the first elements, and use the average value as the similarity value one. For example, the similarity value one is (1+1+1+1+1)/5=1. Through the above steps, the similarity value of the field name can be accurately calculated.

可选地,在本申请实施例提供的监控规则的处理方法中,计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三,包括:基于字段类型的隐式转换规则,计算第一字段类型和第二字段类型的相似度,得到相似度值三。Optionally, in the method for processing monitoring rules provided in this embodiment of the present application, the similarity between the first field type in the first field information and the second field type in the second field information is calculated to obtain a similarity value of three, including: : Calculate the similarity between the first field type and the second field type based on the implicit conversion rule of the field type, and obtain a similarity value of three.

具体地,字段类型一般分为:整型、浮点型、字符型、日期型、布尔型。基于字段类型的隐式转换规则,短数据类型可以隐式转化成长数据类型,例如,int可以自动转化为bigint,float可以转化为double等。那么在计算相似度值三时,可以认为能够隐式转换的字段类型的相似度值为0.9,不可隐式转换的字段类型的相似度值为0,字段类型相同的相似度为1。通过上述方式,可以快速得到字段类型的相似度值,进而提高部署监控规则的效率。Specifically, the field types are generally divided into: integer, floating point, character, date, and boolean. Based on the implicit conversion rules of field types, short data types can be implicitly converted to long data types. For example, int can be automatically converted to bigint, float can be converted to double, etc. Then, when calculating the similarity value 3, it can be considered that the similarity value of the field type that can be implicitly converted is 0.9, the similarity value of the field type that cannot be implicitly converted is 0, and the similarity value of the same field type is 1. In the above manner, the similarity value of the field type can be quickly obtained, thereby improving the efficiency of deploying monitoring rules.

例如,目标元数据的字段名称,字段中文描述信息和字段类型分别为“trade_cnt_1m,最近1月交易笔数,bigint”。第一监控规则中的字段名称,字段中文描述信息和字段类型分别为“trade_amt_1m,最近1月交易金额,decimal”;第二监控规则中的字段名称,字段中文描述信息和字段类型分别为“trade_cnt_1y,最近1年交易笔数,bigint”。通过上述方法,可以得到目标元数据与第一监控规则的字段名相似度为0.7778,中文描述相似度为0.75,字段类型相似度为0.9,最终相似度为0.8061。目标元数据与第二监控规则的字段名称相似度为0.8333,中文描述相似度为0.875,字段类型相似度为1,最终相似度为0.9333。选取最大的相似度值对应的监控规则作为预设监控规则,即将所述第二监控规则作为预设监控规则。For example, the field name of the target metadata, the Chinese description of the field, and the field type are "trade_cnt_1m, the number of transactions in the last 1 month, bigint". In the first monitoring rule, the field name, field description in Chinese and field type are "trade_amt_1m, transaction amount in the last month, decimal"; in the second monitoring rule, the field name, field description in Chinese and field type are "trade_cnt_1y" , the number of transactions in the last 1 year, bigint". Through the above method, it can be obtained that the similarity of the target metadata and the field name of the first monitoring rule is 0.7778, the similarity of the Chinese description is 0.75, the similarity of the field type is 0.9, and the final similarity is 0.8061. The similarity of the field name between the target metadata and the second monitoring rule is 0.8333, the similarity of the Chinese description is 0.875, the similarity of the field type is 1, and the final similarity is 0.9333. The monitoring rule corresponding to the largest similarity value is selected as the preset monitoring rule, that is, the second monitoring rule is used as the preset monitoring rule.

可选地,在本申请实施例提供的监控规则的处理方法中,依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,包括:获取预设监控规则的类型,其中,预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;若预设监控规则的类型为比例类监控规则,判断目标相似度值是否大于预设数值一;若目标相似度值大于预设数值一,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, in the method for processing monitoring rules provided in the embodiment of the present application, determining the target monitoring rules of target metadata according to the target similarity value and the preset monitoring rules includes: acquiring the type of the preset monitoring rules, wherein: The type of the preset monitoring rule is one of the following: a proportional type monitoring rule and a threshold type monitoring rule; if the type of the preset monitoring rule is a proportional type monitoring rule, it is determined whether the target similarity value is greater than the preset value of one; If the value is greater than the preset value of one, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

具体地,确定预设监控规则的类型,对于不同的类型设置不同的预设数据。监控规则的类型主要为比例类监控规则和阈值类监控规则。对于比例类监控规则,如果计算得到的目标相似度值大于0.8(上述预设数值一),则可以将该预设监控规则确定为目标元数据的目标监控规则。针对不同监控规则的类型,设置不同的判别要求,进一步提高了对目标元数据匹配监控规则的准确性。Specifically, the types of preset monitoring rules are determined, and different preset data are set for different types. The types of monitoring rules are mainly proportional monitoring rules and threshold monitoring rules. For the proportional monitoring rule, if the calculated target similarity value is greater than 0.8 (the above-mentioned preset value of one), the preset monitoring rule can be determined as the target monitoring rule of the target metadata. For different types of monitoring rules, different discrimination requirements are set, which further improves the accuracy of matching monitoring rules to target metadata.

可选地,在本申请实施例提供的监控规则的处理方法中,该方法还包括:若预设监控规则的类型为阈值类监控规则,判断目标相似度值是否大于预设数值二,其中,预设数值二大于预设数值一;若目标相似度值大于预设数值二,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, in the method for processing monitoring rules provided in the embodiment of the present application, the method further includes: if the type of the preset monitoring rule is a threshold type monitoring rule, judging whether the target similarity value is greater than a preset value of two, wherein, The preset value two is greater than the preset value one; if the target similarity value is greater than the preset value two, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

具体地,对于阈值类监控规则,如果计算得到的目标相似度值大于0.95(上述预设数值二),则可以将该预设监控规则确定为目标元数据的目标监控规则。Specifically, for the threshold type monitoring rule, if the calculated target similarity value is greater than 0.95 (the above-mentioned preset value 2), the preset monitoring rule can be determined as the target monitoring rule of the target metadata.

可选地,在本申请实施例提供的监控规则的处理方法中,在依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则之后,该方法还包括:依据第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对目标元数据部署目标监控规则;在对目标元数据部署目标监控规则之后,将目标元数据与目标监控规则的对应关系存储至监控规则库中,以更新监控规则库。Optionally, in the monitoring rule processing method provided by the embodiment of the present application, after determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule, the method further includes: according to the first field information The name of the first database, the name of the first data table and the name of the first field in the target metadata are deployed with target monitoring rules; after the target monitoring rules are deployed on the target metadata, the corresponding relationship between the target metadata and the target monitoring rules is stored. to the monitoring rule base to update the monitoring rule base.

具体地,根据第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称对目标云数据进行监控规则的部署工作。在部署完监控规则后,将目标元数据与目标监控规则的对应关系记录到监控规则库中,以便后续查询。Specifically, the monitoring rules are deployed on the target cloud data according to the first database name, the first data table name and the first field name in the first field information. After the monitoring rules are deployed, the corresponding relationship between the target metadata and the target monitoring rules is recorded in the monitoring rule base for subsequent query.

本申请实施例提供的监控规则的处理方法,通过获取待配置监控规则的目标元数据的第一字段信息;计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则;依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,解决了相关技术中只能通过人工的方式对目标数据信息进行监控规则的部署工作,导致部署监控规则的效率比较低的问题。通过计算目标元数据的第一字段信息与每个监控规则的第二字段信息的相似度,选取最高相似度值对应的预设监控规则,来实现对目标元数据部署监控规则的工作,进而达到了提高部署监控规则的效率的效果。The monitoring rule processing method provided by the embodiment of the present application is to obtain the first field information of the target metadata of the monitoring rule to be configured; calculate the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain multiple initial similarity values; take the initial similarity value with the highest similarity value as the target similarity value, and use the monitoring rule corresponding to the target similarity value as the preset monitoring rule; according to the target similarity value and the preset monitoring The rule determines the target monitoring rules of target metadata, and solves the problem that monitoring rules can only be deployed manually for target data information in the related art, resulting in low efficiency of deploying monitoring rules. By calculating the similarity between the first field information of the target metadata and the second field information of each monitoring rule, and selecting the preset monitoring rule corresponding to the highest similarity value, the work of deploying monitoring rules on the target metadata is realized, and then the It has the effect of improving the efficiency of deploying monitoring rules.

图2是根据本申请实施例提供的可选的监控规则的处理方法的流程图,第一步获取待配置监控规则的目标元数据的第一字段信息;第二步计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度值,得到目标相似度值;第三步确定目标元数据的目标监控规则;第四步部署目标监控规则并更新监控规则库。2 is a flowchart of an optional monitoring rule processing method provided according to an embodiment of the present application. The first step is to obtain first field information of target metadata of monitoring rules to be configured; the second step is to calculate the first field information and monitoring The similarity value of the second field information of each monitoring rule in the rule base is obtained to obtain the target similarity value; the third step is to determine the target monitoring rule of the target metadata; the fourth step is to deploy the target monitoring rule and update the monitoring rule base.

需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be executed in a computer system, such as a set of computer-executable instructions, and, although a logical sequence is shown in the flowcharts, in some cases, Steps shown or described may be performed in an order different from that herein.

本申请实施例还提供了一种监控规则的处理装置,需要说明的是,本申请实施例的监控规则的处理装置可以用于执行本申请实施例所提供的用于监控规则的处理方法。以下对本申请实施例提供的监控规则的处理装置进行介绍。The embodiment of the present application further provides a monitoring rule processing apparatus. It should be noted that the monitoring rule processing apparatus of the present application embodiment may be used to execute the monitoring rule processing method provided by the present application embodiment. The following describes the processing device for the monitoring rule provided by the embodiment of the present application.

图3是根据本申请实施例的监控规则的处理装置的示意图。如图3所示,该装置包括:获取单元301,计算单元302,选择单元303和第一确定单元304。FIG. 3 is a schematic diagram of an apparatus for processing monitoring rules according to an embodiment of the present application. As shown in FIG. 3 , the apparatus includes: an acquisition unit 301 , a calculation unit 302 , a selection unit 303 and a first determination unit 304 .

获取单元301,用于获取待配置监控规则的目标元数据的第一字段信息。The obtaining unit 301 is configured to obtain the first field information of the target metadata of the monitoring rule to be configured.

计算单元302,用于计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值。The calculating unit 302 is configured to calculate the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain a plurality of initial similarity values.

选择单元303,用于将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则。The selection unit 303 is configured to use the initial similarity value with the highest similarity value as the target similarity value, and use the monitoring rule corresponding to the target similarity value as the preset monitoring rule.

第一确定单元304,用于依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则。The first determining unit 304 is configured to determine the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule.

本申请实施例提供的监控规则的处理装置,通过获取单元301获取待配置监控规则的目标元数据的第一字段信息;计算单元302计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;选择单元303将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则;第一确定单元304依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,解决了相关技术中只能通过人工的方式对目标数据信息进行监控规则的部署工作,导致部署监控规则的效率比较低的问题。通过计算目标元数据的第一字段信息与每个监控规则的第二字段信息的相似度,选取最高相似度值对应的预设监控规则,来实现对目标元数据部署监控规则的工作,进而达到了提高部署监控规则的效率的效果。In the monitoring rule processing device provided by the embodiment of the present application, the acquiring unit 301 acquires the first field information of the target metadata of the monitoring rule to be configured; the calculating unit 302 calculates the difference between the first field information and each monitoring rule in the monitoring rule base. The similarity of the second field information obtains a plurality of initial similarity values; the selection unit 303 takes the initial similarity value with the highest similarity value as the target similarity value, and uses the monitoring rule corresponding to the target similarity value as the preset monitoring rule; The first determining unit 304 determines the target monitoring rules of the target metadata according to the target similarity value and the preset monitoring rules, which solves the problem that the deployment of monitoring rules for target data information can only be performed manually in the related art, resulting in deployment monitoring. The efficiency of the rules is relatively low. By calculating the similarity between the first field information of the target metadata and the second field information of each monitoring rule, and selecting the preset monitoring rule corresponding to the highest similarity value, the work of deploying monitoring rules on the target metadata is realized, and then the It has the effect of improving the efficiency of deploying monitoring rules.

可选地,在本申请实施例提供的监控规则的处理装置中,计算单元302包括:第一计算子单元,用于计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一;第二计算子单元,用于计算第一字段信息中的第一字段中文描述信息和第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;第三计算子单元,用于计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三;第四计算子单元,用于将相似度值一,相似度值二和相似度值三输入线性回归模型中进行计算处理,输出初始相似度值。Optionally, in the apparatus for processing monitoring rules provided in this embodiment of the present application, the calculation unit 302 includes: a first calculation subunit, configured to calculate the first field name in the first field information and the first field name in the second field information. The similarity of the names of the two fields is obtained to obtain a similarity value of one; the second calculation subunit is used to calculate the similarity between the Chinese description information of the first field in the first field information and the Chinese description information of the second field in the second field information. , to obtain a similarity value of two; a third calculation subunit is used to calculate the similarity between the first field type in the first field information and the second field type of the second field information, and obtain a similarity value of three; the fourth calculation subunit The unit is used to input the similarity value 1, the similarity value 2 and the similarity value 3 into the linear regression model for calculation processing, and output the initial similarity value.

可选地,在本申请实施例提供的监控规则的处理装置中,第一计算子单元包括:第一分割模块,用于将第一字段名称按照预设规则分割为多个第一元素;第二分割模块,用于将第二字段名称按照预设规则分割为多个第二元素,其中,第一元素的数量和第二元素的数量相同;第一计算模块,用于计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;选择模块,用于将最大相似度值作为每个第一元素的相似度值;第二计算模块,用于计算所有第一元素的相似度值的平均值,并将平均值作为相似度值一。Optionally, in the monitoring rule processing apparatus provided in the embodiment of the present application, the first calculation subunit includes: a first segmentation module, configured to segment the first field name into a plurality of first elements according to a preset rule; The two-division module is used to divide the second field name into a plurality of second elements according to preset rules, wherein the number of the first elements is the same as the number of the second elements; the first calculation module is used to calculate each first element The similarity between the element and each second element, the set of similarity values corresponding to each first element is obtained; the selection module is used to take the maximum similarity value as the similarity value of each first element; the second calculation The module is used to calculate the average value of the similarity values of all the first elements, and use the average value as the similarity value one.

可选地,在本申请实施例提供的监控规则的处理装置中,第三计算子单元包括:第三计算模块,用于基于字段类型的隐式转换规则,计算第一字段类型和第二字段类型的相似度,得到相似度值三。Optionally, in the monitoring rule processing apparatus provided in the embodiment of the present application, the third calculation subunit includes: a third calculation module, configured to calculate the first field type and the second field based on the implicit conversion rule of the field type. Type similarity, get a similarity value of three.

可选地,在本申请实施例提供的监控规则的处理装置中,第一确定单元304包括:获取子单元,用于获取预设监控规则的类型,其中,预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;判断子单元,用于若预设监控规则的类型为比例类监控规则,判断目标相似度值是否大于预设数值一;确定子单元,用于若目标相似度值大于预设数值一,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, in the monitoring rule processing apparatus provided in the embodiment of the present application, the first determining unit 304 includes: an obtaining subunit, configured to obtain the type of the preset monitoring rule, wherein the type of the preset monitoring rule is one of the following 1: Proportional monitoring rules and threshold monitoring rules; the judgment subunit is used to judge whether the target similarity value is greater than the preset value one if the type of the preset monitoring rule is the proportional monitoring rule; the determination subunit is used to determine if the If the target similarity value is greater than the preset value of one, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

可选地,在本申请实施例提供的监控规则的处理装置中,该装置还包括:判断单元,用于若预设监控规则的类型为阈值类监控规则,判断目标相似度值是否大于预设数值二,其中,预设数值二大于预设数值一;第二确定单元,用于若目标相似度值大于预设数值二,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, in the apparatus for processing monitoring rules provided in the embodiment of the present application, the apparatus further includes: a judgment unit, configured to judge whether the target similarity value is greater than a preset value if the type of the preset monitoring rule is a threshold type monitoring rule. A value of two, wherein the preset value of two is greater than the preset value of one; the second determination unit is configured to determine the preset monitoring rule as the target monitoring rule of the target metadata if the target similarity value is greater than the preset value of two.

可选地,在本申请实施例提供的监控规则的处理装置中,该装置还包括:部署单元,用于在依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则之后,依据第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对目标元数据部署目标监控规则;更新单元,用于在对目标元数据部署目标监控规则之后,将目标元数据与目标监控规则的对应关系存储至监控规则库中,以更新监控规则库。Optionally, in the apparatus for processing monitoring rules provided in the embodiment of the present application, the apparatus further includes: a deployment unit, configured to, after determining the target monitoring rules of the target metadata according to the target similarity value and the preset monitoring rules, According to the name of the first database, the name of the first data table and the name of the first field in the first field information, a target monitoring rule is deployed on the target metadata; the updating unit is used to update the target metadata after deploying the target monitoring rule on the target metadata. The corresponding relationship between the metadata and the target monitoring rules is stored in the monitoring rule base to update the monitoring rule base.

监控规则的处理装置包括处理器和存储器,上述获取单元301,计算单元302,选择单元303和第一确定单元304等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The processing device for monitoring rules includes a processor and a memory, the above-mentioned acquisition unit 301, the calculation unit 302, the selection unit 303 and the first determination unit 304 are all stored in the memory as program units, and the processor executes the above-mentioned program stored in the memory. unit to achieve the corresponding function.

处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来实现监控规则的确定工作。The processor includes a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more, and the determination of the monitoring rules can be realized by adjusting the kernel parameters.

存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one memory chip.

本发明实施例提供了一种处理器,处理器用于运行程序,其中,程序运行时执行监控规则的处理方法。An embodiment of the present invention provides a processor, where the processor is used to run a program, wherein a method for processing monitoring rules is executed when the program is running.

如图4所示,本发明实施例提供了一种电子设备,设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现以下步骤:获取待配置监控规则的目标元数据的第一字段信息;计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则;依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则。As shown in FIG. 4 , an embodiment of the present invention provides an electronic device. The device includes a processor, a memory, and a program stored in the memory and running on the processor. When the processor executes the program, the following steps are implemented: obtaining a to-be-configured program. The first field information of the target metadata of the monitoring rule; calculate the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base, and obtain a plurality of initial similarity values; The similarity value is used as the target similarity value, and the monitoring rule corresponding to the target similarity value is used as the preset monitoring rule; according to the target similarity value and the preset monitoring rule, the target monitoring rule of the target metadata is determined.

可选地,计算第一字段信息与每个监控规则的第二字段信息的相似度,得到多个初始相似度值,包括:计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一;计算第一字段信息中的第一字段中文描述信息和第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三;将相似度值一,相似度值二和相似度值三输入线性回归模型中进行计算处理,输出初始相似度值。Optionally, calculating the similarity between the first field information and the second field information of each monitoring rule to obtain a plurality of initial similarity values, including: calculating the first field name in the first field information and the second field information in the second field information. The similarity of the name of the second field of the ; Calculate the similarity of the first field type in the first field information and the second field type of the second field information to obtain a similarity value three; input the similarity value one, the similarity value two and the similarity value three into the linear regression The calculation process is performed in the model, and the initial similarity value is output.

可选地,计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一,包括:将第一字段名称按照预设规则分割为多个第一元素;将第二字段名称按照预设规则分割为多个第二元素,其中,第一元素的数量和第二元素的数量相同;计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;将最大相似度值作为每个第一元素的相似度值;计算所有第一元素的相似度值的平均值,并将平均值作为相似度值一。Optionally, calculating the similarity between the first field name in the first field information and the second field name in the second field information to obtain a similarity value of one, including: dividing the first field name into multiple parts according to a preset rule. a first element; divide the second field name into multiple second elements according to preset rules, wherein the number of first elements is the same as the number of second elements; calculate the difference between each first element and each second element The similarity between the first elements is obtained, and the set of similarity values corresponding to each first element is obtained; the maximum similarity value is taken as the similarity value of each first element; the average value of the similarity values of all the first elements is calculated, and the average value as the similarity value of one.

可选地,计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三,包括:基于字段类型的隐式转换规则,计算第一字段类型和第二字段类型的相似度,得到相似度值三。Optionally, calculating the similarity between the first field type in the first field information and the second field type in the second field information to obtain similarity value three, including: calculating the first field based on an implicit conversion rule of the field type. The similarity between the type and the second field type, the similarity value three is obtained.

可选地,依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,包括:获取预设监控规则的类型,其中,预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;若预设监控规则的类型为比例类监控规则,判断目标相似度值是否大于预设数值一;若目标相似度值大于预设数值一,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, according to the target similarity value and the preset monitoring rule, determining the target monitoring rule of the target metadata includes: acquiring the type of the preset monitoring rule, wherein the type of the preset monitoring rule is one of the following: proportional monitoring. Rules and threshold monitoring rules; if the type of the preset monitoring rule is a proportional monitoring rule, determine whether the target similarity value is greater than the preset value of one; if the target similarity value is greater than the preset value of one, determine the preset monitoring rule Target monitoring rules for target metadata.

可选地,该方法还包括:若预设监控规则的类型为阈值类监控规则,判断目标相似度值是否大于预设数值二,其中,预设数值二大于预设数值一;若目标相似度值大于预设数值二,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, the method further includes: if the type of the preset monitoring rule is a threshold type monitoring rule, judging whether the target similarity value is greater than a preset value of two, where the preset value of two is greater than the preset value of one; If the value is greater than the preset value of two, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

可选地,在依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则之后,该方法还包括:依据第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对目标元数据部署目标监控规则;在对目标元数据部署目标监控规则之后,将目标元数据与目标监控规则的对应关系存储至监控规则库中,以更新监控规则库。本文中的设备可以是服务器、PC、PAD、手机等。Optionally, after determining the target monitoring rules of the target metadata according to the target similarity value and the preset monitoring rules, the method further includes: according to the first database name, the first data table name and the first data table name in the first field information. A field name, deploying the target monitoring rule to the target metadata; after deploying the target monitoring rule to the target metadata, store the corresponding relationship between the target metadata and the target monitoring rule in the monitoring rule base to update the monitoring rule base. The devices in this article can be servers, PCs, PADs, mobile phones, and so on.

本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:获取待配置监控规则的目标元数据的第一字段信息;计算第一字段信息与监控规则库中的每个监控规则的第二字段信息的相似度,得到多个初始相似度值;将相似值最高的初始相似度值作为目标相似度值,并将目标相似度值对应的监控规则作为预设监控规则;依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则。The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: acquiring first field information of target metadata of a monitoring rule to be configured; calculating the first field The similarity between the information and the second field information of each monitoring rule in the monitoring rule base is obtained, and multiple initial similarity values are obtained; the initial similarity value with the highest similarity value is used as the target similarity value, and the target similarity value corresponds to The monitoring rule is used as the preset monitoring rule; according to the target similarity value and the preset monitoring rule, the target monitoring rule of the target metadata is determined.

可选地,计算第一字段信息与每个监控规则的第二字段信息的相似度,得到多个初始相似度值,包括:计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一;计算第一字段信息中的第一字段中文描述信息和第二字段信息中的第二字段中文描述信息的相似度,得到相似度值二;计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三;将相似度值一,相似度值二和相似度值三输入线性回归模型中进行计算处理,输出初始相似度值。Optionally, calculating the similarity between the first field information and the second field information of each monitoring rule to obtain a plurality of initial similarity values, including: calculating the first field name in the first field information and the second field information in the second field information. The similarity of the name of the second field of the ; Calculate the similarity of the first field type in the first field information and the second field type of the second field information to obtain a similarity value three; input the similarity value one, the similarity value two and the similarity value three into the linear regression The calculation process is performed in the model, and the initial similarity value is output.

可选地,计算第一字段信息中的第一字段名称和第二字段信息中的第二字段名称的相似度,得到相似度值一,包括:将第一字段名称按照预设规则分割为多个第一元素;将第二字段名称按照预设规则分割为多个第二元素,其中,第一元素的数量和第二元素的数量相同;计算每个第一元素与每个第二元素之间的相似度,得到每个第一元素对应的相似度值集合;将最大相似度值作为每个第一元素的相似度值;计算所有第一元素的相似度值的平均值,并将平均值作为相似度值一。Optionally, calculating the similarity between the first field name in the first field information and the second field name in the second field information to obtain a similarity value of one, including: dividing the first field name into multiple parts according to a preset rule. a first element; divide the second field name into multiple second elements according to preset rules, wherein the number of first elements is the same as the number of second elements; calculate the difference between each first element and each second element The similarity between the first elements is obtained, and the set of similarity values corresponding to each first element is obtained; the maximum similarity value is taken as the similarity value of each first element; the average value of the similarity values of all the first elements is calculated, and the average value as the similarity value of one.

可选地,计算第一字段信息中的第一字段类型和第二字段信息的第二字段类型的相似度,得到相似度值三,包括:基于字段类型的隐式转换规则,计算第一字段类型和第二字段类型的相似度,得到相似度值三。Optionally, calculating the similarity between the first field type in the first field information and the second field type in the second field information to obtain similarity value three, including: calculating the first field based on an implicit conversion rule of the field type. The similarity between the type and the second field type, the similarity value three is obtained.

可选地,依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则,包括:获取预设监控规则的类型,其中,预设监控规则的类型为以下之一:比例类监控规则和阈值类监控规则;若预设监控规则的类型为比例类监控规则,判断目标相似度值是否大于预设数值一;若目标相似度值大于预设数值一,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, according to the target similarity value and the preset monitoring rule, determining the target monitoring rule of the target metadata includes: acquiring the type of the preset monitoring rule, wherein the type of the preset monitoring rule is one of the following: proportional monitoring. Rules and threshold monitoring rules; if the type of the preset monitoring rule is a proportional monitoring rule, determine whether the target similarity value is greater than the preset value of one; if the target similarity value is greater than the preset value of one, determine the preset monitoring rule Target monitoring rules for target metadata.

可选地,该方法还包括:若预设监控规则的类型为阈值类监控规则,判断目标相似度值是否大于预设数值二,其中,预设数值二大于预设数值一;若目标相似度值大于预设数值二,则将预设监控规则确定为目标元数据的目标监控规则。Optionally, the method further includes: if the type of the preset monitoring rule is a threshold type monitoring rule, judging whether the target similarity value is greater than a preset value of two, where the preset value of two is greater than the preset value of one; If the value is greater than the preset value of two, the preset monitoring rule is determined as the target monitoring rule of the target metadata.

可选地,在依据目标相似度值和预设监控规则,确定目标元数据的目标监控规则之后,该方法还包括:依据第一字段信息中的第一数据库名称,第一数据表名称和第一字段名称,对目标元数据部署目标监控规则;在对目标元数据部署目标监控规则之后,将目标元数据与目标监控规则的对应关系存储至监控规则库中,以更新监控规则库。Optionally, after determining the target monitoring rules of the target metadata according to the target similarity value and the preset monitoring rules, the method further includes: according to the first database name, the first data table name and the first data table name in the first field information. A field name, deploying the target monitoring rule to the target metadata; after deploying the target monitoring rule to the target metadata, store the corresponding relationship between the target metadata and the target monitoring rule in the monitoring rule base to update the monitoring rule base.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture or apparatus that includes the element.

本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It will be appreciated by those skilled in the art that the embodiments of the present application may be provided as a method, a system or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are merely examples of the present application, and are not intended to limit the present application. Various modifications and variations of this application are possible for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the scope of the claims of this application.

Claims (10)

1. A method for processing a monitoring rule, comprising:
acquiring first field information of target metadata of a monitoring rule to be configured;
calculating the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain a plurality of initial similarity values;
taking the initial similarity value with the highest similarity value as a target similarity value, and taking a monitoring rule corresponding to the target similarity value as a preset monitoring rule;
and determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule.
2. The method of claim 1, wherein calculating the similarity between the first field information and the second field information of each monitoring rule to obtain a plurality of initial similarity values comprises:
calculating the similarity between the first field name in the first field information and the second field name in the second field information to obtain a similarity value I;
calculating the similarity of first field Chinese description information in the first field information and second field Chinese description information in the second field information to obtain a similarity value two;
calculating the similarity of a first field type in the first field information and a second field type of the second field information to obtain a similarity value III;
and inputting the first similarity value, the second similarity value and the third similarity value into a linear regression model for calculation processing, and outputting the initial similarity value.
3. The method of claim 2, wherein calculating the similarity between the first field name in the first field information and the second field name in the second field information to obtain a similarity value of one comprises:
dividing the first field name into a plurality of first elements according to a preset rule;
dividing the second field name into a plurality of second elements according to the preset rule, wherein the number of the first elements is the same as that of the second elements;
calculating the similarity between each first element and each second element to obtain a similarity value set corresponding to each first element;
taking the maximum similarity value as the similarity value of each first element;
and calculating the average value of the similarity values of all the first elements, and taking the average value as the similarity value one.
4. The method of claim 2, wherein calculating the similarity between the first field type in the first field information and the second field type in the second field information to obtain a similarity value of three comprises:
and calculating the similarity of the first field type and the second field type based on an implicit conversion rule of the field type to obtain a similarity value III.
5. The method of claim 1, wherein determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule comprises:
obtaining the type of the preset monitoring rule, wherein the type of the preset monitoring rule is one of the following types: a proportional class monitoring rule and a threshold class monitoring rule;
if the type of the preset monitoring rule is the proportion monitoring rule, judging whether the target similarity value is larger than a preset value one;
and if the target similarity value is greater than the preset numerical value one, determining the preset monitoring rule as the target monitoring rule of the target metadata.
6. The method of claim 5, further comprising:
if the type of the preset monitoring rule is the threshold value type monitoring rule, judging whether the target similarity value is larger than a preset value two, wherein the preset value two is larger than the preset value one;
and if the target similarity value is greater than the preset numerical value two, determining the preset monitoring rule as the target monitoring rule of the target metadata.
7. The method according to claim 1, wherein after determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule, the method further comprises:
deploying the target monitoring rule for the target metadata according to a first database name, a first data table name and a first field name in the first field information;
after the target monitoring rule is deployed on the target metadata, storing the corresponding relation between the target metadata and the target monitoring rule into the monitoring rule base so as to update the monitoring rule base.
8. A processing apparatus for monitoring rules, comprising:
the system comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring first field information of target metadata of a monitoring rule to be configured;
the calculation unit is used for calculating the similarity between the first field information and the second field information of each monitoring rule in the monitoring rule base to obtain a plurality of initial similarity values;
the selection unit is used for taking the initial similarity value with the highest similarity value as a target similarity value and taking the monitoring rule corresponding to the target similarity value as a preset monitoring rule;
and the first determining unit is used for determining the target monitoring rule of the target metadata according to the target similarity value and the preset monitoring rule.
9. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the processing method of the monitoring rule according to any one of claims 1 to 7 when running.
10. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of processing of monitoring rules of any one of claims 1 to 7.
CN202210461506.7A 2022-04-28 2022-04-28 Processing method and device, processor and electronic device for monitoring rules Pending CN114817209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210461506.7A CN114817209A (en) 2022-04-28 2022-04-28 Processing method and device, processor and electronic device for monitoring rules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210461506.7A CN114817209A (en) 2022-04-28 2022-04-28 Processing method and device, processor and electronic device for monitoring rules

Publications (1)

Publication Number Publication Date
CN114817209A true CN114817209A (en) 2022-07-29

Family

ID=82510241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210461506.7A Pending CN114817209A (en) 2022-04-28 2022-04-28 Processing method and device, processor and electronic device for monitoring rules

Country Status (1)

Country Link
CN (1) CN114817209A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541730A (en) * 2023-05-09 2023-08-04 中国工商银行股份有限公司 Determination method and device for field value and electronic equipment
CN116910496A (en) * 2023-09-14 2023-10-20 深圳市智慧城市科技发展集团有限公司 Configuration method and device of data quality monitoring rule and readable storage medium
CN117149753A (en) * 2023-08-30 2023-12-01 中电云计算技术有限公司 Data checking methods and systems

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161060A (en) * 2015-04-07 2016-11-23 腾讯科技(深圳)有限公司 Data monitoring method and device
CN106371973A (en) * 2016-08-31 2017-02-01 广州品唯软件有限公司 Data processing method, equipment and system
CN106708909A (en) * 2015-11-18 2017-05-24 阿里巴巴集团控股有限公司 Data quality detection method and apparatus
CN106919602A (en) * 2015-12-25 2017-07-04 阿里巴巴集团控股有限公司 A kind of data monitoring management method, data monitoring method and system
CN110830246A (en) * 2019-10-31 2020-02-21 北京东软望海科技有限公司 Intranet and extranet secure transmission control method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161060A (en) * 2015-04-07 2016-11-23 腾讯科技(深圳)有限公司 Data monitoring method and device
CN106708909A (en) * 2015-11-18 2017-05-24 阿里巴巴集团控股有限公司 Data quality detection method and apparatus
CN106919602A (en) * 2015-12-25 2017-07-04 阿里巴巴集团控股有限公司 A kind of data monitoring management method, data monitoring method and system
CN106371973A (en) * 2016-08-31 2017-02-01 广州品唯软件有限公司 Data processing method, equipment and system
CN110830246A (en) * 2019-10-31 2020-02-21 北京东软望海科技有限公司 Intranet and extranet secure transmission control method and device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541730A (en) * 2023-05-09 2023-08-04 中国工商银行股份有限公司 Determination method and device for field value and electronic equipment
CN116541730B (en) * 2023-05-09 2025-11-11 中国工商银行股份有限公司 Determination method and device for field value and electronic equipment
CN117149753A (en) * 2023-08-30 2023-12-01 中电云计算技术有限公司 Data checking methods and systems
CN116910496A (en) * 2023-09-14 2023-10-20 深圳市智慧城市科技发展集团有限公司 Configuration method and device of data quality monitoring rule and readable storage medium
CN116910496B (en) * 2023-09-14 2024-01-23 深圳市智慧城市科技发展集团有限公司 Configuration method and device of data quality monitoring rule and readable storage medium

Similar Documents

Publication Publication Date Title
CN114817209A (en) Processing method and device, processor and electronic device for monitoring rules
CN108959510B (en) Partition level connection method and device for distributed database
CN110659983A (en) Bank accounting data processing method and device, electronic equipment and storage medium
CN108205469B (en) A resource allocation method and server based on MapReduce
CN110060139B (en) Account processing methods and devices
CN112084269A (en) Data quality calculation method, device, storage medium and server
CN110297837B (en) Data updating method and device and data query method and device
CN109325055A (en) The screening of business association tables of data and checking method, device, electronic equipment
CN111310784A (en) Method and device for processing resource data
CN112580915A (en) Project milestone determination method and device, storage medium and electronic equipment
CN103970879A (en) Method and system for regulating storage positions of data blocks
CN112101939A (en) Node management method and system based on block chain
CN110222936B (en) Root cause positioning method and system of business scene and electronic equipment
CN109582834B (en) Data risk prediction method and device
CN111209283A (en) Data processing method and device
CN110750530A (en) Service system and data checking method thereof
CN109032766A (en) A kind of transaction methods, device and electronic equipment
WO2021169386A1 (en) Graph data processing method, apparatus and device, and medium
CN118446744B (en) Rights and interests data conversion method and system based on artificial intelligence
CN112449021B (en) A method and device for screening Internet resources
WO2021239084A1 (en) Blockchain-based commission
CN118585133A (en) Data security storage processing method and system for database server
CN105988920B (en) A kind of test cases generation method and its device based on data set
CN111967767A (en) Business risk identification method, device, equipment and medium
CN112783441B (en) A method, device, and computing device for adjusting the read and write speed limit of a virtual machine disk

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