CN115328736A - Probe deployment method, device, equipment and storage medium - Google Patents

Probe deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN115328736A
CN115328736A CN202211017013.0A CN202211017013A CN115328736A CN 115328736 A CN115328736 A CN 115328736A CN 202211017013 A CN202211017013 A CN 202211017013A CN 115328736 A CN115328736 A CN 115328736A
Authority
CN
China
Prior art keywords
expression
application program
monitoring
application
regular expressions
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
CN202211017013.0A
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.)
Beijing Bo Hongyuan Data Polytron Technologies Inc
Original Assignee
Beijing Bo Hongyuan Data Polytron Technologies Inc
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 Beijing Bo Hongyuan Data Polytron Technologies Inc filed Critical Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority to CN202211017013.0A priority Critical patent/CN115328736A/en
Publication of CN115328736A publication Critical patent/CN115328736A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a probe deployment method, a device, equipment and a storage medium, wherein the method comprises the following steps: when the application program is monitored to be started, reading and analyzing a monitoring rule character string from a local file to obtain a monitoring rule list; traversing regular expressions in the monitoring rule list, and determining a target expression matched with the application program from the regular expressions; wherein the regular expression comprises: monitoring attributes, feature names, operational characters and expression key values; and performing probe deployment on the application program according to the target expression. By the method, the labor cost for deploying the probe for the application program is saved, and the probe deployment efficiency and the probe deployment precision are improved.

Description

一种探针部署方法、装置、设备和存储介质A probe deployment method, device, equipment and storage medium

技术领域technical field

本发明实施例涉及计算机领域,尤其涉及一种探针部署方法、装置、设备和存储介质。Embodiments of the present invention relate to the field of computers, and in particular, to a probe deployment method, device, equipment, and storage medium.

背景技术Background technique

探针技术可以实现探测服务器敏感信息的脚本文件,实现对服务器上的应用程序进行监控的目的。目前为应用程序配置探针时,需要工作人员根据配置文件对不同应用程序进行探针的部署,探针部署效率低。工作人员在面对大量的服务器集群时,大量的重复性操作,容易出现探针部署错误。因此,如何提高探针部署效率和精确性,是需要解决的问题。The probe technology can realize the script file detecting the sensitive information of the server, and realize the purpose of monitoring the application program on the server. Currently, when configuring probes for applications, staff are required to deploy probes for different applications according to configuration files, and the efficiency of probe deployment is low. When staff face a large number of server clusters, a large number of repetitive operations are prone to probe deployment errors. Therefore, how to improve the efficiency and accuracy of probe deployment is a problem that needs to be solved.

发明内容Contents of the invention

本发明提供了一种探针部署方法、装置、设备和存储介质,节约了为应用程序部署探针的人工成本,提高了探针部署效率和探针部署精度。The present invention provides a probe deployment method, device, equipment and storage medium, which saves the labor cost of deploying probes for application programs, and improves the probe deployment efficiency and probe deployment accuracy.

根据本发明的一方面,提供了一种探针部署方法,包括:According to an aspect of the present invention, a probe deployment method is provided, including:

当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;When it is detected that the application starts, read and parse the monitoring rule string from the local file to obtain a list of monitoring rules;

遍历所述监控规则列表中的规则表达式,从所述规则表达式中确定与所述应用程序匹配的目标表达式;其中,所述规则表达式包括:监控属性、特征名称、操作符和表达式键值;Traverse the regular expressions in the monitoring rule list, and determine the target expression matching the application program from the regular expressions; wherein, the regular expressions include: monitoring attributes, feature names, operators and expressions type key value;

根据所述目标表达式,对所述应用程序进行探针部署。Probe deployment is performed on the application program according to the target expression.

根据本发明的另一方面,提供了一种探针部署装置,该装置包括:According to another aspect of the present invention, a probe deployment device is provided, the device comprising:

监控规则列表获取模块,用于当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;The monitoring rule list acquisition module is used to read and parse the monitoring rule string from the local file to obtain the monitoring rule list when the monitoring application starts;

目标表达式获取模块,用于遍历所述监控规则列表中的规则表达式,从所述规则表达式中确定与所述应用程序匹配的目标表达式;其中,所述规则表达式包括:监控属性、特征名称、操作符和表达式键值;A target expression acquisition module, configured to traverse the regular expressions in the monitoring rule list, and determine a target expression matching the application program from the regular expressions; wherein, the regular expressions include: monitoring attributes , feature names, operators, and expression keys;

探针部署模块,用于根据所述目标表达式,对所述应用程序进行探针部署。A probe deployment module, configured to perform probe deployment on the application program according to the target expression.

根据本发明的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present invention, an electronic device is provided, and the electronic device includes:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的探针部署方法。The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the method described in any embodiment of the present invention. Probe deployment method.

根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的探针部署方法。According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any of the embodiments of the present invention when executed. The probe deployment method.

本发明实施例的技术方案,当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式;其中,规则表达式包括:监控属性、特征名称、操作符和表达式键值;根据目标表达式,对应用程序进行探针部署。上述方案,解决了由工作人员通过修改配置文件的方式为应用程序部署探针时,导致的部署效率低,且容易出现探针部署错误的问题。实现了通过监控规则列表中的规则表达式,确定应用程序的探针部署方式,节约了为应用程序部署探针的人工成本,提高了探针部署效率和探针部署精度。In the technical solution of the embodiment of the present invention, when the application program is detected to be started, the monitoring rule string is read and parsed from the local file to obtain the monitoring rule list; the regular expressions in the monitoring rule list are traversed to determine from the regular expressions The target expression matching the application; where the regular expression includes: monitoring attributes, feature names, operators, and expression key values; according to the target expression, the application is deployed as a probe. The above solution solves the problem of low deployment efficiency and easy occurrence of probe deployment errors when staff deploy probes for application programs by modifying configuration files. By monitoring the regular expressions in the rule list, the probe deployment mode of the application is determined, which saves the labor cost of deploying probes for the application, and improves the efficiency and accuracy of probe deployment.

