CN116800835A - Monitoring data acquisition method, device, equipment and medium - Google Patents
Monitoring data acquisition method, device, equipment and medium Download PDFInfo
- Publication number
- CN116800835A CN116800835A CN202310778441.3A CN202310778441A CN116800835A CN 116800835 A CN116800835 A CN 116800835A CN 202310778441 A CN202310778441 A CN 202310778441A CN 116800835 A CN116800835 A CN 116800835A
- Authority
- CN
- China
- Prior art keywords
- target edge
- preset
- target
- monitoring data
- cloud
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请公开了一种监控数据采集方法、装置、设备及介质,应用于预先配置于云端节点的云端通信装置,涉及计算机领域,该方法包括:当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与目标边缘代理装置建立的长连接链路,向目标边缘代理装置发送用于获取目标边缘设备的监控数据的数据请求;接收所述目标边缘代理装置返回的所述监控数据,并通过预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。本发明能够打通边端和云端的网络隧道,使得云端能够直接和边端进行通信提升云端节点拉取边端监控数据的高效性。
This application discloses a monitoring data collection method, device, equipment and medium, applied to a cloud communication device pre-configured in a cloud node, and relates to the computer field. The method includes: when receiving preset cloud data through a preset first port Collect the target device information sent by the storage device, determine the target edge proxy device in the target edge device that uniquely corresponds to the target device information, and send the target edge proxy device to the target edge proxy device based on the long connection link established in advance with the target edge proxy device. Send a data request for obtaining monitoring data of the target edge device; receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage through the preset first port device. The present invention can open the network tunnel between the edge and the cloud, so that the cloud can directly communicate with the edge to improve the efficiency of the cloud node in pulling edge monitoring data.
Description
技术领域Technical field
本发明涉及计算机领域,特别涉及一种监控数据采集方法、装置、设备及介质。The invention relates to the field of computers, and in particular to a monitoring data collection method, device, equipment and medium.
背景技术Background technique
随着计算机技术的发展,计算机系统越来越庞大,由原来的单机处理到目前的集群处理,以及需要集成各种各样的设备,给系统的管理及运维带来很大挑战。Kubernetes(即K8s)的出现,缓解了部署升级的困难,使服务部署易于操作及管理。在kubernates集群中,分为master节点和node节点,所有节点在同一网络平面之上,能够相互通信,prometheus也可以轻松的跟各个节点进行通信,拉取节点的监控数据,但随着分布式系统的扩大,大量的计算需要在近边端完成计算,云-边-端的网络架构限制了云上组件prometheus和边缘设备进行通信,边缘设备可以直接请求云端的服务,但云端组件无法知道边端的具体地址,prometheus采用拉取的方式获取被监控设备的数据,边端的设备监控数据无法通过http直连的方式获取。With the development of computer technology, computer systems are becoming larger and larger, from the original single-machine processing to the current cluster processing, and the need to integrate various devices, which brings great challenges to the management and operation and maintenance of the system. The emergence of Kubernetes (K8s) has eased the difficulty of deployment and upgrades, making service deployment easier to operate and manage. In the kubernates cluster, it is divided into master node and node node. All nodes are on the same network plane and can communicate with each other. Prometheus can also easily communicate with each node and pull the monitoring data of the node. However, with the distributed system With the expansion, a large amount of calculations need to be completed at the near edge. The cloud-edge-end network architecture limits the communication between the cloud component prometheus and the edge device. The edge device can directly request cloud services, but the cloud component cannot know the specific details of the edge device. Address, prometheus uses pull method to obtain the data of the monitored device. The edge device monitoring data cannot be obtained through http direct connection.
目前来说,prometheus支持级联方式和pushgateway方式。级联方式是边端部署一个prometheus,采集边端数据,然后边端的prometheus将数据上报到云端prometheus服务。但是由于prometheus的组件比较庞大,边缘设备运行被级联的prometheus开销太大。或者边端将自身数据上报到prometheusserver的pushgateway上,这种方式需要改造边缘设备的监控组件,对组件改动太大。Currently, prometheus supports cascade mode and pushgateway mode. The cascading method is to deploy a prometheus on the edge, collect edge data, and then the edge prometheus reports the data to the cloud prometheus service. However, because the components of prometheus are relatively large, the cost of running cascaded prometheus on edge devices is too high. Or the edge end reports its own data to the pushgateway of prometheus server. This method requires the modification of the monitoring component of the edge device, which changes the component too much.
由上可见,在云端节点获取边缘节点的监控数据的过程中,如何提升云端节点拉取边端监控数据的高效性是本领域有待解决的问题。It can be seen from the above that in the process of the cloud node obtaining the monitoring data of the edge node, how to improve the efficiency of the cloud node in pulling the edge monitoring data is a problem to be solved in this field.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种监控数据采集方法、装置、设备及介质,能够打通边端和云端的网络隧道,使得云端能够直接和边端进行通信提升云端节点拉取边端监控数据的高效性。其具体方案如下:In view of this, the purpose of the present invention is to provide a monitoring data collection method, device, equipment and medium that can open the network tunnel between the edge and the cloud, so that the cloud can directly communicate with the edge to improve the cloud node pulling edge monitoring Data efficiency. The specific plan is as follows:
第一方面,本申请公开了一种监控数据采集方法,应用于预先配置于云端节点的云端通信装置,包括:In the first aspect, this application discloses a monitoring data collection method, which is applied to a cloud communication device pre-configured on a cloud node, including:
当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求;When the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined, and the target edge proxy device is determined based on the preset communication with the target device. The long connection link established by the edge proxy device sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device;
接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
可选的,所述当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置之前,还包括:Optionally, when the target device information sent by the preset cloud data collection and storage device is received through the preset first port, before determining the target edge agent device in the target edge device that uniquely corresponds to the target device information, Also includes:
接收目标边缘代理装置发送的包含目标边缘设备的设备信息的第一长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路;Receive a first persistent connection request containing device information of the target edge device sent by the target edge proxy device, and establish a persistent connection link between the target edge proxy device that uniquely corresponds to the target edge device;
或,接收当目标边缘代理装置检测到与所述云端通信装置的原始长链接链路断开时发送的用于与所述云端通信装置重新连接的且包含目标边缘设备的设备信息的第二长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路。Or, receive the second long link sent when the target edge proxy device detects that the original long link with the cloud communication device is disconnected for reconnection with the cloud communication device and includes the device information of the target edge device. A connection request is made, and a long connection link is established between the target edge proxy device that uniquely corresponds to the target edge device.
可选的,所述接收目标边缘代理装置发送的包含目标边缘设备的设备信息的长连接请求之后,还包括:Optionally, after receiving the long connection request containing the device information of the target edge device sent by the target edge proxy device, the method further includes:
基于所述目标边缘设备的设备信息为所述目标边缘设备注册唯一标识,并将所述目标边缘设备的唯一标识更新至预设注册设备列表中。Register a unique identifier for the target edge device based on the device information of the target edge device, and update the unique identifier of the target edge device to a preset registered device list.
可选的,所述当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,包括:Optionally, when the target device information sent by the preset cloud data collection and storage device is received through the preset first port, then determining the target edge agent device in the target edge device that uniquely corresponds to the target device information includes: :
当通过预设第一端口接收到预设云端数据采集存储装置通过所述预设第一端口访问所述预设注册设备列表,并从所述预设注册设备列表中确定并发送的目标边缘设备的唯一标识,则基于所述目标边缘设备的唯一标识确定目标边缘设备中的目标边缘代理装置。When receiving the preset cloud data collection and storage device through the preset first port, the device accesses the preset registered device list through the preset first port, and determines and sends the target edge device from the preset registered device list. The unique identifier of the target edge device is determined based on the unique identifier of the target edge device.
可选的,所述监控数据采集方法,还包括:Optionally, the monitoring data collection method also includes:
将Prometheus服务器配置为所述预设云端数据采集存储装置。Configure the Prometheus server as the preset cloud data collection and storage device.
可选的,所述接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置,包括:Optionally, receiving the monitoring data returned by the target edge proxy device and returning the monitoring data to the preset cloud data collection and storage device through the preset first port includes:
接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置,以便所述预设云端数据采集存储装置将所述监控数据保存至预设存储位置。Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port, so that the preset cloud data collection and storage device Save the monitoring data to a preset storage location.
可选的,所述基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,接收所述目标边缘代理装置返回的所述监控数据,包括:Optionally, based on the long-term connection link established with the target edge proxy device in advance, a data request for obtaining monitoring data of the target edge device is sent to the target edge proxy device, and the data request is received from the target edge proxy device. The monitoring data returned by the agent device includes:
基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,以便所述目标边缘代理装置基于所述目标边缘代理装置上的预设第二端口将所述数据请求转发至与所述目标边缘代理装置唯一对应的目标边缘监控装置后,通过所述预设第二端口接收所述目标边缘监控装置返回的监控数据。Based on the long-term connection link established with the target edge proxy device in advance, a data request for obtaining monitoring data of the target edge device is sent to the target edge proxy device, so that the target edge proxy device is based on the target After the preset second port on the edge proxy device forwards the data request to the target edge monitoring device that uniquely corresponds to the target edge proxy device, the preset second port receives the response returned by the target edge monitoring device through the preset second port. Monitor data.
第二方面,本申请公开了一种监控数据采集装置,应用于预先配置于云端节点的云端通信装置,包括:In the second aspect, this application discloses a monitoring data collection device, which is applied to a cloud communication device pre-configured on a cloud node, including:
数据请求模块,用于当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求;A data request module, configured to determine the target edge agent device in the target edge device that uniquely corresponds to the target device information when receiving the target device information sent by the preset cloud data collection and storage device through the preset first port, and Based on the long-term connection link established in advance with the target edge proxy device, send a data request for obtaining monitoring data of the target edge device to the target edge proxy device;
数据接收模块,用于接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。A data receiving module is configured to receive the monitoring data returned by the target edge agent device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
第三方面,本申请公开了一种电子设备,包括:In a third aspect, this application discloses an electronic device, including:
存储器,用于保存计算机程序;Memory, used to hold computer programs;
处理器,用于执行所述计算机程序,以实现前述的监控数据采集方法。A processor, configured to execute the computer program to implement the aforementioned monitoring data collection method.
第四方面,本申请公开了一种计算机存储介质,用于保存计算机程序;其中,所述计算机程序被处理器执行时实现前述公开的监控数据采集方法的步骤。In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein when the computer program is executed by a processor, the steps of the aforementioned disclosed monitoring data collection method are implemented.
本申请中应用于预先配置于云端节点的云端通信装置,当云端通信装置通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,然后接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。这样一来,本发明在边端和云端只能单向访问的时候,通过位于云端节点的云端通信装置与边缘设备中的边缘代理装置之间的长连接链路进行通信,这样一种通过建立长链接隧道把数据通路打开的方式,打通了云端和边端网不通下的监控数据采集问题,可以在不改动组件实现方式的情况下,通过打通网络隧道,只需简单的配置,直接获取数据,并且节省了边端的资源的利用。This application is applied to a cloud communication device pre-configured in a cloud node. When the cloud communication device receives the target device information sent by the preset cloud data collection and storage device through the preset first port, it is determined that it uniquely corresponds to the target device information. The target edge proxy device in the target edge device, and based on the long connection link established with the target edge proxy device in advance, sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device. , and then receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port. In this way, when the edge and the cloud can only have one-way access, the present invention communicates through the long connection link between the cloud communication device located at the cloud node and the edge proxy device in the edge device. Such a method is established by The long link tunnel opens the data path and solves the problem of monitoring data collection when the cloud and edge networks are not connected. By opening the network tunnel without changing the component implementation, the data can be obtained directly with simple configuration. , and save the use of edge resources.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without exerting creative efforts.
图1为本申请提供的一种监控数据采集方法流程图;Figure 1 is a flow chart of a monitoring data collection method provided by this application;
图2为本申请提供的一种具体的监控数据采集方法流程图;Figure 2 is a flow chart of a specific monitoring data collection method provided by this application;
图3为本申请提供的一种整体结构示意图;Figure 3 is a schematic diagram of the overall structure provided by this application;
图4为本申请提供的一种监控数据采集装置结构示意图;Figure 4 is a schematic structural diagram of a monitoring data collection device provided by this application;
图5为本申请提供的一种电子设备结构图。Figure 5 is a structural diagram of an electronic device provided by this application.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
现有技术中,prometheus支持级联方式和pushgateway方式。级联方式是边端部署一个prometheus,采集边端数据,然后边端的prometheus将数据上报到云端prometheus服务。但是由于prometheus的组件比较庞大,边缘设备运行被级联的prometheus开销太大。或者边端将自身数据上报到prometheusserver的pushgateway上,这种方式需要改造边缘设备的监控组件,对组件改动太大。因此在现有技术中,在云端节点获取边缘节点的监控数据的过程中,需要一种高效的方法提升云端节点拉取边端监控数据的高效性。在本申请中,能够打通边端和云端的网络隧道,使得云端能够直接和边端进行通信提升云端节点拉取边端监控数据的高效性。In the existing technology, prometheus supports cascade mode and pushgateway mode. The cascading method is to deploy a prometheus on the edge, collect edge data, and then the edge prometheus reports the data to the cloud prometheus service. However, because the components of prometheus are relatively large, the cost of running cascaded prometheus on edge devices is too high. Or the edge end reports its own data to the pushgateway of prometheus server. This method requires the modification of the monitoring component of the edge device, which changes the component too much. Therefore, in the existing technology, when the cloud node obtains the monitoring data of the edge node, an efficient method is needed to improve the efficiency of the cloud node in pulling the edge monitoring data. In this application, the network tunnel between the edge and the cloud can be opened, so that the cloud can directly communicate with the edge to improve the efficiency of the cloud node in pulling edge monitoring data.
本发明实施例公开了一种监控数据采集方法,应用于预先配置于云端节点的云端通信装置,参见图1所示,该方法包括:An embodiment of the present invention discloses a monitoring data collection method, which is applied to a cloud communication device pre-configured on a cloud node. As shown in Figure 1, the method includes:
步骤S11:当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求。Step S11: When receiving the target device information sent by the preset cloud data collection and storage device through the preset first port, determine the target edge agent device in the target edge device that uniquely corresponds to the target device information, and based on the preset The long connection link established by the target edge proxy device sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device.
本实施例中,所述云端通信装置位于云端节点上,所述目标边缘代理装置位于边缘节点上。在优选的实施方式中,所述预设云端数据采集存储装置与所述云端通信装置均位于所述云端节点上。本实施例中,预设云端数据采集存储装置能够进行监控数据的拉取与存储,云端数据采集存储装置不能采用直接拉取的方式采集边端设备的监控数据,通过调用云端通信装置的来拉取边端的监控数据。云端通信装置负责边缘代理装置的注册及建立与边缘设备的长链接,当云端数据采集装置请求边缘设备的数据的时候,能够将具体的请求转发到对应的边端的代理装置上。In this embodiment, the cloud communication device is located on a cloud node, and the target edge proxy device is located on an edge node. In a preferred implementation, both the preset cloud data collection and storage device and the cloud communication device are located on the cloud node. In this embodiment, it is preset that the cloud data collection and storage device can pull and store monitoring data. The cloud data collection and storage device cannot collect monitoring data of edge devices by directly pulling it. The cloud data collection and storage device can pull the monitoring data by calling the cloud communication device. Get monitoring data from the edge. The cloud communication device is responsible for registering the edge proxy device and establishing a long link with the edge device. When the cloud data collection device requests data from the edge device, it can forward the specific request to the corresponding edge proxy device.
具体的,本实施例中所述预设云端数据采集存储装置可以通过pull,即信息拉取的方式从云端通信装置拉取监控数据。所述云端通信装置上配置有预设第一端口,所述预设云端数据采集存储装置可以通过端口调用的方式获取监控数据。并且,所述的监控数据采集方法,还可以包括:将Prometheus服务器配置为所述预设云端数据采集存储装置。即,所述预设云端数据采集存储装置可以是Prometheus的server。Specifically, the preset cloud data collection and storage device in this embodiment can pull monitoring data from the cloud communication device through pull, that is, information pulling. The cloud communication device is configured with a preset first port, and the preset cloud data collection and storage device can obtain monitoring data through port calling. Moreover, the monitoring data collection method may also include: configuring the Prometheus server as the preset cloud data collection and storage device. That is, the preset cloud data collection and storage device may be a Prometheus server.
本实施例中,所述预设云端数据采集存储装置会通过预设第一接口向所述云端通信装置发送目标设备信息,所述预设第一接口位于云端通信装置上,所述目标设备信息用于指定所述预设云端数据采集存储装置想要拉取监控数据的目标设备。当云端通信装置接收到所述目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求。其中,可以理解的是,所述目标设备信息唯一对应所述目标边缘设备,且所述目标边缘设备中预先配置有所述目标边缘代理装置。所述云端通信装置已预先与所述目标边缘代理装置建立有长连接链路,在云端通信装置与所述目标边缘代理装置通信时,基于此长连接链路完成通信。需要指出的是,本发明中长连接链路优选为通过TCP(即Transmission Control Protocol,传输控制协议)长链接方式建立的双向通信链路。In this embodiment, the preset cloud data collection and storage device will send the target device information to the cloud communication device through the preset first interface. The preset first interface is located on the cloud communication device. The target device information Used to specify the target device from which the preset cloud data collection and storage device wants to pull monitoring data. When the cloud communication device receives the target device information, it determines the target edge agent device in the target edge device that uniquely corresponds to the target device information, and based on the long connection link previously established with the target edge agent device, Send a data request for obtaining monitoring data of the target edge device to the target edge proxy device. Wherein, it can be understood that the target device information uniquely corresponds to the target edge device, and the target edge proxy device is pre-configured in the target edge device. The cloud communication device has previously established a long connection link with the target edge proxy device. When the cloud communication device communicates with the target edge proxy device, communication is completed based on the long connection link. It should be pointed out that the long connection link in the present invention is preferably a bidirectional communication link established through a TCP (Transmission Control Protocol, Transmission Control Protocol) long link method.
本实施例中,所述当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置之前,还可以包括:接收目标边缘代理装置发送的包含目标边缘设备的设备信息的第一长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路;或,接收当目标边缘代理装置检测到与所述云端通信装置的原始长链接链路断开时发送的用于与所述云端通信装置重新连接的且包含目标边缘设备的设备信息的第二长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路。In this embodiment, when the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined. , may also include: receiving a first long connection request containing device information of the target edge device sent by the target edge proxy device, and establishing a long connection link between the target edge proxy device that uniquely corresponds to the target edge device; or , receiving a second long connection sent when the target edge proxy device detects that the original long link link with the cloud communication device is disconnected for reconnection with the cloud communication device and contains device information of the target edge device. request, and establish a long connection link between the target edge proxy device that uniquely corresponds to the target edge device.
可以理解的是,本实施例中,所述目标边缘代理装置位于边缘节点中,部署于每台边端设备上,负责主动连接云端通信装置,连接之后建立长链接,上报边缘设备的基本信息给云端通信装置。如果长链接断掉,负责重新连接。It can be understood that in this embodiment, the target edge proxy device is located in the edge node, deployed on each edge device, and is responsible for actively connecting to the cloud communication device, establishing a long link after the connection, and reporting the basic information of the edge device to Cloud communication device. If the long link is broken, it is responsible for reconnecting.
本实施例中,所述接收目标边缘代理装置发送的包含目标边缘设备的设备信息的长连接请求之后,还可以包括:基于所述目标边缘设备的设备信息为所述目标边缘设备注册唯一标识,并将所述目标边缘设备的唯一标识更新至预设注册设备列表中。In this embodiment, after receiving the long connection request containing the device information of the target edge device sent by the target edge proxy device, the method may further include: registering a unique identifier for the target edge device based on the device information of the target edge device, and updates the unique identifier of the target edge device to the preset registered device list.
本实施例中,所述当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,可以包括:当通过预设第一端口接收到预设云端数据采集存储装置通过所述预设第一端口访问所述预设注册设备列表,并从所述预设注册设备列表中确定并发送的目标边缘设备的唯一标识,则基于所述目标边缘设备的唯一标识确定目标边缘设备中的目标边缘代理装置。In this embodiment, when the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined, It may include: when receiving the preset cloud data collection and storage device through the preset first port, accessing the preset registered device list through the preset first port, and determining and sending the preset registered device list from the preset registered device list. If the unique identifier of the target edge device is determined, the target edge proxy device in the target edge device is determined based on the unique identifier of the target edge device.
也即,本发明中,各边缘代理装置会向云端通信装置发送长连接请求,以与云端通信装置建立双向通信链路。云端通信装置接收边缘代理装置的请求后,根据请求中边缘设备的信息,为边缘设备注册一个唯一id(即Identity document,唯一标识),能够识别每个边缘设备,并建立一个长TCP链接,通过此链接接收发送数据。具体的,云端通信装置会将已注册的边缘设备记录至预设注册设备列表,所述预设注册设备列表中保存有各个已注册的边缘设备与所述设备对应的唯一id。所述预设云端数据采集存储装置可以通过所述预设第一端口访问所有注册设备的预设注册设备列表,确定当前有哪些已注册设备后,向云端通信装置发送目标设备信息拉取调用设备的监控数据,此时,采集存储装置不是直接调用设备的服务,因为网络是不通的,而是调用云端通信装置的接口,将设备信息,优选的实施方式中,可以将设备id作为所述目标设备信息传入云端通信装置。That is, in the present invention, each edge proxy device sends a long connection request to the cloud communication device to establish a two-way communication link with the cloud communication device. After receiving the request from the edge proxy device, the cloud communication device registers a unique ID (i.e. Identity document, unique identification) for the edge device based on the information of the edge device in the request. It can identify each edge device and establish a long TCP link. This link receives sent data. Specifically, the cloud communication device records the registered edge devices into a preset registered device list, and the preset registered device list stores the unique ID corresponding to each registered edge device and the device. The preset cloud data collection and storage device can access the preset registered device list of all registered devices through the preset first port, and after determining which registered devices are currently there, send the target device information to the cloud communication device to pull the calling device. At this time, the collection and storage device does not directly call the service of the device because the network is blocked, but calls the interface of the cloud communication device to obtain the device information. In a preferred embodiment, the device ID can be used as the target. The device information is transmitted to the cloud communication device.
另外,本发明中,边缘代理装置初始化时还会将将自身的信息发送给云端通信装置。In addition, in the present invention, the edge agent device will also send its own information to the cloud communication device when initializing.
步骤S12:接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。Step S12: Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
本实施例中,所述接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置,可以包括:接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置,以便所述预设云端数据采集存储装置将所述监控数据保存至预设存储位置。In this embodiment, receiving the monitoring data returned by the target edge proxy device and returning the monitoring data to the preset cloud data collection and storage device through the preset first port may include: Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port, so that the preset cloud data collection and storage device Save the monitoring data to a preset storage location.
也即,本发明中,所述预设云端数据采集存储装置还具备监控数据存储的功能,当从云端通信装置拉取到监控数据时,可以将所述监控数据进行存储。可以理解的是,将本发明中的方法应用至Prometheus中时,Prometheus中的云端节点便可高效地获取到边端的监控数据,且整个过程中只需简单的配置,节省了边端的资源的利用。That is to say, in the present invention, the preset cloud data collection and storage device also has the function of monitoring data storage. When the monitoring data is pulled from the cloud communication device, the monitoring data can be stored. It can be understood that when the method in the present invention is applied to Prometheus, the cloud node in Prometheus can efficiently obtain the monitoring data of the edge, and the entire process only requires simple configuration, saving the use of edge resources. .
本实施例中应用于预先配置于云端节点的云端通信装置,当云端通信装置通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,然后接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。这样一来,本发明在边端和云端只能单向访问的时候,通过位于云端节点的云端通信装置与边缘设备中的边缘代理装置之间的长连接链路进行通信,这样一种通过建立长链接隧道把数据通路打开的方式,打通了云端和边端网不通下的监控数据采集问题,可以在不改动组件实现方式的情况下,通过打通网络隧道,只需简单的配置,直接获取数据,并且节省了边端的资源的利用。This embodiment is applied to a cloud communication device pre-configured in a cloud node. When the cloud communication device receives the target device information sent by the preset cloud data collection and storage device through the preset first port, it is determined to be unique to the target device information. The target edge agent device in the corresponding target edge device, and based on the long connection link established in advance with the target edge agent device, sends data for obtaining the monitoring data of the target edge device to the target edge agent device. request, and then receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port. In this way, when the edge and the cloud can only have one-way access, the present invention communicates through the long connection link between the cloud communication device located at the cloud node and the edge proxy device in the edge device. Such a method is established by The long link tunnel opens the data path and solves the problem of monitoring data collection when the cloud and edge networks are not connected. By opening the network tunnel without changing the component implementation, the data can be obtained directly with simple configuration. , and save the use of edge resources.
图2为本申请实施例提供的一种具体的监控数据采集方法流程图。参见图2所示,该方法包括:Figure 2 is a flow chart of a specific monitoring data collection method provided by an embodiment of the present application. As shown in Figure 2, the method includes:
步骤S21:当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置。Step S21: When the target device information sent by the preset cloud data collection and storage device is received through the preset first port, determine the target edge agent device in the target edge device that uniquely corresponds to the target device information.
其中,关于步骤S21的更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For more specific processing of step S21, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be described again here.
步骤S22:基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,以便所述目标边缘代理装置基于所述目标边缘代理装置上的预设第二端口将所述数据请求转发至与所述目标边缘代理装置唯一对应的目标边缘监控装置后,通过所述预设第二端口接收所述目标边缘监控装置返回的监控数据。Step S22: Based on the long connection link pre-established with the target edge proxy device, send a data request for obtaining monitoring data of the target edge device to the target edge proxy device, so that the target edge proxy device is based on After the preset second port on the target edge proxy device forwards the data request to the target edge monitoring device uniquely corresponding to the target edge proxy device, the target edge monitoring device is received through the preset second port. Monitoring data returned by the device.
需要指出的是,在本发明的具体实施方式中,每一边缘节点中均部署有一个边缘代理装置与一个边缘监控装置,边缘监控装置负责边缘设备的监控数据的采集,将采集到的数据通过端口提供给起对应的边缘代理装置。并且,本实施例中,所述预设云端数据采集存储装置可以通过pull,即信息拉取的方式从云端通信装置拉取监控数据,且所述边缘代理装置同样可以通过pull监控数据的方式从边缘监控装置拉取监控数据。其中,所述边缘代理装置与边缘监控装置通过端口连接,所述边缘监控装置通过预设第二端口讲过监控数据提供给边缘代理装置。It should be pointed out that in the specific implementation of the present invention, an edge agent device and an edge monitoring device are deployed in each edge node. The edge monitoring device is responsible for collecting monitoring data of edge devices and passing the collected data through The port is provided to the corresponding edge proxy device. Moreover, in this embodiment, the preset cloud data collection and storage device can pull the monitoring data from the cloud communication device through pull, that is, the information pulling method, and the edge agent device can also pull the monitoring data from the cloud communication device. The edge monitoring device pulls monitoring data. Wherein, the edge agent device and the edge monitoring device are connected through a port, and the edge monitoring device provides monitoring data to the edge agent device through a preset second port.
即在具体的实施方式中,预设云端数据采集存储装置通过预设第一接口利用信息拉取的方式从云端通信装置拉取监控数据,当所述云端通信装置通过长连接链路获取到边缘代理装置通过pull监控数据的方式从边缘监控装置拉取的监控数据,则将信息返回云端通信装置,以此便完成了预设云端数据采集存储装置拉取监控数据的全过程,预设云端数据采集存储装置便获取到了边端的监控数据。That is, in a specific implementation, the preset cloud data collection and storage device uses the information pull method to pull monitoring data from the cloud communication device through the preset first interface. When the cloud communication device obtains the edge data through a long connection link The agent device pulls the monitoring data from the edge monitoring device by pulling the monitoring data, and then returns the information to the cloud communication device. In this way, the entire process of pulling the monitoring data from the preset cloud data collection and storage device is completed. The preset cloud data The collection and storage device obtains the monitoring data of the edge.
如图3所示为本发明提出的一种整体结构示意图,图中云端数据采集存储装置与云端通信装置位于云端节点上,各个边缘节点中部署有边缘代理装置与边缘监控装置。云端通信装置与各个边缘代理装置之间建立有双向链接隧道,各个边缘代理装置分别唯一连接有一边缘监控装置。云端数据采集存储装置通过pull的方式从云端通信装置中拉取监控数据,所述边缘代理装置同样通过pull的方式从边缘监控装置中拉取边缘监控装置中监控到的监控数据。Figure 3 is a schematic diagram of the overall structure proposed by the present invention. In the figure, the cloud data collection and storage device and the cloud communication device are located on the cloud node, and an edge agent device and an edge monitoring device are deployed in each edge node. A two-way link tunnel is established between the cloud communication device and each edge proxy device, and each edge proxy device is uniquely connected to an edge monitoring device. The cloud data collection and storage device pulls the monitoring data from the cloud communication device through pull, and the edge proxy device also pulls the monitoring data monitored by the edge monitoring device from the edge monitoring device through pull.
步骤S23:通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。Step S23: Return the monitoring data to the preset cloud data collection and storage device through the preset first port.
其中,关于步骤S23的更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For more specific processing of step S23, reference may be made to the corresponding content disclosed in the foregoing embodiments, and will not be described again here.
需要指出的是,所述预设云端数据采集存储装置可以是Prometheus的server,在具体的实施方式中,边端设备主动连接云端建立长连接链路,以建立双向通信隧道,云端收集服务通过隧道获取数据,边端设备基于边缘代理装置部署代理agent,主动注册到云端通信装置之上,云端通信装置负责维护代理agent的列表,建立双线通信信道,云端数据采集存储装置不直接访问边端服务,而是访问适配层的云端通信装置,适配层负责将请求发送到各个代理agent之上,再由agent负责调用监控服务,将收集到的数据原路返回至云端通信装置,云端通信装置将数据返回至云端数据采集存储装置。将本发明中的方法应用至Prometheus中时,Prometheus中的云端节点便可获取到边端的监控数据,且整个过程中只需简单的配置,节省了边端的资源的利用。It should be pointed out that the preset cloud data collection and storage device can be a Prometheus server. In a specific implementation, the edge device actively connects to the cloud to establish a long connection link to establish a two-way communication tunnel, and the cloud collection service passes through the tunnel. To obtain data, the edge device deploys an agent agent based on the edge agent device and actively registers on the cloud communication device. The cloud communication device is responsible for maintaining the list of agent agents and establishing a two-line communication channel. The cloud data collection and storage device does not directly access the edge service. , but accesses the cloud communication device of the adaptation layer. The adaptation layer is responsible for sending requests to each agent, and then the agent is responsible for calling the monitoring service and returning the collected data to the cloud communication device. The cloud communication device Return data to the cloud data collection storage device. When the method in the present invention is applied to Prometheus, the cloud node in Prometheus can obtain the monitoring data of the edge end, and the entire process only requires simple configuration, saving the use of edge end resources.
本实施例中,当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置。基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,以便所述目标边缘代理装置基于所述目标边缘代理装置上的预设第二端口将所述数据请求转发至与所述目标边缘代理装置唯一对应的目标边缘监控装置后,通过所述预设第二端口接收所述目标边缘监控装置返回的监控数据。通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。这样一来,本发明在边端和云端只能单向访问的时候,通过位于云端节点的云端通信装置与边缘设备中的边缘代理装置之间的长连接链路进行通信,这样一种通过建立长链接隧道把数据通路打开的方式,打通了云端和边端网不通下的监控数据采集问题,可以在不改动组件实现方式的情况下,通过打通网络隧道,只需简单的配置,直接获取数据,并且节省了边端的资源的利用。其中,预设云端数据采集存储装置与云端通信装置通过端口连接,边缘代理装置与边缘监控装置也通过端口连接,提升了监控获取的高效性。In this embodiment, when the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined. Based on the long-term connection link established with the target edge proxy device in advance, a data request for obtaining monitoring data of the target edge device is sent to the target edge proxy device, so that the target edge proxy device is based on the target After the preset second port on the edge proxy device forwards the data request to the target edge monitoring device that uniquely corresponds to the target edge proxy device, the preset second port receives the response returned by the target edge monitoring device through the preset second port. Monitor data. Return the monitoring data to the preset cloud data collection and storage device through the preset first port. In this way, when the edge and the cloud can only have one-way access, the present invention communicates through the long connection link between the cloud communication device located at the cloud node and the edge proxy device in the edge device. Such a method is established by The long link tunnel opens the data path and solves the problem of monitoring data collection when the cloud and edge networks are not connected. By opening the network tunnel without changing the component implementation, the data can be obtained directly with simple configuration. , and save the use of edge resources. Among them, the preset cloud data collection and storage device and the cloud communication device are connected through a port, and the edge proxy device and the edge monitoring device are also connected through a port, which improves the efficiency of monitoring acquisition.
参见图4所示,本申请实施例公开了一种监控数据采集装置,应用于预先配置于云端节点的云端通信装置,具体可以包括:As shown in Figure 4, an embodiment of the present application discloses a monitoring data collection device, which is applied to a cloud communication device pre-configured on a cloud node. Specifically, it may include:
数据请求模块11,用于当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求;The data request module 11 is configured to determine the target edge agent device in the target edge device that uniquely corresponds to the target device information when receiving the target device information sent by the preset cloud data collection and storage device through the preset first port, And based on the long connection link established in advance with the target edge proxy device, send a data request for obtaining monitoring data of the target edge device to the target edge proxy device;
数据接收模块12,用于接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。The data receiving module 12 is configured to receive the monitoring data returned by the target edge agent device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
本申请中应用于预先配置于云端节点的云端通信装置,当云端通信装置通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,然后接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。这样一来,本发明在边端和云端只能单向访问的时候,通过位于云端节点的云端通信装置与边缘设备中的边缘代理装置之间的长连接链路进行通信,这样一种通过建立长链接隧道把数据通路打开的方式,打通了云端和边端网不通下的监控数据采集问题,可以在不改动组件实现方式的情况下,通过打通网络隧道,只需简单的配置,直接获取数据,并且节省了边端的资源的利用。This application is applied to a cloud communication device pre-configured in a cloud node. When the cloud communication device receives the target device information sent by the preset cloud data collection and storage device through the preset first port, it is determined that it uniquely corresponds to the target device information. The target edge proxy device in the target edge device, and based on the long connection link established with the target edge proxy device in advance, sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device. , and then receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port. In this way, when the edge and the cloud can only have one-way access, the present invention communicates through the long connection link between the cloud communication device located at the cloud node and the edge proxy device in the edge device. Such a method is established by The long link tunnel opens the data path and solves the problem of monitoring data collection when the cloud and edge networks are not connected. By opening the network tunnel without changing the component implementation, the data can be obtained directly with simple configuration. , and save the use of edge resources.
在一些具体实施例中,所述监控数据采集装置,还包括:In some specific embodiments, the monitoring data collection device further includes:
第一请求接收单元,用于接收目标边缘代理装置发送的包含目标边缘设备的设备信息的第一长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路;A first request receiving unit configured to receive a first long connection request containing device information of the target edge device sent by the target edge proxy device, and establish a long connection chain between the target edge proxy device that uniquely corresponds to the target edge device. road;
或,第二请求接收单元,用于接收当目标边缘代理装置检测到与所述云端通信装置的原始长链接链路断开时发送的用于与所述云端通信装置重新连接的且包含目标边缘设备的设备信息的第二长连接请求,并建立与所述目标边缘设备唯一对应的目标边缘代理装置之间的长连接链路。Or, a second request receiving unit configured to receive a request sent when the target edge proxy device detects that the original long link with the cloud communication device is disconnected and used to reconnect with the cloud communication device and includes the target edge. A second persistent connection request is made for the device information of the device, and a persistent connection link is established between the target edge proxy device that uniquely corresponds to the target edge device.
在一些具体实施例中,所述监控数据采集装置,还包括:In some specific embodiments, the monitoring data collection device further includes:
列表更新单元,用于基于所述目标边缘设备的设备信息为所述目标边缘设备注册唯一标识,并将所述目标边缘设备的唯一标识更新至预设注册设备列表中。A list update unit, configured to register a unique identifier for the target edge device based on the device information of the target edge device, and update the unique identifier of the target edge device into a preset registered device list.
在一些具体实施例中,所述数据请求模块11,具体包括:In some specific embodiments, the data request module 11 specifically includes:
装置确定单元,用于当通过预设第一端口接收到预设云端数据采集存储装置通过所述预设第一端口访问所述预设注册设备列表,并从所述预设注册设备列表中确定并发送的目标边缘设备的唯一标识,则基于所述目标边缘设备的唯一标识确定目标边缘设备中的目标边缘代理装置。A device determining unit configured to access the preset registered device list through the preset first port when receiving the preset cloud data collection and storage device through the preset first port, and determine from the preset registered device list and sends the unique identifier of the target edge device, then determine the target edge proxy device in the target edge device based on the unique identifier of the target edge device.
在一些具体实施例中,所述的监控数据采集装置,还包括:In some specific embodiments, the monitoring data collection device further includes:
装置配置单元,用于将Prometheus服务器配置为所述预设云端数据采集存储装置。A device configuration unit configured to configure the Prometheus server as the preset cloud data collection and storage device.
在一些具体实施例中,所述数据接收模块12,包括:In some specific embodiments, the data receiving module 12 includes:
数据接收单元,用于接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置,以便所述预设云端数据采集存储装置将所述监控数据保存至预设存储位置。A data receiving unit, configured to receive the monitoring data returned by the target edge agent device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port, so that the preset It is assumed that the cloud data collection and storage device saves the monitoring data to a preset storage location.
在一些具体实施例中,所述数据请求模块11,包括:In some specific embodiments, the data request module 11 includes:
监控装置应用单元,用于基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求,以便所述目标边缘代理装置基于所述目标边缘代理装置上的预设第二端口将所述数据请求转发至与所述目标边缘代理装置唯一对应的目标边缘监控装置后,通过所述预设第二端口接收所述目标边缘监控装置返回的监控数据。A monitoring device application unit configured to send a data request for obtaining monitoring data of the target edge device to the target edge proxy device based on a long connection link previously established with the target edge proxy device, so that the target edge proxy device After the edge proxy device forwards the data request to the target edge monitoring device uniquely corresponding to the target edge proxy device based on the preset second port on the target edge proxy device, it receives the data request through the preset second port. The monitoring data returned by the target edge monitoring device.
进一步的,本申请实施例还公开了一种电子设备,图5是根据示例性实施例示出的电子设备20结构图,图中的内容不能认为是对本申请的使用范围的任何限制。Furthermore, the embodiment of the present application also discloses an electronic device. Figure 5 is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the figure cannot be considered as any limitation on the scope of use of the present application.
图5为本申请实施例提供的一种电子设备20的结构示意图。该电子设备20,具体可以包括:至少一个处理器21、至少一个存储器22、电源23、显示屏24、输入输出接口25、通信接口26和通信总线27。其中,所述存储器22用于存储计算机程序,所述计算机程序由所述处理器21加载并执行,以实现以下的监控数据采集方法:FIG. 5 is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input and output interface 25, a communication interface 26 and a communication bus 27. Wherein, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the following monitoring data collection method:
当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求;When the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined, and the target edge proxy device is determined based on the preset communication with the target device. The long connection link established by the edge proxy device sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device;
接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
另外,本实施例中的电子设备20具体可以为电子计算机,电源23用于为电子设备20上的各硬件设备提供工作电压;通信接口26能够为电子设备20创建与外界设备之间的数据传输通道,其所遵循的通信协议是能够适用于本申请技术方案的任意通信协议,在此不对其进行具体限定;输入输出接口25,用于获取外界输入数据或向外界输出数据,其具体的接口类型可以根据具体应用需要进行选取,在此不进行具体限定。In addition, the electronic device 20 in this embodiment can be an electronic computer, and the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 26 can create data transmission between the electronic device 20 and external devices. channel, the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and it is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the external world, and its specific interface The type can be selected according to specific application needs and is not specifically limited here.
另外,存储器22作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源可以包括操作系统221、计算机程序222及虚拟机数据223等,虚拟机数据223可以包括各种各样的数据。存储方式可以是短暂存储或者永久存储。In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the resources stored thereon can include an operating system 221, a computer program 222, a virtual machine data 223, etc. The virtual machine data 223 A wide variety of data can be included. The storage method can be temporary storage or permanent storage.
其中,操作系统221用于管理与控制电子设备20上的各硬件设备以及计算机程序222,其可以是Windows Server、Netware、Unix、Linux等。计算机程序222除了包括能够用于完成前述任一实施例公开的由电子设备20执行的监控数据采集方法的计算机程序之外,还可以进一步包括能够用于完成其他特定工作的计算机程序。Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the monitoring data collection method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
进一步的,本申请还公开了一种计算机可读存储介质,这里所说的计算机可读存储介质包括随机存取存储器(Random Access Memory,RAM)、内存、只读存储器(Read-OnlyMemory,ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、磁碟或者光盘或技术领域内所公知的任意其他形式的存储介质。其中,所述计算机程序被处理器执行时实现以下的监控数据采集方法:Further, this application also discloses a computer-readable storage medium. The computer-readable storage medium mentioned here includes random access memory (Random Access Memory, RAM), memory, and read-only memory (Read-OnlyMemory, ROM). , electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, magnetic disk or optical disk or any other form of storage medium known in the technical field. Wherein, when the computer program is executed by the processor, the following monitoring data collection method is implemented:
当通过预设第一端口接收到预设云端数据采集存储装置发送的目标设备信息,则确定与所述目标设备信息唯一对应的目标边缘设备中的目标边缘代理装置,并基于预先与所述目标边缘代理装置建立的长连接链路,向所述目标边缘代理装置发送用于获取所述目标边缘设备的监控数据的数据请求;When the target device information sent by the preset cloud data collection and storage device is received through the preset first port, the target edge agent device in the target edge device that uniquely corresponds to the target device information is determined, and the target edge proxy device is determined based on the preset communication with the target device. The long connection link established by the edge proxy device sends a data request for obtaining monitoring data of the target edge device to the target edge proxy device;
接收所述目标边缘代理装置返回的所述监控数据,并通过所述预设第一端口将所述监控数据返回至所述预设云端数据采集存储装置。Receive the monitoring data returned by the target edge proxy device, and return the monitoring data to the preset cloud data collection and storage device through the preset first port.
关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。Regarding the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be described again here.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant details, please refer to the description in the method section. Those skilled in the art may further realize that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. In order to clearly illustrate the possible functions of hardware and software, Interchangeability, in the above description, the composition and steps of each example have been generally described according to functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination of both. Software modules may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or anywhere in the field of technology. any other known form of storage media.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or any such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.
以上对本发明所提供的监控数据采集方法、装置、设备、存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The monitoring data collection methods, devices, equipment, and storage media provided by the present invention have been introduced in detail above. Specific examples are used in this article to illustrate the principles and implementations of the present invention. The description of the above embodiments is only to help understanding. The method of the present invention and its core idea; at the same time, for those of ordinary skill in the field, there will be changes in the specific implementation and application scope based on the idea of the present invention. In summary, the contents of this specification should not understood as limitations of the invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310778441.3A CN116800835A (en) | 2023-06-29 | 2023-06-29 | Monitoring data acquisition method, device, equipment and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310778441.3A CN116800835A (en) | 2023-06-29 | 2023-06-29 | Monitoring data acquisition method, device, equipment and medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116800835A true CN116800835A (en) | 2023-09-22 |
Family
ID=88039933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310778441.3A Pending CN116800835A (en) | 2023-06-29 | 2023-06-29 | Monitoring data acquisition method, device, equipment and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116800835A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117938617A (en) * | 2024-03-19 | 2024-04-26 | 济南浪潮数据技术有限公司 | Device management method, device, computer device and storage medium |
| CN119996011A (en) * | 2025-02-18 | 2025-05-13 | 数字广东网络建设有限公司 | Monitoring method, platform, electronic device and storage medium of unified acquisition agent |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113259479A (en) * | 2021-06-18 | 2021-08-13 | 腾讯科技(深圳)有限公司 | Data processing method and equipment |
| CN114328115A (en) * | 2021-12-30 | 2022-04-12 | 天翼物联科技有限公司 | Cloud monitoring and edge operation and maintenance method and system |
| CN114363410A (en) * | 2022-03-17 | 2022-04-15 | 苏州浪潮智能科技有限公司 | Application access method, cloud agent, node agent component, device and medium |
| CN115412555A (en) * | 2022-08-19 | 2022-11-29 | 苏州浪潮智能科技有限公司 | Cloud side communication method, device, equipment and computer readable storage medium |
| WO2023279912A1 (en) * | 2021-07-08 | 2023-01-12 | 腾讯科技(深圳)有限公司 | Data processing method, apparatus and system, computer device, readable storage medium, and computer program product |
-
2023
- 2023-06-29 CN CN202310778441.3A patent/CN116800835A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113259479A (en) * | 2021-06-18 | 2021-08-13 | 腾讯科技(深圳)有限公司 | Data processing method and equipment |
| WO2023279912A1 (en) * | 2021-07-08 | 2023-01-12 | 腾讯科技(深圳)有限公司 | Data processing method, apparatus and system, computer device, readable storage medium, and computer program product |
| CN114328115A (en) * | 2021-12-30 | 2022-04-12 | 天翼物联科技有限公司 | Cloud monitoring and edge operation and maintenance method and system |
| CN114363410A (en) * | 2022-03-17 | 2022-04-15 | 苏州浪潮智能科技有限公司 | Application access method, cloud agent, node agent component, device and medium |
| CN115412555A (en) * | 2022-08-19 | 2022-11-29 | 苏州浪潮智能科技有限公司 | Cloud side communication method, device, equipment and computer readable storage medium |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117938617A (en) * | 2024-03-19 | 2024-04-26 | 济南浪潮数据技术有限公司 | Device management method, device, computer device and storage medium |
| CN119996011A (en) * | 2025-02-18 | 2025-05-13 | 数字广东网络建设有限公司 | Monitoring method, platform, electronic device and storage medium of unified acquisition agent |
| CN119996011B (en) * | 2025-02-18 | 2025-09-26 | 数字广东网络建设有限公司 | Monitoring method, platform, electronic equipment and storage medium of unified acquisition agent |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108989066B (en) | Equipment management method and device | |
| CN112087312A (en) | A method, apparatus and device for providing edge services | |
| CN108370341A (en) | Resource allocation method, virtual network function manager and Element management system | |
| CN116800835A (en) | Monitoring data acquisition method, device, equipment and medium | |
| US8341285B2 (en) | Method and system for transferring files | |
| CN111258627A (en) | Interface document generation method and device | |
| CN113138900B (en) | Data acquisition processing method and device and electronic equipment | |
| CN107566217A (en) | A kind of flow control methods, device, equipment, storage medium | |
| US8554980B2 (en) | Triggered notification | |
| CN110674172A (en) | Data query method and device | |
| CN109274715A (en) | The platform resource management system of vehicle-mounted multi-channel communication systems | |
| CN114371944B (en) | A method, system, device, and storage medium for remote invocation of distributed services | |
| CN113965571B (en) | A management method, device, equipment and medium for distributed embedded devices | |
| WO2020253330A1 (en) | Method and apparatus for customer premise equipment configuration management | |
| CN113296711B (en) | Method for optimizing distributed storage delay in database scene | |
| CN114268938A (en) | Method, device, equipment and storage medium for managing user front equipment | |
| WO2023035777A1 (en) | Network configuration method, proxy component, controller, electronic device and storage medium | |
| CN101212346B (en) | Software version management method and device of a network element management system | |
| CN116193299B (en) | Service management method, device and storage medium | |
| CN114466011B (en) | Metadata service request method, device, equipment and medium | |
| CN106230980A (en) | A kind of address configuration method, Apparatus and system | |
| CN110955537A (en) | Method and device for containing pipes by physical machine | |
| CN110336712A (en) | Method, device, storage medium and mobile terminal for grabbing air packets by mobile terminal | |
| CN113810448B (en) | Cloud service method, deployment method, device, electronic equipment and storage medium | |
| CN115955471A (en) | OTA (over the air) upgrading method and system of network terminal equipment |
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 |