应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will be easily understood from the following description.

附图说明Description of drawings

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

图1为本发明实施例一提供的一种探针部署方法的流程图;FIG. 1 is a flowchart of a probe deployment method provided in Embodiment 1 of the present invention;

图2为本发明实施例二提供的一种探针部署方法的流程图;FIG. 2 is a flowchart of a probe deployment method provided in Embodiment 2 of the present invention;

图3为本发明实施例三提供的一种探针部署装置的结构示意图;FIG. 3 is a schematic structural diagram of a probe deployment device provided by Embodiment 3 of the present invention;

图4为本发明实施例四提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present invention.

具体实施方式Detailed ways

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

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

实施例一Embodiment one

图1为本发明实施例一提供了一种探针部署方法的流程图,本实施例可适用于对应用程序进行探针部署的情况。该方法可以由探针部署装置来执行,该探针部署装置可以采用硬件和/或软件的形式实现,该探针部署装置可配置于电子设备中,例如电子设备的探针部署系统中。探针部署系统包括:监控规则同步模块、驱动模块和识别模块。FIG. 1 is a flow chart of a probe deployment method provided by Embodiment 1 of the present invention, and this embodiment is applicable to the case of deploying probes to an application program. The method can be executed by a probe deployment device, which can be implemented in the form of hardware and/or software. The probe deployment device can be configured in an electronic device, such as a probe deployment system for an electronic device. The probe deployment system includes: a monitoring rule synchronization module, a driver module and an identification module.

如图1所示,该方法包括:As shown in Figure 1, the method includes:

S110、当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表。S110. When it is detected that the application is started, read and parse the monitoring rule string from the local file to obtain a list of monitoring rules.

其中,应用程序可以是探针部署系统监测的设备上启动的任意进程。本地文件是指探针部署系统的本地存储空间中用于存储监控规则字符串的文件。监控规则字符串为可以用于表征监控规则的字符串。监控规则列表是用于记录规则表达式的列表,规则表达式是用于表征监控规则信息的表达式。Wherein, the application program may be any process started on the device monitored by the probe deployment system. The local file refers to the file used to store the monitoring rule string in the local storage space of the probe deployment system. The monitoring rule string is a character string that can be used to represent a monitoring rule. The monitoring rule list is a list for recording rule expressions, and the rule expressions are expressions for representing monitoring rule information.

具体的,通过监控规则同步模块向后端服务器请求获取后端服务器存储的各应用程序所对应的监控规则信息,并将获取的监控规则信息按照规定的数据转换格式转换为监控规则字符串,并将监控规则字符串存储在本地文件中。Specifically, the monitoring rule synchronization module requests the back-end server to obtain the monitoring rule information corresponding to each application program stored in the back-end server, and converts the obtained monitoring rule information into a monitoring rule string according to the specified data conversion format, and Store monitoring rule strings in a local file.

当监测到设备启动应用程序时,为应用程序加载识别模块,通过识别模块读取本地文件中的监控规则字符串,并对监控规则字符串进行解析,获得监控规则表达式和监控规则信息,并将监控规则表达式和监控规则信息对应存储在监控规则列表中。监控规则列表如表1所示:When it is detected that the device starts the application program, the identification module is loaded for the application program, the monitoring rule string in the local file is read through the identification module, and the monitoring rule string is parsed to obtain the monitoring rule expression and monitoring rule information, and The monitoring rule expression and monitoring rule information are correspondingly stored in the monitoring rule list. The list of monitoring rules is shown in Table 1:

表1Table 1

Figure BDA0003809453600000041
Figure BDA0003809453600000041

Figure BDA0003809453600000051
Figure BDA0003809453600000051

Figure BDA0003809453600000061
Figure BDA0003809453600000061

示例性的,识别模块的加载方法可以是:通过驱动模块根据进程创建消息为应用程序添加标记;通过内核模块对添加标记的应用程序加载内核动态库,并生成内核动态库加载完成消息,将内核动态库加载完成消息发送给驱动模块;通过驱动模块在确定接收到内核动态库加载完成消息,则将加载识别模块的代码段添加到指定内核函数中;通过内核模块调用指定内核函数为应用程序加载识别模块。Exemplarily, the loading method of the recognition module may be: add a mark to the application program through the driver module according to the process creation message; load the kernel dynamic library to the marked application program through the kernel module, and generate a kernel dynamic library loading completion message, and load the kernel dynamic library The dynamic library loading completion message is sent to the driver module; after the driver module determines that the kernel dynamic library loading completion message is received, the code segment of the loading identification module is added to the specified kernel function; the specified kernel function is called by the kernel module to load the application program Identification module.

S120、遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式。S120. Traverse the regular expressions in the monitoring rule list, and determine a target expression matching the application program from the regular expressions.

其中,规则表达式包括:监控属性、特征名称、操作符和表达式键值。监控属性是指可以表征是否监控应用程序的数据。特征名称是指规则表达式对应的应用程序的名称。表达式键值是指规则表达式对应的监控规则字符串的值。操作符是指规则表达式中规定的表达式键值和应用程序所需要具备的关联关系的数据。操作符和操作符对应的说明如表2所示。Among them, the regular expressions include: monitoring attributes, feature names, operators and expression key values. Monitoring attributes are data that can characterize whether an application is monitored or not. The feature name refers to the name of the application corresponding to the regular expression. The expression key value refers to the value of the monitoring rule string corresponding to the regular expression. The operator refers to the expression key value specified in the regular expression and the data of the association relationship that the application program needs to have. Table 2 shows the description of the operators and their correspondences.

表2Table 2

Figure BDA0003809453600000071
Figure BDA0003809453600000071

Figure BDA0003809453600000081
Figure BDA0003809453600000081

具体的,提取应用程序的元数据,元数据是指用于描述数据属性的数据。遍历监控规则列表中的规则表达式,根据应用程序的元数据、规则表达式的监控属性、特征名称、操作符和表达式键值,从规则表达式中确定与应用程序匹配的目标表达式。Specifically, the metadata of the application program is extracted, and the metadata refers to data used to describe data attributes. Traverse the regular expressions in the monitoring rule list, and determine the target expression matching the application from the regular expressions according to the metadata of the application, the monitoring attributes of the regular expressions, feature names, operators, and expression key values.

S130、根据目标表达式,对应用程序进行探针部署。S130. Perform probe deployment on the application program according to the target expression.

其中,对应用程序进行探针部署包括:在应用程序中插入探针和不在应用程序中插入探针。Wherein, deploying the probe to the application program includes: inserting the probe into the application program and not inserting the probe into the application program.

具体的,根据目标表达式,确定目标表达式中规定的应用程序的程序监控规则。若程序监控规则为对应用程序进行监控,则在应用程序中插入探针;若程序监控规则为不对应用程序进行监控,则不在应用程序中插入探针。Specifically, according to the target expression, the program monitoring rules of the application specified in the target expression are determined. If the program monitoring rule is to monitor the application program, insert the probe into the application program; if the program monitoring rule is not to monitor the application program, then do not insert the probe into the application program.

示例性的,可以根据目标表达式的监控属性,对应用程序进行探针部署。具体的,可以通过如下子步骤实现:Exemplarily, the probe deployment can be performed on the application program according to the monitoring attribute of the target expression. Specifically, it can be achieved through the following sub-steps:

S1301、根据目标表达式的监控属性,确定是否对应用程序进行监控。S1301. Determine whether to monitor the application program according to the monitoring attribute of the target expression.

具体的,预先设置目标表达式的监控属性和程序监控规则之间的对应关系,根据目标表达式的监控属性,以及监控属性和程序监控规则之间的对应关系,确定是否对应用程序进行监控。Specifically, the corresponding relationship between the monitoring attribute of the target expression and the program monitoring rule is set in advance, and whether to monitor the application is determined according to the monitoring attribute of the target expression and the corresponding relationship between the monitoring attribute and the program monitoring rule.

示例性的,若目标表达式的监控属性为ENABLE,则确定对应用程序进行监控;若目标表达式的监控属性为DISABLE,则确定不对应用程序进行监控。Exemplarily, if the monitoring attribute of the target expression is ENABLE, it is determined to monitor the application program; if the monitoring attribute of the target expression is DISABLE, it is determined not to monitor the application program.

具体的,目标表达式的监控属性包括ENABLE和DISABLE,若目标表达式的监控属性为ENABLE,则程序监控规则为对应用程序进行监控;若目标表达式的监控属性为DISABLE,则程序监控规则为不对应用程序进行监控。Specifically, the monitoring attributes of the target expression include ENABLE and DISABLE. If the monitoring attribute of the target expression is ENABLE, the program monitoring rule is to monitor the application program; if the monitoring attribute of the target expression is DISABLE, the program monitoring rule is Applications are not monitored.

S1302、若是,则对应用程序进行探针部署时,在应用程序中插入探针。S1302. If yes, when deploying the probe to the application program, insert the probe into the application program.

相应的,若根据目标表达式的监控属性,确定不对应用程序进行监控,则对应用程序进行探针部署时,不在应用程序中插入探针。Correspondingly, if it is determined not to monitor the application program according to the monitoring attribute of the target expression, no probe is inserted into the application program when the probe is deployed on the application program.

可以理解的是,根据目标表达式的监控属性,确定是否对应用程序进行监控,并在需要对应用程序进行监控时,在应用程序中插入探针。可以实现自动为应用程序部署探针的技术效果,提高了探针部署效率。It can be understood that, according to the monitoring attribute of the target expression, it is determined whether to monitor the application program, and when the application program needs to be monitored, a probe is inserted into the application program. The technical effect of automatically deploying probes for application programs can be realized, and the efficiency of probe deployment is improved.

本实施例提供的技术方案,当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式;其中,规则表达式包括:监控属性、特征名称、操作符和表达式键值;根据目标表达式,对应用程序进行探针部署。上述方案,解决了由工作人员通过修改配置文件的方式为应用程序部署探针时,导致的部署效率低,且容易出现探针部署错误的问题。实现了通过监控规则列表中的规则表达式,确定应用程序的探针部署方式,节约了为应用程序部署探针的人工成本,提高了探针部署效率和探针部署精度。In the technical solution provided by this embodiment, when the application program is detected to be started, the monitoring rule string is read and parsed from the local file to obtain the monitoring rule list; the regular expressions in the monitoring rule list are traversed to determine from the regular expressions The target expression matching the application; where the regular expression includes: monitoring attributes, feature names, operators, and expression key values; according to the target expression, the application is deployed as a probe. The above solution solves the problem of low deployment efficiency and easy occurrence of probe deployment errors when staff deploy probes for application programs by modifying configuration files. By monitoring the regular expressions in the rule list, the probe deployment mode of the application is determined, which saves the labor cost of deploying probes for the application, and improves the efficiency and accuracy of probe deployment.

示例性的,在上述实施例的基础上,还可以每隔一个时间周期,获取后端服务器中更新的更新规则信息;根据更新规则信息,更新本地文件中存储的监控规则字符串。Exemplarily, on the basis of the above embodiments, it is also possible to obtain updated update rule information in the backend server every other time period; and update the monitoring rule string stored in the local file according to the update rule information.

其中,时间周期是指探针部署系统,每两次获取后端服务器中更新的更新规则信息的间隔时间。更新规则信息是指后端服务器更新的监控规则信息,后端服务器会根据应用程序的实际情况,实时更新应用程序的监控规则信息。Wherein, the time period refers to the time interval between the probe deployment system acquiring updated update rule information from the back-end server every two times. The update rule information refers to the monitoring rule information updated by the backend server, and the backend server will update the monitoring rule information of the application program in real time according to the actual situation of the application program.

具体的,根据实际需求,设置时间周期,探针部署系统每隔一个时间周期,从后端服务器中获取该时间周期内后端服务器更新的更新规则信息。将更新规则信息按照规定的数据转换格式转换为更新规则字符串,并将更新规则字符串存储在本地文件中,以更新本地文件中存储的监控规则字符串。更新规则字符串是指可以用于表征更新规则信息的字符串。Specifically, a time period is set according to actual requirements, and the probe deployment system obtains update rule information updated by the back-end server within the time period from the back-end server every other time period. The update rule information is converted into an update rule string according to a prescribed data conversion format, and the update rule string is stored in a local file, so as to update the monitoring rule string stored in the local file. The update rule character string refers to a character string that can be used to represent update rule information.

探针部署系统每隔一个时间周期,根据后端服务器中更新的更新规则信息,更新本地文件中存储的监控规则字符串,可以实现本地文件中的监控规则字符串和后端服务器中的监控信息同步更新,保证了本地文件中监控规则字符串的完整性。The probe deployment system updates the monitoring rule string stored in the local file according to the updated update rule information in the back-end server every other time period, which can realize the monitoring rule string in the local file and the monitoring information in the back-end server Synchronous update ensures the integrity of monitoring rule strings in local files.

实施例二Embodiment two

图2为本发明实施例二提供的一种探针部署方法的流程图,本实施例在上述实施例的基础上进行了优化,给出了一种遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式的优选实施方案。具体的,如图2所示,该方法包括:Fig. 2 is a flow chart of a probe deployment method provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above embodiments, and a rule expression in the traversal monitoring rule list is given, from A preferred implementation of regular expressions to determine target expressions that match the application. Specifically, as shown in Figure 2, the method includes:

S210、当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表。S210. When it is detected that the application is started, read and parse the monitoring rule string from the local file to obtain a list of monitoring rules.

S220、确定应用程序的数据特征,根据数据特征确定应用程序的元数据。S220. Determine data characteristics of the application program, and determine metadata of the application program according to the data characteristics.

其中,应用程序的数据特征包括:应用程序的特征名称和特征值。特征值是指应用程序对应特征的值。应用程序的特征名称和特征值对应的含义如表3所示:Wherein, the data feature of the application program includes: a feature name and a feature value of the application program. Characteristic value refers to the value of the corresponding characteristic of the application. The corresponding meanings of the feature names and feature values of the application are shown in Table 3:

表3table 3

Figure BDA0003809453600000111
Figure BDA0003809453600000111

Figure BDA0003809453600000121
Figure BDA0003809453600000121

Figure BDA0003809453600000131
Figure BDA0003809453600000131

Figure BDA0003809453600000141
Figure BDA0003809453600000141

具体的,根据应用程序的启动命令行、应用程序名称、配置文件内容和可执行文件,确定应用程序的数据特征,将应用程序的数据特征排列为特征列表,将特征列表作为应用程序的元数据。Specifically, determine the data characteristics of the application according to the startup command line of the application, the name of the application, the content of the configuration file, and the executable file, arrange the data characteristics of the application into a list of characteristics, and use the list of characteristics as the metadata of the application .

S230、遍历监控规则列表中的规则表达式,根据数据特征、规则表达式的特征名称、操作符和表达式键值,确定与数据特征匹配的规则表达式,并将与数据特征匹配的规则表达式作为与应用程序匹配的目标表达式。S230. Traverse the regular expression in the monitoring rule list, determine the regular expression matching the data feature according to the data feature, the feature name, operator and expression key value of the regular expression, and express the rule expression matching the data feature formula as the target expression to match against the application.

具体的,遍历监控规则列表中的规则表达式,基于规则表达式的操作符,将数据特征和规则表达式的特征名称和表达式键值进行匹配,确定与数据特征匹配的规则表达式,并将与数据特征匹配的规则表达式作为与应用程序匹配的目标表达式。Specifically, traverse the regular expressions in the monitoring rule list, match the data features with the feature names and expression key values of the regular expressions based on the operators of the regular expressions, determine the regular expressions that match the data features, and Use regular expressions that match data characteristics as target expressions that match applications.

示例性的,可以根据监控规则列表中的规则表达式、数据特征中的应用程序的应用名称和程序键值,从规则表达式中确定与应用程序匹配的目标表达式。具体的,可以通过如下子步骤实现:Exemplarily, according to the regular expression in the monitoring rule list, the application name and program key value of the application in the data feature, the target expression matching the application can be determined from the regular expression. Specifically, it can be achieved through the following sub-steps:

S2301、根据数据特征,确定应用程序的应用名称和程序键值。S2301. Determine the application name and program key value of the application program according to the data characteristics.

具体的,数据特征包括应用程序的应用名称和程序键值,因此可以直接根据数据特征,确定应用程序的应用名称和程序键值。Specifically, the data feature includes the application name and program key value of the application program, so the application name and program key value of the application program can be determined directly according to the data feature.

S2302、遍历监控规则列表中的规则表达式,将应用名称和规则表达式中的特征名称进行匹配,从特征名称中确定与应用名称一致的目标名称,并确定目标名称对应的规则表达式为候选表达式。S2302. Traversing the regular expressions in the monitoring rule list, matching the application name with the feature name in the regular expression, determining the target name consistent with the application name from the feature names, and determining the regular expression corresponding to the target name as a candidate expression.

其中,目标名称是指规则表达式中与应用名称一致的特征名称。Wherein, the target name refers to the feature name consistent with the application name in the regular expression.

具体的,遍历监控规则列表中的规则表达式,确定规则表达式中的特征名称,并将应用名称和规则表达式中的特征名称进行匹配,从特征名称中选择目标名称,将目标名称对应的规则表达式作为候选表达式。Specifically, traverse the regular expression in the monitoring rule list, determine the feature name in the regular expression, and match the application name with the feature name in the regular expression, select the target name from the feature name, and match the target name corresponding to regular expressions as candidate expressions.

S2303、根据应用程序的程序键值、候选表达式中的操作符和表达式键值,确定数据特征是否与候选表达式匹配。S2303. Determine whether the data feature matches the candidate expression according to the program key value of the application program, the operator in the candidate expression, and the expression key value.

示例性的,确定数据特征是否与候选表达式匹配的方法可以是:确定程序键值和表达式键值之间的关联关系是否符合操作符的定义,若是,则确定数据特征与候选表达式匹配成功。Exemplarily, the method for determining whether the data feature matches the candidate expression may be: determine whether the association relationship between the program key value and the expression key value conforms to the definition of the operator, and if so, determine that the data feature matches the candidate expression success.

具体的,确定应用程序的程序键值与候选表达式的表达式键值之间的关联关系是否符合候选表达式中的操作符的定义,若是,则确定数据特征与候选表达式匹配;若否,则确定数据特征与候选表达式不匹配。Specifically, determine whether the association relationship between the program key value of the application program and the expression key value of the candidate expression conforms to the definition of the operator in the candidate expression, if so, determine that the data feature matches the candidate expression; if not , it is determined that the data feature does not match the candidate expression.

例如,遍历监控规则列表中的规则表达式,若候选表达式为DISABLE,EXE_NAME,EQUALS,php-cgi,其中,EXE_NAME为目标名称,php-cgi为候选表达式的表达式键值。EQUALS为候选表达式中的操作符,表示“等于”。将应用程序的特征名称等于EXE_NAME的特征值和候选表达式的表达式键值进行匹配,若应用程序的对应特征值等于php-cgi,则数据特征与候选表达式匹配;若应用程序的对应特征值不等于php-cgi,则数据特征与候选表达式不匹配。For example, traverse the regular expressions in the monitoring rule list, if the candidate expressions are DISABLE, EXE_NAME, EQUALS, php-cgi, where EXE_NAME is the target name, and php-cgi is the expression key value of the candidate expression. EQUALS is the operator in the candidate expression, which means "equal to". Match the feature name of the application equal to the feature value of EXE_NAME and the expression key value of the candidate expression. If the corresponding feature value of the application is equal to php-cgi, the data feature matches the candidate expression; if the corresponding feature of the application If the value is not equal to php-cgi, the data feature does not match the candidate expression.

S2304、若是,则将候选表达式作为与应用程序匹配的目标表达式。S2304. If yes, use the candidate expression as the target expression matching the application program.

具体的,若数据特征与候选表达式匹配,则将候选表达式作为与应用程序匹配的目标表达式。Specifically, if the data feature matches the candidate expression, the candidate expression is used as the target expression matching the application program.

上述方案,根据数据特征中的应用名称和规则表达式中的特征名称,从规则表达式中确定候选表达式,再根据应用程序的程序键值,确定候选表达式是否可以作为目标表达式,提高了选取目标表达式的准确性。In the above scheme, according to the application name in the data feature and the feature name in the regular expression, determine the candidate expression from the regular expression, and then determine whether the candidate expression can be used as the target expression according to the program key value of the application, and improve In order to ensure the accuracy of the selected target expression.

S240、根据目标表达式,对应用程序进行探针部署。S240. Perform probe deployment on the application program according to the target expression.

本实施例的技术方案,当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;确定应用程序的元数据,并提取元数据的数据特征;遍历监控规则列表中的规则表达式,根据数据特征、规则表达式的特征名称、操作符和表达式键值,确定与数据特征匹配的规则表达式,并将与数据特征匹配的规则表达式作为与应用程序匹配的目标表达式;根据目标表达式,对应用程序进行探针部署。上述方案,根据应用程序的元数据的数据特征和规则表达式的匹配结果,从规则表达式中确定目标表达式,根据目标表达式对应用程序进行探针部署,实现了根据应用程序的元数据和监控规则列表中的规则表达式,自动对应用程序进行探针部署,节约了人工成本,同时进一步提高了探针部署的准确性。In the technical solution of this embodiment, when it is detected that the application is started, the string of monitoring rules is read and parsed from the local file to obtain a list of monitoring rules; the metadata of the application is determined, and the data characteristics of the metadata are extracted; the traversal monitoring The regular expression in the rule list, according to the data feature, the feature name of the regular expression, the operator and the expression key value, determines the regular expression that matches the data feature, and uses the regular expression that matches the data feature as an application The target expression matched by the program; according to the target expression, the probe deployment is performed on the application. In the above solution, according to the data characteristics of the metadata of the application and the matching result of the regular expression, the target expression is determined from the regular expression, and the application is deployed as a probe according to the target expression, which realizes the application based on the metadata of the application. And the regular expressions in the monitoring rule list can automatically deploy probes to the application, saving labor costs and further improving the accuracy of probe deployment.

实施例三Embodiment three

图3为本发明实施例四提供的一种探针部署装置的结构示意图。本实施例可适用于对应用程序进行探针部署的情况。如图3所示,该探针部署装置包括:监控规则列表获取模块310、目标表达式获取模块320和探针部署模块330。FIG. 3 is a schematic structural diagram of a probe deployment device provided by Embodiment 4 of the present invention. This embodiment is applicable to the situation where the probe is deployed to the application program. As shown in FIG. 3 , the probe deployment device includes: a monitoring rule list acquisition module 310 , a target expression acquisition module 320 and a probe deployment module 330 .

其中,监控规则列表获取模块310,用于当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;Wherein, the monitoring rule list obtaining module 310 is used for reading and parsing the monitoring rule character string from the local file to obtain the monitoring rule list when the monitoring application starts;

目标表达式获取模块320,用于遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式;其中,规则表达式包括:监控属性、特征名称、操作符和表达式键值;The target expression acquisition module 320 is used to traverse the regular expressions in the monitoring rule list, and determine the target expression matching the application program from the regular expressions; wherein, the regular expressions include: monitoring attributes, feature names, operators and expression key value;

探针部署模块330,用于根据目标表达式,对应用程序进行探针部署。The probe deployment module 330 is configured to perform probe deployment on the application program according to the target expression.

本实施例提供的技术方案,当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;遍历监控规则列表中的规则表达式,从规则表达式中确定与应用程序匹配的目标表达式;其中,规则表达式包括:监控属性、特征名称、操作符和表达式键值;根据目标表达式,对应用程序进行探针部署。上述方案,解决了由工作人员通过修改配置文件的方式为应用程序部署探针时,导致的部署效率低,且容易出现探针部署错误的问题。实现了通过监控规则列表中的规则表达式,确定应用程序的探针部署方式,节约了为应用程序部署探针的人工成本,提高了探针部署效率和探针部署精度。In the technical solution provided by this embodiment, when the application program is detected to be started, the monitoring rule string is read and parsed from the local file to obtain the monitoring rule list; the regular expressions in the monitoring rule list are traversed to determine from the regular expressions The target expression matching the application; where the regular expression includes: monitoring attributes, feature names, operators, and expression key values; according to the target expression, the application is deployed as a probe. The above solution solves the problem of low deployment efficiency and easy occurrence of probe deployment errors when staff deploy probes for application programs by modifying configuration files. By monitoring the regular expressions in the rule list, the probe deployment mode of the application is determined, which saves the labor cost of deploying probes for the application, and improves the efficiency and accuracy of probe deployment.

示例性的,目标表达式获取模块320包括:Exemplary, the target expression acquisition module 320 includes:

数据特征提取单元,用于确定应用程序的元数据,并提取元数据的数据特征;a data feature extraction unit configured to determine metadata of the application and extract data features of the metadata;

目标表达式确定单元,用于遍历监控规则列表中的规则表达式,根据数据特征、规则表达式的特征名称、操作符和表达式键值,确定与数据特征匹配的规则表达式,并将与数据特征匹配的规则表达式作为与应用程序匹配的目标表达式。The target expression determining unit is used to traverse the regular expressions in the monitoring rule list, determine the regular expressions matching the data features according to the data features, the feature names, operators and expression key values of the regular expressions, and combine them with The regular expression matched by the data feature is used as the target expression matched with the application.

进一步的,目标表达式确定单元具体用于:Further, the target expression determination unit is specifically used for:

根据数据特征,确定应用程序的应用名称和程序键值;Determine the application name and program key value of the application according to the data characteristics;

遍历监控规则列表中的规则表达式,将应用名称和规则表达式中的特征名称进行匹配,从特征名称中确定与应用名称一致的目标名称,并确定目标名称对应的规则表达式为候选表达式;Traverse the regular expression in the monitoring rule list, match the application name with the feature name in the regular expression, determine the target name consistent with the application name from the feature name, and determine the regular expression corresponding to the target name as a candidate expression ;

根据应用程序的程序键值、候选表达式中的操作符和表达式键值,确定数据特征是否与候选表达式匹配;Determine whether the data feature matches the candidate expression based on the program key value of the application, the operator in the candidate expression, and the expression key value;

若是,则将候选表达式作为与应用程序匹配的目标表达式。If so, the candidate expression is used as the target expression matching the application.

其中,根据应用程序的程序键值、候选表达式中的操作符和表达式键值,确定数据特征是否与候选表达式匹配,包括:Among them, according to the program key value of the application, the operator in the candidate expression, and the expression key value, determine whether the data feature matches the candidate expression, including:

确定程序键值和表达式键值之间的关联关系是否符合操作符的定义,若是,则确定数据特征与候选表达式匹配成功。It is determined whether the association relationship between the program key value and the expression key value conforms to the definition of the operator, and if so, it is determined that the data feature matches the candidate expression successfully.

示例性的,探针部署模块330包括:Exemplary, the probe deployment module 330 includes:

监控属性获取单元,用于根据目标表达式的监控属性,确定是否对应用程序进行监控;A monitoring attribute acquisition unit, configured to determine whether to monitor the application program according to the monitoring attribute of the target expression;

探针部署单元,用于若确定对应用程序进行监控,则对应用程序进行探针部署时,在应用程序中插入探针。The probe deployment unit is configured to insert a probe into the application program when the application program is determined to be monitored, when the probe deployment is performed on the application program.

示例性的,监控属性获取单元具体用于:Exemplarily, the monitoring attribute acquisition unit is specifically used for:

若目标表达式的监控属性为ENABLE,则确定对应用程序进行监控;If the monitoring attribute of the target expression is ENABLE, it is determined to monitor the application;

若目标表达式的监控属性为DISABLE,则确定不对应用程序进行监控。If the monitor attribute of the target expression is DISABLE, it is determined not to monitor the application.

本实施例提供的探针部署装置可适用于上述任意实施例提供的探针部署方法,具备相应的功能和有益效果。The probe deployment device provided in this embodiment can be applied to the probe deployment method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

实施例四Embodiment Four

图4示出了可以用来实施本发明的实施例的电子设备10的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。FIG. 4 shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the inventions described and/or claimed herein.

如图4所示,电子设备10包括至少一个处理器11,以及与至少一个处理器11通信连接的存储器,如只读存储器(ROM)12、随机访问存储器(RAM)13等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器11可以根据存储在只读存储器(ROM)12中的计算机程序或者从存储单元18加载到随机访问存储器(RAM)13中的计算机程序,来执行各种适当的动作和处理。在RAM 13中,还可存储电子设备10操作所需的各种程序和数据。处理器11、ROM 12以及RAM 13通过总线14彼此相连。输入/输出(I/O)接口15也连接至总线14。As shown in FIG. 4, the electronic device 10 includes at least one processor 11, and a memory connected in communication with the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores There is a computer program executable by at least one processor, and the processor 11 can operate according to a computer program stored in a read-only memory (ROM) 12 or loaded from a storage unit 18 into a random access memory (RAM) 13. Various appropriate actions and processes are performed. In the RAM 13, various programs and data necessary for the operation of the electronic device 10 are also stored. The processor 11 , ROM 12 , and RAM 13 are connected to each other through a bus 14 . An input/output (I/O) interface 15 is also connected to the bus 14 .

电子设备10中的多个部件连接至I/O接口15,包括:输入单元16,例如键盘、鼠标等;输出单元17,例如各种类型的显示器、扬声器等;存储单元18,例如磁盘、光盘等;以及通信单元19,例如网卡、调制解调器、无线通信收发机等。通信单元19允许电子设备10通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

处理器11可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器11的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器11执行上文所描述的各个方法和处理,例如探针部署方法。Processor 11 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes various methods and processes described above, such as the probe deployment method.

在一些实施例中,探针部署方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元18。在一些实施例中,计算机程序的部分或者全部可以经由ROM 12和/或通信单元19而被载入和/或安装到电子设备10上。当计算机程序加载到RAM 13并由处理器11执行时,可以执行上文描述的探针部署方法的一个或多个步骤。备选地,在其他实施例中,处理器11可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行探针部署方法。In some embodiments, the probe deployment method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 10 via the ROM 12 and/or the communication unit 19 . When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the probe deployment method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured in any other suitable manner (for example, by means of firmware) to execute the probe deployment method.

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.

用于实施本发明的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, so that the computer program causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented when executed by the processor. A computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

在本发明的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus or device. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。In order to provide interaction with the user, the systems and techniques described herein can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user. monitor); and a keyboard and pointing device (eg, a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business expansion in traditional physical hosts and VPS services. defect.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present invention may be executed in parallel, sequentially, or in a different order, as long as the expected result of the technical solution of the present invention can be achieved, there is no limitation herein.

上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementation methods do not constitute a limitation to the protection scope of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种探针部署方法,其特征在于,包括:1. A probe deployment method, characterized in that, comprising: 当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;When it is detected that the application starts, read and parse the monitoring rule string from the local file to obtain a list of monitoring rules; 遍历所述监控规则列表中的规则表达式,从所述规则表达式中确定与所述应用程序匹配的目标表达式;其中,所述规则表达式包括:监控属性、特征名称、操作符和表达式键值;Traverse the regular expressions in the monitoring rule list, and determine the target expression matching the application program from the regular expressions; wherein, the regular expressions include: monitoring attributes, feature names, operators and expressions type key value; 根据所述目标表达式,对所述应用程序进行探针部署。Probe deployment is performed on the application program according to the target expression. 2.根据权利要求1所述的方法,其特征在于,所述遍历所述监控规则列表中的规则表达式,从所述规则表达式中确定与所述应用程序匹配的目标表达式,包括:2. The method according to claim 1, wherein the traversing the regular expressions in the monitoring rule list, and determining the target expression matching the application program from the regular expressions comprises: 确定所述应用程序的数据特征,根据所述数据特征确定所述应用程序的元数据;determining data characteristics of the application program, and determining metadata of the application program according to the data characteristics; 遍历所述监控规则列表中的规则表达式,根据所述数据特征、所述规则表达式的特征名称、操作符和表达式键值,确定与所述数据特征匹配的规则表达式,并将与所述数据特征匹配的规则表达式作为与所述应用程序匹配的目标表达式。Traverse the regular expressions in the monitoring rule list, determine the regular expressions matching the data features according to the data features, the feature names, operators and expression key values of the regular expressions, and combine them with The regular expression matched by the data feature is used as the target expression matched with the application program. 3.根据权利要求2所述的方法,其特征在于,所述遍历所述监控规则列表中的规则表达式,根据所述数据特征、所述规则表达式的特征名称、操作符和表达式键值,确定与所述数据特征匹配的规则表达式,并将与所述数据特征匹配的规则表达式作为与所述应用程序匹配的目标表达式,包括:3. The method according to claim 2, wherein the traversal of the regular expressions in the monitoring rule list is performed according to the data feature, the feature name, the operator and the expression key of the regular expression value, determine the regular expression matching the data feature, and use the regular expression matching the data feature as the target expression matching the application program, including: 根据所述数据特征,确定所述应用程序的应用名称和程序键值;Determine the application name and program key value of the application program according to the data characteristics; 遍历所述监控规则列表中的规则表达式,将所述应用名称和所述规则表达式中的特征名称进行匹配,从所述特征名称中确定与所述应用名称一致的目标名称,并确定所述目标名称对应的规则表达式为候选表达式;Traverse the regular expressions in the monitoring rule list, match the application name with the feature names in the regular expressions, determine the target name consistent with the application name from the feature names, and determine the The regular expression corresponding to the target name is a candidate expression; 根据所述应用程序的程序键值、所述候选表达式中的操作符和表达式键值,确定所述数据特征是否与所述候选表达式匹配;determining whether the data feature matches the candidate expression according to the program key value of the application program, the operator in the candidate expression, and the expression key value; 若是,则将所述候选表达式作为与所述应用程序匹配的目标表达式。If yes, the candidate expression is used as the target expression matching the application program. 4.根据权利要求3所述的方法,其特征在于,所述根据所述应用程序的程序键值、所述候选表达式中的操作符和表达式键值,确定所述数据特征是否与所述候选表达式匹配,包括:4. The method according to claim 3, wherein, according to the program key value of the application program, the operator and the expression key value in the candidate expression, it is determined whether the data feature is consistent with the Candidate expression matches described above, including: 确定所述程序键值和所述表达式键值之间的关联关系是否符合所述操作符的定义,若是,则确定所述数据特征与所述候选表达式匹配成功。Determine whether the association relationship between the program key and the expression key conforms to the definition of the operator, and if so, determine that the data feature matches the candidate expression successfully. 5.根据权利要求1所述的方法,其特征在于,所述根据所述目标表达式,对所述应用程序进行探针部署,包括:5. The method according to claim 1, wherein said deploying probes to said application program according to said target expression comprises: 根据所述目标表达式的监控属性,确定是否对所述应用程序进行监控;Determine whether to monitor the application program according to the monitoring attribute of the target expression; 若是,则对所述应用程序进行探针部署时,在所述应用程序中插入探针。If yes, when the probe is deployed on the application, the probe is inserted into the application. 6.根据权利要求5所述的方法,其特征在于,所述根据所述目标表达式的监控属性,确定是否对所述应用程序进行监控,包括:6. The method according to claim 5, wherein the determining whether to monitor the application program according to the monitoring attribute of the target expression comprises: 若所述目标表达式的监控属性为ENABLE,则确定对所述应用程序进行监控;If the monitoring attribute of the target expression is ENABLE, it is determined to monitor the application program; 若所述目标表达式的监控属性为DISABLE,则确定不对所述应用程序进行监控。If the monitoring attribute of the target expression is DISABLE, it is determined not to monitor the application program. 7.根据权利要求1所述的方法,其特征在于,还包括:7. The method of claim 1, further comprising: 每隔一个时间周期,获取后端服务器中更新的更新规则信息;Obtain the update rule information updated in the backend server every time period; 根据所述更新规则信息,更新所述本地文件中存储的监控规则字符串。The monitoring rule string stored in the local file is updated according to the update rule information. 8.一种探针部署装置,其特征在于,包括:8. A probe deployment device, comprising: 监控规则列表获取模块,用于当监测到应用程序启动时,从本地文件中读取并解析监控规则字符串,获得监控规则列表;The monitoring rule list acquisition module is used to read and parse the monitoring rule string from the local file to obtain the monitoring rule list when the monitoring application starts; 目标表达式获取模块,用于遍历所述监控规则列表中的规则表达式,从所述规则表达式中确定与所述应用程序匹配的目标表达式;其中,所述规则表达式包括:监控属性、特征名称、操作符和表达式键值;A target expression acquisition module, configured to traverse the regular expressions in the monitoring rule list, and determine a target expression matching the application program from the regular expressions; wherein, the regular expressions include: monitoring attributes , feature names, operators, and expression keys; 探针部署模块,用于根据所述目标表达式,对所述应用程序进行探针部署。A probe deployment module, configured to perform probe deployment on the application program according to the target expression. 9.一种电子设备,其特征在于,所述电子设备包括:9. An electronic device, characterized in that the electronic device comprises: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-7中任一项所述的探针部署方法。The memory stores a computer program executable by the at least one processor, the computer program is executed by the at least one processor, so that the at least one processor can perform any one of claims 1-7 The described probe deployment method. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现权利要求1-7中任一项所述的探针部署方法。10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method described in any one of claims 1-7 when executed. Probe deployment method.
CN202211017013.0A 2022-08-22 2022-08-22 Probe deployment method, device, equipment and storage medium Pending CN115328736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211017013.0A CN115328736A (en) 2022-08-22 2022-08-22 Probe deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211017013.0A CN115328736A (en) 2022-08-22 2022-08-22 Probe deployment method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115328736A true CN115328736A (en) 2022-11-11

Family

ID=83925403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211017013.0A Pending CN115328736A (en) 2022-08-22 2022-08-22 Probe deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115328736A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115827392A (en) * 2023-02-09 2023-03-21 中国证券登记结算有限责任公司 Monitoring method, device and system for distributed system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115827392A (en) * 2023-02-09 2023-03-21 中国证券登记结算有限责任公司 Monitoring method, device and system for distributed system
CN115827392B (en) * 2023-02-09 2023-11-21 中国证券登记结算有限责任公司 Monitoring method, device and system of distributed system

Similar Documents

Publication Publication Date Title
WO2020108063A1 (en) Feature word determining method, apparatus, and server
CN112612664B (en) Electronic equipment testing method and device, electronic equipment and storage medium
EP3865996A2 (en) Method and apparatus for testing response speed of on-board equipment, device and storage medium
US12118770B2 (en) Image recognition method and apparatus, electronic device and readable storage medium
CN115598505A (en) Chip detection method, device, equipment and storage medium
US20130174136A1 (en) Detecting, Compiling, and Updating a New Locale Object in Real Time
CN115328736A (en) Probe deployment method, device, equipment and storage medium
US8769404B2 (en) Rule-based locale definition generation for a new or customized locale support
US20240403344A1 (en) Code retrieval method and apparatus based on large language model
CN114120410A (en) Method, apparatus, apparatus, medium and product for generating label information
CN115695397B (en) Communication method, device, equipment and medium based on JSON file
US20220269659A1 (en) Method, device and storage medium for deduplicating entity nodes in graph database
WO2024193001A1 (en) Upgrading method and apparatus, device, and storage medium
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
JP7349012B2 (en) Methods, devices and electronic devices for monitoring wake-up indicators
CN116820997A (en) An automatic processing method, device, electronic equipment and medium for random pop-up windows
CN114817003A (en) A test information processing method, device, equipment and storage medium
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN115665285A (en) Data processing method and device, electronic equipment and storage medium
CN114741998A (en) A chip verification system, method, electronic device and storage medium
CN114817223A (en) Service data extraction method and device, electronic equipment and storage medium
CN116303071A (en) An interface testing method, device, electronic equipment and storage medium
CN119358507A (en) Text marking method, text marking device, electronic equipment and storage medium
CN119066040A (en) Resource synchronization method, device and equipment between application programs
CN116167978A (en) A model updating method, device, electronic equipment and storage medium

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