CN115766828A - Cloud security monitoring task information interaction method and system - Google Patents
Cloud security monitoring task information interaction method and system Download PDFInfo
- Publication number
- CN115766828A CN115766828A CN202211400767.4A CN202211400767A CN115766828A CN 115766828 A CN115766828 A CN 115766828A CN 202211400767 A CN202211400767 A CN 202211400767A CN 115766828 A CN115766828 A CN 115766828A
- Authority
- CN
- China
- Prior art keywords
- information
- monitoring
- monitoring device
- interaction
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
Description
技术领域technical field
本发明涉及即时通信技术领域,特别涉及一种云安全监控任务信息交互方法及系统。The invention relates to the technical field of instant messaging, in particular to a cloud security monitoring task information interaction method and system.
背景技术Background technique
随着信息网络技术的飞速的发展,基于云的无线网络也随之普及到国内各个家庭和公共场所,人们已经开始享受无线网络给工作及生活带来的便捷。但这种便捷同样也给不法份子带来可乘之机,越来越多的网络违法活动开始通过公众场所的无线网络来进行。With the rapid development of information network technology, cloud-based wireless networks have also been popularized in various households and public places in China, and people have begun to enjoy the convenience brought by wireless networks to work and life. But this convenience also brings opportunities for lawbreakers, and more and more illegal activities on the Internet have begun to be carried out through wireless networks in public places.
监控设备负责网络流量数据的监控和分析,对网络行为管理起到了重要作用。然而由于监控设备的应用场景多、安装场所的网络环境复杂等原因,使已接入的监控设备状态并不稳定,传统的监控设备管理系统仅负责接受监控数据的上报,许多场所监控数据上报发生中断无法被及时发现,并且运维人员在发现监控数据上报中断后也无法定位中断原因以及时恢复对其进行恢复,使得监控设备的运维管理非常困难。Monitoring equipment is responsible for the monitoring and analysis of network traffic data, which plays an important role in network behavior management. However, due to the many application scenarios of monitoring equipment and the complex network environment of the installation site, the status of the connected monitoring equipment is not stable. The traditional monitoring equipment management system is only responsible for accepting the reporting of monitoring data, and the reporting of monitoring data in many places occurs. The interruption cannot be detected in time, and the operation and maintenance personnel cannot locate the cause of the interruption and restore it in time after discovering the interruption reported by the monitoring data, which makes the operation and maintenance management of the monitoring equipment very difficult.
发明内容Contents of the invention
本发明正是基于上述问题,提出了一种云安全监控任务信息交互方法及系统,通过交互形式实现对监控设备的远程实时管理,便于用户及运维人员管理监控设备。Based on the above problems, the present invention proposes a cloud security monitoring task information interaction method and system, which realizes remote real-time management of monitoring equipment through interactive forms, and facilitates management of monitoring equipment by users and operation and maintenance personnel.
有鉴于此,本发明的第一方面提出了一种云安全监控任务信息交互方法,包括:In view of this, the first aspect of the present invention proposes a cloud security monitoring task information interaction method, including:
接收云安全监控设备发送的监控交互请求消息,所述交互请求消息包含预先配置的监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息;Receive a monitoring interaction request message sent by a cloud security monitoring device, where the interaction request message includes preconfigured identity information of the monitoring device, address information of the message service module, subscription topic information, and monitoring interaction information;
根据所述地址信息建立所述监控设备与所述消息服务模块的通信连接;Establishing a communication connection between the monitoring device and the message service module according to the address information;
将所述监控交互信息输入与所述订阅主题信息关联的监控设备;inputting the monitoring interaction information into a monitoring device associated with the subscription topic information;
所述监控设备对所述监控交互信息进行校验以判断是否需要变更所述订阅主题信息所关联的任务发布信息;The monitoring device verifies the monitoring interaction information to determine whether it is necessary to change the task release information associated with the subscription topic information;
判断为是,则将所述监控交互信息写入内存队列等待异步线程池模块对其执行持久化操作;If it is judged to be yes, then write the monitoring interaction information into the memory queue and wait for the asynchronous thread pool module to perform persistent operations on it;
根据所述监控设备的身份标识信息判断所述内存队列中是否存在需要向所述监控设备下发的任务信息;judging according to the identity information of the monitoring device whether there is task information that needs to be delivered to the monitoring device in the memory queue;
判断为是,则将所述任务信息封装加密后通过所述消息服务模块下发给所述监控设备。If it is judged to be yes, then the task information is encapsulated and encrypted and sent to the monitoring device through the message service module.
可选地,还包括:Optionally, also include:
接收所述监控设备的注册请求;receiving a registration request of the monitoring device;
接收所述监控设备在开启状态下周期性发送的心跳消息,所述心跳消息包括所述监控设备的物理地址信息、监控开启状态信息和/或认证开启状态信息。Receive a heartbeat message periodically sent by the monitoring device in an on state, where the heartbeat message includes physical address information of the monitoring device, monitoring on state information and/or authentication on state information.
可选地,还包括:Optionally, also include:
接收所述监控设备在开机开启后或者执行任意任务后所发送的心跳信息,所述心跳信息包括所述监控设备的物理地址信息以及国际移动设备身份码IMEI信息;Receive the heartbeat information sent by the monitoring device after it is turned on or after performing any task, the heartbeat information includes the physical address information of the monitoring device and the International Mobile Equipment Identity code IMEI information;
根据所这监控设备的物理地址信息在数据库查询所述监控设备的IMEI;Query the IMEI of the monitoring device in the database according to the physical address information of the monitoring device;
当从数据库查询到的所述监控设备的IMEI与所述心跳信息携带的IMEI相同时,向所述监控设备返回当前无监控任务的信息;When the IMEI of the monitoring device queried from the database is the same as the IMEI carried in the heartbeat information, return information that there is currently no monitoring task to the monitoring device;
否则将从数据库查询到的IMEI对应的监控任务下发给所述监控设备;Otherwise, send the monitoring task corresponding to the IMEI queried from the database to the monitoring device;
配置的针对所述监控设备的IMEI更新信息或IMEI回滚信息;Configured IMEI update information or IMEI rollback information for the monitoring device;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI写入数据库;Write the IMEI corresponding to the IMEI update information or the IMEI rollback information into the database;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI推送至所述监控设备以使所述监控设备更新IMEI,并在所述监控设备的状态栏中将更新或回滚的参数加1。Push the IMEI corresponding to the IMEI update information or the IMEI rollback information to the monitoring device so that the monitoring device updates the IMEI, and add 1 to the updated or rolled back parameter in the status column of the monitoring device.
可选地,还包括:Optionally, also include:
接收用户在后台配置的针对所述监控设备的监控开启状态信息和/或认证开启状态信息,所述监控开启状态信息为将所述监控设备的监控状态配置为开启状态或关闭状态,所述认证开启状态信息为将所述监控设备的认证状态配置为开启状态或关闭状态;receiving monitoring enabled status information and/or authentication enabled status information for the monitoring device configured by the user in the background, the monitoring enabled status information is configuring the monitoring status of the monitoring device as an enabled state or an disabled state, and the authentication The open state information is to configure the authentication state of the monitoring device as an open state or a closed state;
将所述监控开启状态信息和/或认证开启状态信息写入数据库;Writing the monitoring enabled status information and/or authentication enabled status information into a database;
接收所述监控设备所发送的心跳信息;receiving heartbeat information sent by the monitoring device;
当所述心跳信息中携带的所述监控设备的监控开启状态信息和/或认证开启状态信息与数据库中配置的所述监控设备的监控开启状态信息和/或认证开启状态信息不一致时,向所述监控设备下发相应的监控开关任务和/或认证开关任务;When the monitoring enabled status information and/or authentication enabled status information of the monitoring device carried in the heartbeat information is inconsistent with the monitoring enabled status information and/or authentication enabled status information of the monitoring device configured in the database, the The above-mentioned monitoring equipment issues corresponding monitoring switch tasks and/or authentication switch tasks;
接收所述监控设备返回的所述监控开关任务和/或认证开关任务的执行结果;receiving an execution result of the monitoring switching task and/or authentication switching task returned by the monitoring device;
当所述监控开关任务和/或认证开关任务的执行结果为失败时,再次向所述监控设备下发所述监控开关任务和/或认证开关任务直至所述监控设备返回执行结果为成功的信息。When the execution result of the monitoring switching task and/or the authentication switching task is a failure, the monitoring switching task and/or the authentication switching task are sent to the monitoring device again until the monitoring device returns information that the execution result is successful .
可选地,还包括:Optionally, also include:
对所述监控设备进行AI异常预警操作。Perform AI abnormal warning operation on the monitoring equipment.
可选地,对所述监控设备进行AI异常预警操作,包括:Optionally, performing an AI abnormal early warning operation on the monitoring device, including:
获取所述监控设备在N个时间周期发送的N个心跳消息,其中,N大于1;Obtaining N heartbeat messages sent by the monitoring device in N time periods, where N is greater than 1;
将所述N个心跳信息设置为时间序列组,所述时间序列组包含N维时间序列,每一个时间序列设置一键-值对key-value,所述键-值对与心跳包内容一一对应;The N heartbeat information is set as a time series group, the time series group includes an N-dimensional time series, and each time series is provided with a key-value pair key-value, and the key-value pair is one-to-one with the content of the heartbeat packet correspond;
将所述N维时间序列分别输入至M*N个异常预测器中,其中一个时间序列对应M个异常预测器,M为正整数且小于N;Inputting the N-dimensional time series into M*N anomaly predictors respectively, wherein one time series corresponds to M anomaly predictors, and M is a positive integer less than N;
将N个时间序列的键-值对输入对称残差网络,通过所述对称残差网络提取所述键-值对的第一特征;The key-value pairs of N time series are input into the symmetric residual network, and the first feature of the key-value pair is extracted through the symmetric residual network;
通过注意力机制将所述第一特征对进行权重量化,得到量化后的第二特征;performing weight quantization on the first feature pair through an attention mechanism to obtain a quantized second feature;
将所述量化后的第二特征输入双向长短期记忆网络,获取预测出的第N+1周期的键-值对;Inputting the quantized second feature into the two-way long-short-term memory network to obtain the predicted key-value pair of the N+1th cycle;
对所述第N+1周期的键-值对进行预警判断,若所述第N+1周期的键-值对超出预设阈值范围,则判定所述监控设备异常。An early warning judgment is performed on the key-value pair of the N+1th cycle, and if the key-value pair of the N+1th cycle exceeds a preset threshold range, it is determined that the monitoring device is abnormal.
可选地,所述交互请求消息由所述监控设备使用服务器提供的公钥加密得到,对所述交互请求消息执行解密和解码操作的步骤具体包括:Optionally, the interaction request message is encrypted by the monitoring device using a public key provided by the server, and the steps of decrypting and decoding the interaction request message specifically include:
使用与所述公钥相应的私钥对所述交互请求消息进行解密得到所述监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息的明文字符串;Using the private key corresponding to the public key to decrypt the interaction request message to obtain the identity information of the monitoring device, the address information of the message service module, subscription topic information, and a plaintext string of monitoring interaction information;
判断所述订阅主题信息的明文字符串中是否包含预设的第一分隔符以及所述监控交互信息的明文字符串中是否包含预设的第二分隔符;judging whether the plaintext string of the subscription topic information contains a preset first delimiter and whether the plaintext string of the monitoring interaction information contains a preset second delimiter;
判断所述订阅主题信息的明文字符串中所述第一分隔符的数量与所述监控交互信息的明文字符串中所述第二分隔符的数量是否一致;judging whether the number of the first delimiters in the plaintext string of the subscription topic information is consistent with the number of the second delimiters in the plaintext string of the monitoring interaction information;
均判断为是时,基于所述第一分隔符和所述第二分隔符对所述订阅主题信息的明文字符串和所述监控交互信息的明文字符串进行分割分别生成订阅主题数组和交互信息数组。When both are judged to be yes, segment the plaintext string of the subscription topic information and the plaintext string of the monitoring interaction information based on the first delimiter and the second delimiter to generate subscription topic arrays and interaction information respectively array.
可选地,将所述监控交互信息输入与所述订阅主题信息关联的监控设备的步骤具体包括:Optionally, the step of inputting the monitoring interaction information into a monitoring device associated with the subscription topic information specifically includes:
将所述订阅主题数组中的每一个订阅主题与数据库中保存的订阅主题列表相匹配;Matching each subscription topic in the subscription topic array with a list of subscription topics saved in the database;
根据匹配结果确定与所述订阅主题数组中每一个订阅主题相对应的监控设备;determining a monitoring device corresponding to each subscription topic in the subscription topic array according to the matching result;
将所述交互信息数组中的每一个交互信息输入到相应的监控设备。Each interaction information in the interaction information array is input to a corresponding monitoring device.
可选地,本发明实施例还提供了一种云安全监控任务信息交互系统,包括:Optionally, the embodiment of the present invention also provides a cloud security monitoring task information interaction system, including:
接收模块,用于接收云安全监控设备发送的监控交互请求消息,所述交互请求消息包含预先配置的监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息;The receiving module is used to receive the monitoring interaction request message sent by the cloud security monitoring device, and the interaction request message includes the identity information of the pre-configured monitoring device, the address information of the message service module, the subscription topic information and the monitoring interaction information;
连接模块,用于根据所述地址信息建立所述监控设备与所述消息服务模块的通信连接;A connection module, configured to establish a communication connection between the monitoring device and the message service module according to the address information;
输入模块,用于将所述监控交互信息输入与所述订阅主题信息关联的监控设备;An input module, configured to input the monitoring interaction information into a monitoring device associated with the subscription topic information;
判断模块,用于对所述监控交互信息进行校验以判断是否需要变更所述订阅主题信息所关联的任务发布信息;判断为是,则将所述监控交互信息写入内存队列等待异步线程池模块对其执行持久化操作;A judging module, configured to check the monitoring interaction information to determine whether it is necessary to change the task release information associated with the subscription topic information; if it is judged to be yes, then write the monitoring interaction information into a memory queue and wait for an asynchronous thread pool The module performs persistent operations on it;
所述判断模块,还用于根据所述监控设备的身份标识信息判断所述内存队列中是否存在需要向所述监控设备下发的任务信息;判断为是,则将所述任务信息封装加密后通过所述消息服务模块下发给所述监控设备。The judging module is further configured to judge whether there is task information that needs to be sent to the monitoring device in the memory queue according to the identity information of the monitoring device; if it is judged to be yes, the task information is encapsulated and encrypted Send it to the monitoring device through the message service module.
本发明的第三方面提出了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本发明第一方面中任一项所述的云安全监控任务信息交互方法。The third aspect of the present invention provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the cloud security monitoring task information interaction described in any one of the first aspects of the present invention is realized. method.
本发明提出一种云安全监控任务信息交互方法及系统,通过交互形式实现对监控设备的远程实时管理,便于用户及运维人员管理监控设备,同时采用支持轻量级的发布/订阅式消息传输,为低带宽和不稳定的网络环境中的监控设备提供可靠的网络服务,并提供海量连接、高并发、低时延的稳定监控设备接入服务,支持数据加密,提供高安全的监控设备数据传输通道,对监控设备消息进行筛选与转发并通过发送消息来异步执行以提高系统响应速度,支持监控云平台对监控设备指令下发,根据不同指令,获取监控设备的状态信息。The invention proposes a cloud security monitoring task information interaction method and system, which realizes remote real-time management of monitoring equipment through interactive forms, facilitates management of monitoring equipment by users and operation and maintenance personnel, and adopts support for lightweight publish/subscribe message transmission , to provide reliable network services for monitoring equipment in low-bandwidth and unstable network environments, and provide stable monitoring equipment access services with massive connections, high concurrency, and low latency, support data encryption, and provide highly secure monitoring equipment data The transmission channel screens and forwards the monitoring device messages and executes them asynchronously by sending messages to improve the system response speed. It supports the monitoring cloud platform to issue commands to the monitoring devices, and obtains the status information of the monitoring devices according to different commands.
附图说明Description of drawings
图1是本发明一个实施例提供的一种云安全监控任务信息交互方法的流程图;Fig. 1 is a flowchart of a method for interacting with cloud security monitoring task information provided by an embodiment of the present invention;
图2是本发明一个实施例提供的监控设备状态监控方法的流程图;Fig. 2 is a flowchart of a method for monitoring the state of monitoring equipment provided by an embodiment of the present invention;
图3是本发明一个实施例提供的监控版本管理方法的流程图;Fig. 3 is a flow chart of a monitoring version management method provided by an embodiment of the present invention;
图4是本发明一个实施例中装置的硬件组成示意图;Fig. 4 is a schematic diagram of the hardware composition of the device in one embodiment of the present invention;
图5是本发明一个实施例提供的一种云安全监控任务信息交互系统的示意框图。Fig. 5 is a schematic block diagram of a cloud security monitoring task information interaction system provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways than described here. Therefore, the protection scope of the present invention is not limited by the specific implementation disclosed below. Example limitations.
在本发明的描述中,术语“多个”则指两个或两个以上,除非另有明确的限定,术语“上”、“下”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的系统或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。术语“连接”、“安装”、“固定”等均应做广义理解,例如,“连接”可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。此外,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the description of the present invention, the term "plurality" refers to two or more than two. Unless otherwise clearly defined, the orientation or positional relationship indicated by the terms "upper", "lower" and so on is based on the orientation shown in the accompanying drawings. Orientation or positional relationship is only for the convenience of describing the present invention and simplifying the description, but does not indicate or imply that the referred system or element must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention. The terms "connection", "installation" and "fixation" should be understood in a broad sense, for example, "connection" can be fixed connection, detachable connection, or integral connection; it can be directly connected or through an intermediate The medium is indirectly connected. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention according to specific situations. In addition, the terms "first", "second", etc. are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, a feature defined as "first", "second", etc. may expressly or implicitly include one or more of that feature. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
在本说明书的描述中,术语“一个实施例”、“一些实施方式”、“具体实施例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或实例。而且,描述的具体特征、结构、材料或特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions of the terms "one embodiment", "some implementations", "specific examples" and the like mean that specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in the present invention In at least one embodiment or example of . In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
下面参照附图来描述根据本发明一些实施方式提供的一种云安全监控任务信息交互方法、系统及计算机可读介质。A cloud security monitoring task information interaction method, system and computer-readable medium provided according to some embodiments of the present invention will be described below with reference to the accompanying drawings.
如图1所示,本发明的第一方面提出了一种云安全监控任务信息交互方法,包括:As shown in Figure 1, the first aspect of the present invention proposes a method for interacting with cloud security monitoring task information, including:
接收云安全监控设备发送的监控交互请求消息,所述交互请求消息包含预先配置的监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息;Receive a monitoring interaction request message sent by a cloud security monitoring device, where the interaction request message includes preconfigured identity information of the monitoring device, address information of the message service module, subscription topic information, and monitoring interaction information;
根据所述地址信息建立所述监控设备与所述消息服务模块的通信连接;Establishing a communication connection between the monitoring device and the message service module according to the address information;
将所述监控交互信息输入与所述订阅主题信息关联的监控设备;inputting the monitoring interaction information into a monitoring device associated with the subscription topic information;
所述监控设备对所述监控交互信息进行校验以判断是否需要变更所述订阅主题信息所关联的任务发布信息;The monitoring device verifies the monitoring interaction information to determine whether it is necessary to change the task release information associated with the subscription topic information;
判断为是,则将所述监控交互信息写入内存队列等待异步线程池模块对其执行持久化操作;If it is judged to be yes, then write the monitoring interaction information into the memory queue and wait for the asynchronous thread pool module to perform persistent operations on it;
根据所述监控设备的身份标识信息判断所述内存队列中是否存在需要向所述监控设备下发的任务信息;judging according to the identity information of the monitoring device whether there is task information that needs to be delivered to the monitoring device in the memory queue;
判断为是,则将所述任务信息封装加密后通过所述消息服务模块下发给所述监控设备。If it is judged to be yes, then the task information is encapsulated and encrypted and sent to the monitoring device through the message service module.
本发明提出的云安全监控任务信息交互方法应用于监控云平台,所述监控云平台通过MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)协议的消息发布/订阅机制与监控设备实时交互。所述监控云平台与所述监控设备之间使用约定的Topic(订阅主题)进行云安全监控交互。在MQTT协议下,交互方的消息交互模式包括Publish(发布)模式和Subscribe(订阅)模式。所述监控设备可以采用Publish模式将Publish消息到所述监控云平台调用对应订阅主题的服务接口,也可以采用订阅模式订阅所述监控云平台上的任意订阅主题用于接收该订阅主题下的服务消息通知。所述监控设备可以通过监控设备命令Topic簇获取应用即时命令,并上报执行结果。在返回结果前,会将要变更的数据发送到线程池中,由异步线程将变更的监控设备的信息发送到约定的话题Topic中,再由EMQX消息服务发送到该监控设备。具体的,在本发明一些实施方式的技术方案中,监控设备通过与监控云平台约定好的加密和编码方式,对监控设备的请求信息进行加密,并使用HTTPS(HyperText Transfer Protocol over Secure Socket Layer,安全的超文本传输协议通道)协议将请求信息发送到统一API(Application Programming Interface,应用程序编程接口)网关。统一API网关将请求转发到监控设备寻址系统中,由监控设备寻址系统对该请求信息进行解密和解码,根据监控云平台的配置数据,计算监控设备所需要连接的EMQX消息服务地址和Topic,从而实现负载均衡以及提高容错能力。所述监控设备在获取到EMQX消息服务地址和Topic后,与EMQX消息服务创建MQTT通讯连接。EMQX消息服务在收到监控设备的请求信息后,将其推送到对应Topic的监控设备接入系统,由监控设备接入系统对请求信息进行解密和解码,以及对解码后的数据进行校验,检查该请求信息是否变更在监控云平台上对应Topic的信息,需要变更则将数据保存至内存队列中,由异步线程池进行消费,并持久化。监控云平台根据监控设备的Mac(Media Access Control,媒体介入控制层,又称物理地址)地址或者监控设备ID(Identity document,身份证标识号)来判断是否有任务需要下发给该监控设备,如果有任务需要下发,则将任务封装加密后,发送到EMQX消息服务,由EMQX消息服务将数据推送给监控设备端。The cloud security monitoring task information interaction method proposed by the present invention is applied to the monitoring cloud platform, and the monitoring cloud platform interacts with the monitoring equipment in real time through the message publishing/subscribing mechanism of the MQTT (Message Queuing Telemetry Transport) protocol. An agreed Topic (subscription topic) is used between the monitoring cloud platform and the monitoring device to perform cloud security monitoring interaction. Under the MQTT protocol, the message interaction modes of the interacting parties include Publish (publish) mode and Subscribe (subscribe) mode. The monitoring device can use the Publish mode to send the Publish message to the monitoring cloud platform to call the service interface of the corresponding subscription topic, and can also use the subscription mode to subscribe to any subscription topic on the monitoring cloud platform to receive services under the subscription topic notification. The monitoring device can obtain the application instant command through the monitoring device command topic cluster, and report the execution result. Before returning the result, the data to be changed will be sent to the thread pool, and the asynchronous thread will send the information of the changed monitoring device to the agreed topic Topic, and then send it to the monitoring device by the EMQX message service. Specifically, in the technical solutions of some embodiments of the present invention, the monitoring device encrypts the request information of the monitoring device through an encryption and encoding method agreed with the monitoring cloud platform, and uses HTTPS (HyperText Transfer Protocol over Secure Socket Layer, The secure hypertext transfer protocol channel) protocol sends the request information to a unified API (Application Programming Interface, application programming interface) gateway. The unified API gateway forwards the request to the monitoring device addressing system, and the monitoring device addressing system decrypts and decodes the request information, and calculates the EMQX message service address and Topic that the monitoring device needs to connect to according to the configuration data of the monitoring cloud platform , so as to achieve load balancing and improve fault tolerance. After the monitoring device obtains the EMQX message service address and Topic, it establishes an MQTT communication connection with the EMQX message service. After the EMQX message service receives the request information from the monitoring device, it pushes it to the monitoring device access system corresponding to the Topic, and the monitoring device access system decrypts and decodes the request information, and verifies the decoded data. Check whether the request information has changed the information corresponding to the topic on the monitoring cloud platform. If it needs to be changed, the data will be saved in the memory queue, consumed by the asynchronous thread pool, and persisted. The monitoring cloud platform judges whether there is a task to be sent to the monitoring device according to the Mac (Media Access Control, media intervention control layer, also known as the physical address) address of the monitoring device or the monitoring device ID (Identity document, ID number). If there is a task that needs to be delivered, the task will be encapsulated and encrypted, and sent to the EMQX message service, and the EMQX message service will push the data to the monitoring device.
上述方法的技术方案中,通过交互形式实现对监控设备的远程实时管理,便于用户及运维人员管理监控设备,同时采用支持轻量级的发布/订阅式消息传输,为低带宽和不稳定的网络环境中的监控设备提供可靠的网络服务,并提供海量连接、高并发、低时延的稳定监控设备接入服务,支持数据加密,提供高安全的监控设备数据传输通道,对监控设备消息进行筛选与转发并通过发送消息来异步执行以提高系统响应速度。In the technical solution of the above method, remote real-time management of monitoring equipment is realized through interactive forms, which is convenient for users and operation and maintenance personnel to manage monitoring equipment. The monitoring equipment in the network environment provides reliable network services, and provides massive connections, high concurrency, and low-latency stable monitoring equipment access services, supports data encryption, provides high-security monitoring equipment data transmission channels, and monitors equipment messages. Screening and forwarding are performed asynchronously by sending messages to improve system response speed.
如图2所示,在上述的云安全监控任务信息交互方法中,还包括:As shown in Figure 2, in the above-mentioned cloud security monitoring task information interaction method, it also includes:
接收监控设备的注册请求;Receive registration requests from monitoring devices;
接收所述监控设备在开启状态下周期性发送的心跳消息,所述心跳消息包括所述监控设备的物理地址信息、监控开启状态信息以及认证开启状态信息。Receive a heartbeat message periodically sent by the monitoring device in the turned-on state, where the heartbeat message includes physical address information of the monitoring device, monitoring-on state information, and authentication-on state information.
监控设备注册并启动后,每分钟向监控云平台发布一条携带本机Mac地址、监控开启状态以及认证开启状态的心跳消息,监控云平台根据监控设备的最新心跳消息记录监控设备的实时在线状态,即监控设备处于在线的状态或处于离线的状态。监控云平台的展示模块通过其前端页面或后台页面展示监控设备的在线状态或其它状态信息。After the monitoring device is registered and started, it sends a heartbeat message to the monitoring cloud platform every minute, carrying the local Mac address, monitoring enabled status, and authentication enabled status. The monitoring cloud platform records the real-time online status of the monitoring device according to the latest heartbeat message of the monitoring device. That is, the monitoring device is online or offline. The display module of the monitoring cloud platform displays the online status or other status information of the monitoring equipment through its front page or background page.
如图3所示,在上述的云安全监控任务信息交互方法中,还包括:As shown in Figure 3, in the above-mentioned cloud security monitoring task information interaction method, it also includes:
接收所述监控设备在开机开启后或者执行任意任务后所发送的心跳消息,所述心跳消息包括所述监控设备的物理地址信息以及国际移动设备身份码(InternationalMobile Equipment Identity,IMEI,IMEI)信息;Receiving a heartbeat message sent by the monitoring device after it is turned on or after performing any task, the heartbeat message includes physical address information of the monitoring device and International Mobile Equipment Identity (IMEI, IMEI) information;
根据所这监控设备的物理地址信息在数据库查询所述监控设备的IMEI;Query the IMEI of the monitoring device in the database according to the physical address information of the monitoring device;
当从数据库查询到的所述监控设备的IMEI与所述心跳消息携带的IMEI相同时,向所述监控设备返回当前无监控任务的信息,否则将从数据库查询到的IMEI对应的监控任务下发给所述监控设备;When the IMEI of the monitoring device queried from the database is the same as the IMEI carried in the heartbeat message, return the information that there is currently no monitoring task to the monitoring device, otherwise, issue the monitoring task corresponding to the IMEI queried from the database to said monitoring device;
接收用户在后台配置的针对所述监控设备的IMEI更新信息或IMEI回滚信息;receiving IMEI update information or IMEI rollback information for the monitoring device configured by the user in the background;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI写入数据库;Write the IMEI corresponding to the IMEI update information or the IMEI rollback information into the database;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI推送至所述监控设备以使所述监控设备更新IMEI,并在所述监控设备的状态栏中将更新或回滚的参数加1,表示当前已经更新或回滚了一次。Push the IMEI corresponding to the IMEI update information or IMEI rollback information to the monitoring device so that the monitoring device updates the IMEI, and add 1 to the updated or rolled back parameter in the status column of the monitoring device, indicating Currently updated or rolled back once.
具体的,监控设备在开机启动或执行任意任务后,向监控云平台发送一条携带本监控设备Mac地址以及当前监控IMEI的心跳消息,监控云平台收到该心跳消息后,根据该Mac地址查询相应监控设备在数据库中保存的IMEI,将其与心跳消息中的当前IMEI进行对比。若当前IMEI与数据库中保存的IMEI相同时,则监控云平台向该监控设备返回当前无更新的信息。若当前IMEI与数据库中保存的IMEI不一致时,则监控云平台将数据库保存的IMEI所对应的监控任务下发给该监控设备。监控设备在执行完毕该监控任务后,再次向监控云平台发送携带本监控设备Mac地址以及当前IMEI的心跳消息,重复上述过程直至监控设备上的IMEI与监控云平台数据库中保存的IMEI一致。当用户需要针对某一监控设备进行IMEI的更新或者回滚时,在监控云平台的后台配置该监控设备的IMEI后,监控云平台实时将该IMEI下发给相应的监控设备。进一步的,用户可以在监控云平台的后台针对某一批监控设备(例如同一型号的监控设备或者同一场所的监控设备等)进行监控版本配置,并批量下发给相应的监控设备执行版本变更。Specifically, after the monitoring device starts up or performs any task, it sends a heartbeat message carrying the Mac address of the monitoring device and the current monitoring IMEI to the monitoring cloud platform. After receiving the heartbeat message, the monitoring cloud platform queries the corresponding Monitor the IMEI saved by the device in the database and compare it with the current IMEI in the heartbeat message. If the current IMEI is the same as the IMEI stored in the database, the monitoring cloud platform returns information that there is currently no update to the monitoring device. If the current IMEI is inconsistent with the IMEI stored in the database, the monitoring cloud platform sends the monitoring task corresponding to the IMEI stored in the database to the monitoring device. After the monitoring device completes the monitoring task, it sends a heartbeat message carrying the Mac address of the monitoring device and the current IMEI to the monitoring cloud platform again, and repeats the above process until the IMEI on the monitoring device is consistent with the IMEI stored in the monitoring cloud platform database. When the user needs to update or roll back the IMEI for a certain monitoring device, after configuring the IMEI of the monitoring device in the background of the monitoring cloud platform, the monitoring cloud platform will send the IMEI to the corresponding monitoring device in real time. Furthermore, the user can perform monitoring version configuration for a certain batch of monitoring devices (such as monitoring devices of the same model or monitoring devices in the same location) in the background of the monitoring cloud platform, and batch release to corresponding monitoring devices to perform version changes.
此外,在本发明实施例钟,还需要对所述监控设备进行AI异常预警操作,具体的,获取所述监控设备在N个时间周期发送的N个心跳消息,其中,N大于1;将所述N个心跳信息设置为时间序列组,所述时间序列组包含N维时间序列,每一个时间序列设置一键-值对key-value,所述键-值对与心跳包内容一一对应。key-value是一种分布式存储系统的存储形式。key value本意是根据关键字取值,其中,key是关键字,value是值,Key-value数据库是一种以键值对存储数据的一种数据库,每个键都会对应一个唯一的值,具有极高的并发读写性能。例如,心跳包包含了A和B信息,那么在相应的键-值对中,也需要包含同样的信息;将所述N维时间序列分别输入至M*N个异常预测器中,其中一个时间序列对应M个异常预测器,M为正整数且小于N;将N个时间序列的键-值对输入对称残差网络,通过所述对称残差网络提取所述键-值对的第一特征;通过注意力机制将所述第一特征对进行权重量化,得到量化后的第二特征;将所述量化后的第二特征输入双向长短期记忆网络,获取预测出的第N+1周期的键-值对;对所述第N+1周期的键-值对进行预警判断,若所述第N+1周期的键-值对超出预设阈值范围,则判定所述监控设备异常。其中,对称残差网络中包括卷积模块和解卷积模块,卷积模块中包括K个残差块,所述解卷积模块中包括K个解卷积块,其中,所述K为大于或等于1的整数;通过所述对称残差网络提取所述键-值对的第一特征,具体包括:In addition, in the embodiment of the present invention, it is also necessary to perform an AI abnormal early warning operation on the monitoring device. Specifically, obtain N heartbeat messages sent by the monitoring device in N time periods, where N is greater than 1; The N heartbeat information is set as a time series group, and the time series group includes N-dimensional time series, and each time series is provided with a key-value pair key-value, and the key-value pair corresponds to the content of the heartbeat packet one by one. Key-value is a storage form of a distributed storage system. The original meaning of key value is to get the value according to the keyword, where key is the keyword and value is the value. The key-value database is a database that stores data in key-value pairs. Each key corresponds to a unique value. Extremely high concurrent read and write performance. For example, if the heartbeat packet contains A and B information, then the corresponding key-value pair also needs to contain the same information; input the N-dimensional time series into M*N anomaly predictors respectively, and one of the time The sequence corresponds to M abnormal predictors, M is a positive integer and less than N; the key-value pairs of N time series are input into the symmetric residual network, and the first feature of the key-value pair is extracted through the symmetric residual network ; Quantify the weight of the first feature through the attention mechanism to obtain the quantized second feature; input the quantized second feature into the bidirectional long-term short-term memory network to obtain the predicted N+1 cycle A key-value pair; performing an early warning judgment on the key-value pair of the N+1th cycle, and if the key-value pair of the N+1th cycle exceeds a preset threshold range, it is determined that the monitoring device is abnormal. Wherein, the symmetric residual network includes a convolution module and a deconvolution module, the convolution module includes K residual blocks, and the deconvolution module includes K deconvolution blocks, wherein the K is greater than or An integer equal to 1; extracting the first feature of the key-value pair through the symmetric residual network, specifically including:
通过所述卷积模块中的K个残差块将所述局部特征进行卷积运算,得到中间特征;通过所述解卷积模块中的K个解卷积块将所述中间特征进行解卷积运算,得到所述访问量的第一特征;通过所述解卷积模块中的K个解卷积块将所述中间特征进行解卷积运算,得到所述访问量的第一特征。Convolve the local features through the K residual blocks in the convolution module to obtain intermediate features; deconvolute the intermediate features through the K deconvolution blocks in the deconvolution module A product operation is performed to obtain the first feature of the access volume; the intermediate features are deconvoluted through K deconvolution blocks in the deconvolution module to obtain the first feature of the access volume.
在上述的云安全监控任务信息交互方法中,还包括:In the above cloud security monitoring task information interaction method, it also includes:
接收用户在后台配置的针对所述监控设备的监控开启状态信息和/或认证开启状态信息,所述监控开启状态信息为将所述监控设备的监控状态配置为开启状态或关闭状态,所述认证开启状态信息为将所述监控设备的认证状态配置为开启状态或关闭状态;receiving monitoring enabled status information and/or authentication enabled status information for the monitoring device configured by the user in the background, the monitoring enabled status information is configuring the monitoring status of the monitoring device as an enabled state or an disabled state, and the authentication The open state information is to configure the authentication state of the monitoring device as an open state or a closed state;
将所述监控开启状态信息和/或认证开启状态信息写入数据库;Writing the monitoring enabled status information and/or authentication enabled status information into a database;
接收所述监控设备所发送的心跳消息;receiving a heartbeat message sent by the monitoring device;
当所述心跳消息中携带的所述监控设备的监控开启状态信息和/或认证开启状态信息与数据库中配置的所述监控设备的监控开启状态信息和/或认证开启状态信息不一致时,向所述监控设备下发相应的监控开关任务和/或认证开关任务;When the monitoring enabled status information and/or authentication enabled status information of the monitoring device carried in the heartbeat message is inconsistent with the monitoring enabled status information and/or authentication enabled status information of the monitoring device configured in the database, the The above-mentioned monitoring equipment issues corresponding monitoring switch tasks and/or authentication switch tasks;
接收所述监控设备返回的所述监控开关任务和/或认证开关任务的执行结果;receiving an execution result of the monitoring switching task and/or authentication switching task returned by the monitoring device;
当所述监控开关任务和/或认证开关任务的执行结果为失败时,再次向所述监控设备下发所述监控开关任务和/或认证开关任务直至所述监控设备返回执行结果为成功的信息。When the execution result of the monitoring switching task and/or the authentication switching task is a failure, the monitoring switching task and/or the authentication switching task are sent to the monitoring device again until the monitoring device returns information that the execution result is successful .
具体的,监控设备每次心跳上报监控开启状态以及认证开启状态,若两个状态之中的任一个状态信息与监控云平台的数据库中所保存的相应状态信息不同,则监控云平台下发相应的监控开关任务或认证开关任务给该监控设备,直至监控设备上报的监控开启状态信息以及认证开启状态信息与监控云平台数据库中保存的相应状态信息一致。当用户需要关闭或重新开启某个监控设备的监控状态或认证状态时,可以在监控云平台的后台对其进行配置,监控云平台根据配置的状态与监控设备上报的心跳消息中的状态进行匹配后,下发相对应的开关任务使得该监控设备执行该任务以变更相应状态。示例性的,监控设备接收到监控开启任务后,执行该监控开启任务,并在执行完毕后向监控云平台上报该监控开启任务的执行结果。如果监控设备上报任务执行失败的消息,使监控云平台再次下发监控开启任务给该监控设备,直至监控设备在心跳消息中上报的监控状态与监控云平台的数据库中保存的该监控设备的监控开启状态一致。Specifically, each heartbeat of the monitoring device reports the monitoring enabled status and authentication enabled status. If any status information in the two statuses is different from the corresponding status information stored in the database of the monitoring cloud platform, the monitoring cloud platform will issue the corresponding The monitoring switch task or the authentication switch task is given to the monitoring device until the monitoring enabled status information and authentication enabled status information reported by the monitoring device are consistent with the corresponding status information stored in the monitoring cloud platform database. When the user needs to turn off or restart the monitoring status or authentication status of a monitoring device, it can be configured in the background of the monitoring cloud platform, and the monitoring cloud platform matches the status in the heartbeat message reported by the monitoring device according to the configured status Afterwards, the corresponding switch task is issued to make the monitoring device execute the task to change the corresponding state. Exemplarily, the monitoring device executes the monitoring enabling task after receiving the monitoring enabling task, and reports the execution result of the monitoring enabling task to the monitoring cloud platform after the execution is completed. If the monitoring device reports a task execution failure message, the monitoring cloud platform will send the monitoring start task to the monitoring device again until the monitoring status reported by the monitoring device in the heartbeat message is consistent with the monitoring status of the monitoring device saved in the database of the monitoring cloud platform. Same open state.
当监控设备需要重启时,根据该监控设备的Mac地址在监控云平台对该监控设备下发重启任务,监控设备接收任务后,执行重启指令进行重启。When the monitoring device needs to be restarted, according to the Mac address of the monitoring device, the monitoring cloud platform sends a restart task to the monitoring device. After receiving the task, the monitoring device executes the restart command to restart.
进一步的,在上述的云安全监控任务信息交互方法中,还包括:Further, in the above-mentioned cloud security monitoring task information interaction method, it also includes:
接收用户在后台配置的针对所述监控设备的检查指令,所述检查指令包括所述监控设备的物理地址信息;receiving an inspection instruction for the monitoring device configured by the user in the background, the inspection instruction including physical address information of the monitoring device;
向所述物理地址信息对应的监控设备下发所述检查指令;issuing the inspection instruction to the monitoring device corresponding to the physical address information;
接收所述监控设备返回的所述检查指令的执行结果;receiving the execution result of the inspection instruction returned by the monitoring device;
展示所述执行结果。Display the execution result.
具体的,用户在监控云平台输入需要检查的监控设备Mac及检查命令,监控云平台将命令发布给指定监控设备,监控设备接到任务后,运行指定命令,并将命令返回值上报监控云平台,监控云平台接收到命令返回结果,向用户展示。Specifically, the user enters the Mac of the monitoring device to be checked and the inspection command on the monitoring cloud platform, and the monitoring cloud platform issues the command to the designated monitoring device. After the monitoring device receives the task, it runs the designated command and reports the return value of the command to the monitoring cloud platform , the monitoring cloud platform receives the command and returns the result, and displays it to the user.
进一步的,在上述的云安全监控任务信息交互方法中,所述交互请求信息由所述监控设备使用服务器提供的公钥加密得到,交互请求信息执行解密和解码操作,获取到地址信息和订阅信息,该步骤具体包括:Further, in the above cloud security monitoring task information interaction method, the interaction request information is encrypted by the monitoring device using the public key provided by the server, and the interaction request information is decrypted and decoded to obtain address information and subscription information , this step specifically includes:
使用与所述公钥相应的私钥对所述交互请求信息进行解密得到所述监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息的明文字符串;Using the private key corresponding to the public key to decrypt the interaction request information to obtain the identity information of the monitoring device, the address information of the message service module, subscription topic information, and a plaintext string of monitoring interaction information;
判断所述订阅主题信息的明文字符串中是否包含预设的第一分隔符以及所述监控交互信息的明文字符串中是否包含预设的第二分隔符;judging whether the plaintext string of the subscription topic information contains a preset first delimiter and whether the plaintext string of the monitoring interaction information contains a preset second delimiter;
判断所述订阅主题信息的明文字符串中所述第一分隔符的数量与所述监控交互信息的明文字符串中所述第二分隔符的数量是否一致;judging whether the number of the first delimiters in the plaintext string of the subscription topic information is consistent with the number of the second delimiters in the plaintext string of the monitoring interaction information;
均判断为是时,基于所述第一分隔符和所述第二分隔符对所述订阅主题信息的明文字符串和所述监控交互信息的明文字符串进行分割分别生成订阅主题数组和交互信息数组。When both are judged to be yes, segment the plaintext string of the subscription topic information and the plaintext string of the monitoring interaction information based on the first delimiter and the second delimiter to generate subscription topic arrays and interaction information respectively array.
具体的,监控云平台生成密钥对后,将公钥证书下发给监控设备,监控设备利用从监控云平台获取公钥证书用于对监控交互信息进行加密,使得在其向监控云平台传递监控交互信息时,监控云平台使用相应的私钥可以对其进行解密。所述第一分隔符和所述第二分隔符可以为相同的符号或者不同的符号。Specifically, after the monitoring cloud platform generates a key pair, it sends the public key certificate to the monitoring device, and the monitoring device uses the public key certificate obtained from the monitoring cloud platform to encrypt the monitoring interaction information, so that when it transmits to the monitoring cloud platform When monitoring interaction information, the monitoring cloud platform can decrypt it using the corresponding private key. The first delimiter and the second delimiter may be the same symbol or different symbols.
在上述的云安全监控任务信息交互方法中,监控设备生成所述交互请求信息的方法包括:In the above cloud security monitoring task information interaction method, the method for the monitoring device to generate the interaction request information includes:
获取待生成交互请求消息的订阅主题及其对应的监控交互信息;Obtain the subscription topic of the interaction request message to be generated and the corresponding monitoring interaction information;
当待生成交互请求消息的订阅主题的数量大于一个时,基于订阅主题在监控云平台上对应的服务类型对所述订阅主题进行分组;When the number of subscription topics to be generated for an interaction request message is greater than one, the subscription topics are grouped based on the service type corresponding to the subscription topics on the monitoring cloud platform;
使用所述第一分隔符将同一分组的订阅主题顺序进行拼接生成订阅主题明的文字符串;Using the first delimiter to splice the order of subscription topics in the same group to generate a text string of subscription topics;
使用所述第二分隔符将同一分组的订阅主题对应的交互信息顺序进行拼接生成监控交互信息的明文字符串;Using the second delimiter to sequentially splice the interaction information corresponding to the subscription topic of the same group to generate a plaintext string of the monitoring interaction information;
使用服务器提供的公钥对所述订阅主题明的文字符串和所述监控交互信息的明文字符串进行加密生成所述交互请求信息。The public key provided by the server is used to encrypt the plaintext string of the subscription topic and the plaintext string of the monitoring interaction information to generate the interaction request information.
具体的,所述监控云平台可以在同一个服务器或多个服务器上运行多个不同类型的监控管理服务程序以适应不同的使用场景,例如可以将系统消息处理服务和业务消息处理服务进行分隔,或者面向不同场所的监控设备的消息处理服务进行分隔,简化业务处理逻辑,避免信息耦合产生数据错误。监控设备侧基于监控交互消息对应的服务类型不同,对监控交互消息进行分组合并,以减小设备与监控云平台之前所传递信息之中的冗余数据,提高了交互效率。Specifically, the monitoring cloud platform can run multiple different types of monitoring management service programs on the same server or multiple servers to adapt to different usage scenarios, for example, the system message processing service and business message processing service can be separated, Or separate message processing services for monitoring devices in different places to simplify business processing logic and avoid data errors caused by information coupling. Based on the different service types corresponding to the monitoring interaction messages, the monitoring device side groups and merges the monitoring interaction messages to reduce redundant data in the information previously transmitted between the device and the monitoring cloud platform and improve interaction efficiency.
在上述的云安全监控任务信息交互方法中,将所述监控交互信息输入与所述订阅主题信息关联的监控设备的步骤具体包括:In the above cloud security monitoring task information interaction method, the step of inputting the monitoring interaction information into the monitoring device associated with the subscription topic information specifically includes:
将所述订阅主题数组中的每一个订阅主题与数据库中保存的订阅主题列表相匹配;Matching each subscription topic in the subscription topic array with a list of subscription topics saved in the database;
根据匹配结果确定与所述订阅主题数组中每一个订阅主题相对应的监控设备;determining a monitoring device corresponding to each subscription topic in the subscription topic array according to the matching result;
将所述交互信息数组中的每一个交互信息输入到相应的监控设备。Each interaction information in the interaction information array is input to a corresponding monitoring device.
具体的,所述监控云平台在数据库中存储有一个订阅主题列表并根据与监控设备之间的交互情况对该订阅主题列表进行动态更新,用户可以通过所述监控云平台的后台管理界面对所述订阅主题列表进行维护,包括新增订阅主题、将订阅主题与监控设备进行关联、删除没有监控设备订阅的订阅主题以及修改订阅主题及其监控交互信息等。Specifically, the monitoring cloud platform stores a subscription topic list in the database and dynamically updates the subscription topic list according to the interaction with the monitoring device, and the user can use the background management interface of the monitoring cloud platform. Maintain the above subscription topic list, including adding a subscription topic, associating a subscription topic with a monitoring device, deleting a subscription topic that is not subscribed by a monitoring device, modifying a subscription topic and its monitoring interaction information, etc.
在上述实施方式的技术方案中,对从所述监控设备上报的交互请求信息进行解密和解码之后,对其交互请求信息中的一个或多个订阅主题与所这订阅主题列表中的订阅主题相匹配,从而确定关联的监控设备以提交每个订阅主题相应的监控交互信息,使得该监控设备对所述监控交互信息进行校验以判断是否需要变更所述订阅主题信息所关联的任务发布信息。In the technical solution of the above embodiment, after decrypting and decoding the interaction request information reported from the monitoring device, one or more subscription topics in the interaction request information are related to the subscription topics in the subscription topic list. matching, so as to determine the associated monitoring device to submit the monitoring interaction information corresponding to each subscription topic, so that the monitoring device checks the monitoring interaction information to determine whether the task release information associated with the subscription topic information needs to be changed.
在上述的云安全监控任务信息交互方法中,在将所述订阅主题数组中的每一个订阅主题与数据库中保存的订阅主题列表相匹配的步骤之后,还包括:In the above cloud security monitoring task information interaction method, after the step of matching each subscription topic in the subscription topic array with the subscription topic list stored in the database, it also includes:
所述订阅主题数组中的一个或多个订阅主题与所述订阅主题列表中的订阅主题不匹配时,将所述监控设备的消息交互模式变更为发布模式;When one or more subscription topics in the subscription topic array do not match the subscription topics in the subscription topic list, change the message interaction mode of the monitoring device to a publishing mode;
在数据库中新增所述不匹配的订阅主题;Adding the unmatched subscription topic in the database;
展示所述新增的订阅主题;Display the newly added subscription topic;
接收用户在后台配置的订阅所述订阅主题的监控设备信息,所述监控设备信息包括所述监控设备的物理地址信息;receiving the monitoring device information configured by the user in the background to subscribe to the subscription topic, the monitoring device information including the physical address information of the monitoring device;
将所述订阅主题的监控交互信息下发给所述监控设备。Sending the monitoring interaction information of the subscribed topic to the monitoring device.
具体的,监控设备默认采用订阅模式订阅监控云平台中发布的监控任务订阅主题,当监控设备需要与其它监控设备进行监控任务信息交互时,可以直接在与所述监控云平台的交互信息中携带新的订阅主题,监控云平台会自动将提交这些订阅主题的交互信息变更为发布模式以发布这些新增的订阅主题,用户可以在后台管理页面中配置需要订阅这些订阅主题的监控设备,进而从所述监控云平台中获取相应的监控交互信息。Specifically, the monitoring device adopts the subscription mode by default to subscribe to the monitoring task subscription topic published in the monitoring cloud platform. When the monitoring device needs to interact with other monitoring devices to monitor task information, it can be carried directly in the interaction information with the monitoring cloud platform For new subscription topics, the monitoring cloud platform will automatically change the interactive information submitted to these subscription topics to the publishing mode to publish these newly added subscription topics. Users can configure monitoring devices that need to subscribe to these subscription topics on the background management page, and then from The corresponding monitoring interaction information is obtained from the monitoring cloud platform.
本发明实施例提出了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本发明第一方面中任一项所述的云安全监控任务信息交互方法。An embodiment of the present invention provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the cloud security monitoring task information interaction method described in any one of the first aspects of the present invention is implemented.
图4为一个实施例中装置的硬件组成示意图。可以理解的是,图4仅仅示出了装置的简化设计。在实际应用中,装置还可以分别包含必要的其他元件,包含但不限于任意数量的输入/输出系统、处理器、控制器、存储器等,而所有可以实现本申请实施例的大数据管理方法的装置都在本申请的保护范围之内。Fig. 4 is a schematic diagram of the hardware composition of the device in an embodiment. It will be understood that Fig. 4 only shows a simplified design of the device. In practical applications, the device can also include other necessary components, including but not limited to any number of input/output systems, processors, controllers, memories, etc. devices are within the scope of protection of the present application.
存储器包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read至only memory,ROM)、可擦除可编程只读存储器(erasable programmable readonly memory,EPROM)、或便携式只读存储器(compact disc read至only memory,CD至ROM),该存储器用于相关指令及数据。Memory includes but not limited to random access memory (random access memory, RAM), read only memory (read to only memory, ROM), erasable programmable read only memory (erasable programmable readonly memory, EPROM), or portable only memory Read memory (compact disc read to only memory, CD to ROM), which is used for related instructions and data.
输入系统用于输入数据和/或信号,以及输出系统用于输出数据和/或信号。输出系统和输入系统可以是独立的器件,也可以是一个整体的器件。The input system is used to input data and/or signals, and the output system is used to output data and/or signals. The output system and the input system can be independent devices or an integrated device.
处理器可以包括是一个或多个处理器,例如包括一个或多个中央处理器(centralprocessing unit,CPU),在处理器是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。处理器还可以包括一个或多个专用处理器,专用处理器可以包括GPU、FPGA等,用于进行加速处理。The processor may include one or more processors, such as one or more central processing units (central processing unit, CPU). In the case where the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU. CPU. The processor may also include one or more special-purpose processors, and the special-purpose processor may include GPU, FPGA, etc., for accelerated processing.
存储器用于存储网络设备的程序代码和数据。Memory is used to store program codes and data for network devices.
处理器用于调用该存储器中的程序代码和数据,执行上述方法实施例中的步骤。具体可参见方法实施例中的描述,在此不再赘述。The processor is used to call the program codes and data in the memory to execute the steps in the above method embodiments. For details, refer to the description in the method embodiments, and details are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统和方法,可以通过其它的方式实现。例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。所显示或讨论的相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,系统或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the division of this unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored, or not implement. The mutual coupling, or direct coupling, or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of systems or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程系统。该计算机指令可以存储在计算机可读存储介质中,或者通过该计算机可读存储介质进行传输。该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是只读存储器(read至onlymemory,ROM),或随机存储存储器(random access memory,RAM),或磁性介质,例如,软盘、硬盘、磁带、磁碟、或光介质,例如,数字通用光盘(digital versatile disc,DVD)、或者半导体介质,例如,固态硬盘(solid state disk,SSD)等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable system. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server, or data center to another via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) A website site, computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium can be read-only memory (read to only memory, ROM), or random access memory (random access memory, RAM), or magnetic medium, for example, floppy disk, hard disk, magnetic tape, magnetic disk, or optical medium, for example, digital A universal optical disk (digital versatile disc, DVD), or a semiconductor medium, for example, a solid state disk (solid state disk, SSD) and the like.
如图5所示,本发明的第二方面提出了一种云安全监控任务信息交互系统,包括:As shown in Figure 5, the second aspect of the present invention proposes a cloud security monitoring task information interaction system, including:
接收模块,用于接收云安全监控设备发送的监控交互请求消息,所述交互请求消息包含预先配置的监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息;The receiving module is used to receive the monitoring interaction request message sent by the cloud security monitoring device, and the interaction request message includes the identity information of the pre-configured monitoring device, the address information of the message service module, the subscription topic information and the monitoring interaction information;
连接模块,用于根据所述地址信息建立所述监控设备与所述消息服务模块的通信连接;A connection module, configured to establish a communication connection between the monitoring device and the message service module according to the address information;
输入模块,用于将所述监控交互信息输入与所述订阅主题信息关联的监控设备;An input module, configured to input the monitoring interaction information into a monitoring device associated with the subscription topic information;
判断模块,用于对所述监控交互信息进行校验以判断是否需要变更所述订阅主题信息所关联的任务发布信息;判断为是,则将所述监控交互信息写入内存队列等待异步线程池模块对其执行持久化操作;A judging module, configured to check the monitoring interaction information to determine whether it is necessary to change the task release information associated with the subscription topic information; if it is judged to be yes, then write the monitoring interaction information into a memory queue and wait for an asynchronous thread pool The module performs persistent operations on it;
所述判断模块,还用于根据所述监控设备的身份标识信息判断所述内存队列中是否存在需要向所述监控设备下发的任务信息;判断为是,则将所述任务信息封装加密后通过所述消息服务模块下发给所述监控设备。The judging module is further configured to judge whether there is task information that needs to be sent to the monitoring device in the memory queue according to the identity information of the monitoring device; if it is judged to be yes, the task information is encapsulated and encrypted Send it to the monitoring device through the message service module.
具体的,本发明提出的云安全监控任务信息交互方法应用于监控云平台,所述监控云平台通过MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)协议的消息发布/订阅机制与监控设备实时交互。所述监控云平台与所述监控设备之间使用约定的Topic(订阅主题)进行云安全监控交互。在MQTT协议下,交互方的消息交互模式包括Publish(发布)模式和Subscribe(订阅)模式。所述监控设备可以采用Publish模式将Publish消息到所述监控云平台调用对应订阅主题的服务接口,也可以采用订阅模式订阅所述监控云平台上的任意订阅主题用于接收该订阅主题下的服务消息通知。所述监控设备可以通过监控设备命令Topic簇获取应用即时命令,并上报执行结果。在返回结果前,会将要变更的数据发送到线程池中,由异步线程将变更的监控设备的信息发送到约定的话题Topic中,再由EMQX消息服务发送到该监控设备。具体的,在本发明一些实施方式的技术方案中,监控设备通过与监控云平台约定好的加密和编码方式,对监控设备的请求信息进行加密,并使用HTTPS(Hyper Text Transfer Protocol over Secure Socket Layer,安全的超文本传输协议通道)协议将请求信息发送到统一API(Application ProgrammingInterface,应用程序编程接口)网关。统一API网关将请求转发到监控设备寻址系统中,由监控设备寻址系统对该请求信息进行解密和解码,根据监控云平台的配置数据,计算监控设备所需要连接的EMQX消息服务地址和Topic,从而实现负载均衡以及提高容错能力。所述监控设备在获取到EMQX消息服务地址和Topic后,与EMQX消息服务创建MQTT通讯连接。EMQX消息服务在收到监控设备的请求信息后,将其推送到对应Topic的监控设备接入系统,由监控设备接入系统对请求信息进行解密和解码,以及对解码后的数据进行校验,检查该请求信息是否变更在监控云平台上对应Topic的信息,需要变更则将数据保存至内存队列中,由异步线程池进行消费,并持久化。监控云平台根据监控设备的Mac(Media Access Control,媒体介入控制层,又称物理地址)地址或者监控设备ID(Identity document,身份证标识号)来判断是否有任务需要下发给该监控设备,如果有任务需要下发,则将任务封装加密后,发送到EMQX消息服务,由EMQX消息服务将数据推送给监控设备端。Specifically, the cloud security monitoring task information interaction method proposed by the present invention is applied to the monitoring cloud platform, and the monitoring cloud platform interacts with the monitoring equipment in real time through the message publishing/subscribing mechanism of the MQTT (Message Queuing Telemetry Transport) protocol . An agreed Topic (subscription topic) is used between the monitoring cloud platform and the monitoring device to perform cloud security monitoring interaction. Under the MQTT protocol, the message interaction modes of the interacting parties include Publish (publish) mode and Subscribe (subscribe) mode. The monitoring device can use the Publish mode to send the Publish message to the monitoring cloud platform to call the service interface of the corresponding subscription topic, and can also use the subscription mode to subscribe to any subscription topic on the monitoring cloud platform to receive services under the subscription topic notification. The monitoring device can obtain the application instant command through the monitoring device command topic cluster, and report the execution result. Before returning the result, the data to be changed will be sent to the thread pool, and the asynchronous thread will send the information of the changed monitoring device to the agreed topic Topic, and then send it to the monitoring device by the EMQX message service. Specifically, in the technical solutions of some embodiments of the present invention, the monitoring device encrypts the request information of the monitoring device through an encryption and encoding method agreed upon with the monitoring cloud platform, and uses HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer , a secure hypertext transfer protocol channel) protocol to send the request information to a unified API (Application Programming Interface, application programming interface) gateway. The unified API gateway forwards the request to the monitoring device addressing system, and the monitoring device addressing system decrypts and decodes the request information, and calculates the EMQX message service address and Topic that the monitoring device needs to connect to according to the configuration data of the monitoring cloud platform , so as to achieve load balancing and improve fault tolerance. After the monitoring device obtains the EMQX message service address and Topic, it establishes an MQTT communication connection with the EMQX message service. After the EMQX message service receives the request information from the monitoring device, it pushes it to the monitoring device access system corresponding to the Topic, and the monitoring device access system decrypts and decodes the request information, and verifies the decoded data. Check whether the request information has changed the information corresponding to the topic on the monitoring cloud platform. If it needs to be changed, the data will be saved in the memory queue, consumed by the asynchronous thread pool, and persisted. The monitoring cloud platform judges whether there is a task to be sent to the monitoring device according to the Mac (Media Access Control, media intervention control layer, also known as the physical address) address of the monitoring device or the monitoring device ID (Identity document, ID number). If there is a task that needs to be delivered, the task will be encapsulated and encrypted, and sent to the EMQX message service, and the EMQX message service will push the data to the monitoring device.
此外,在本发明实施例中,该系统还用于:In addition, in the embodiment of the present invention, the system is also used for:
接收监控设备的注册请求;Receive registration requests from monitoring devices;
接收所述监控设备在开启状态下周期性发送的心跳消息,所述心跳消息包括所述监控设备的物理地址信息、监控开启状态信息以及认证开启状态信息。Receive a heartbeat message periodically sent by the monitoring device in the turned-on state, where the heartbeat message includes physical address information of the monitoring device, monitoring-on state information, and authentication-on state information.
监控设备注册并启动后,每分钟向监控云平台发布一条携带本机Mac地址、监控开启状态以及认证开启状态的心跳消息,监控云平台根据监控设备的最新心跳消息记录监控设备的实时在线状态,即监控设备处于在线的状态或处于离线的状态。监控云平台的展示模块通过其前端页面或后台页面展示监控设备的在线状态或其它状态信息。After the monitoring device is registered and started, it sends a heartbeat message to the monitoring cloud platform every minute, carrying the local Mac address, monitoring enabled status, and authentication enabled status. The monitoring cloud platform records the real-time online status of the monitoring device according to the latest heartbeat message of the monitoring device. That is, the monitoring device is online or offline. The display module of the monitoring cloud platform displays the online status or other status information of the monitoring equipment through its front page or background page.
在上述的云安全监控任务信息交互过程中,还包括:In the above cloud security monitoring task information interaction process, it also includes:
接收所述监控设备在开机开启后或者执行任意任务后所发送的心跳消息,所述心跳消息包括所述监控设备的物理地址信息以及国际移动设备身份码(InternationalMobile Equipment Identity,IMEI,IMEI)信息;Receiving a heartbeat message sent by the monitoring device after it is turned on or after performing any task, the heartbeat message includes physical address information of the monitoring device and International Mobile Equipment Identity (IMEI, IMEI) information;
根据所这监控设备的物理地址信息在数据库查询所述监控设备的IMEI;Query the IMEI of the monitoring device in the database according to the physical address information of the monitoring device;
当从数据库查询到的所述监控设备的IMEI与所述心跳消息携带的IMEI相同时,向所述监控设备返回当前无监控任务的信息;When the IMEI of the monitoring device queried from the database is the same as the IMEI carried in the heartbeat message, return information that there is currently no monitoring task to the monitoring device;
否则将从数据库查询到的IMEI对应的监控任务下发给所述监控设备;Otherwise, send the monitoring task corresponding to the IMEI queried from the database to the monitoring device;
接收用户在后台配置的针对所述监控设备的IMEI更新信息或IMEI回滚信息;receiving IMEI update information or IMEI rollback information for the monitoring device configured by the user in the background;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI写入数据库;Write the IMEI corresponding to the IMEI update information or the IMEI rollback information into the database;
将所述IMEI更新信息或IMEI回滚信息对应的IMEI推送至所述监控设备以使所述监控设备更新IMEI,并在所述监控设备的状态栏中将更新或回滚的参数加1,表示当前已经更新或回滚了一次。Push the IMEI corresponding to the IMEI update information or IMEI rollback information to the monitoring device so that the monitoring device updates the IMEI, and add 1 to the updated or rolled back parameter in the status column of the monitoring device, indicating Currently updated or rolled back once.
具体的,监控设备在开机启动或执行任意任务后,向监控云平台发送一条携带本监控设备Mac地址以及当前监控IMEI的心跳消息,监控云平台收到该心跳消息后,根据该Mac地址查询相应监控设备在数据库中保存的IMEI,将其与心跳消息中的当前IMEI进行对比。若当前IMEI与数据库中保存的IMEI相同时,则监控云平台向该监控设备返回当前无更新的信息。若当前IMEI与数据库中保存的IMEI不一致时,则监控云平台将数据库保存的IMEI所对应的监控任务下发给该监控设备。监控设备在执行完毕该监控任务后,再次向监控云平台发送携带本监控设备Mac地址以及当前IMEI的心跳消息,重复上述过程直至监控设备上的IMEI与监控云平台数据库中保存的IMEI一致。当用户需要针对某一监控设备进行IMEI的更新或者回滚时,在监控云平台的后台配置该监控设备的IMEI后,监控云平台实时将该IMEI下发给相应的监控设备。进一步的,用户可以在监控云平台的后台针对某一批监控设备(例如同一型号的监控设备或者同一场所的监控设备等)进行监控版本配置,并批量下发给相应的监控设备执行版本变更。Specifically, after the monitoring device starts up or performs any task, it sends a heartbeat message carrying the Mac address of the monitoring device and the current monitoring IMEI to the monitoring cloud platform. After receiving the heartbeat message, the monitoring cloud platform queries the corresponding Monitor the IMEI saved by the device in the database and compare it with the current IMEI in the heartbeat message. If the current IMEI is the same as the IMEI stored in the database, the monitoring cloud platform returns information that there is currently no update to the monitoring device. If the current IMEI is inconsistent with the IMEI stored in the database, the monitoring cloud platform sends the monitoring task corresponding to the IMEI stored in the database to the monitoring device. After the monitoring device completes the monitoring task, it sends a heartbeat message carrying the Mac address of the monitoring device and the current IMEI to the monitoring cloud platform again, and repeats the above process until the IMEI on the monitoring device is consistent with the IMEI stored in the monitoring cloud platform database. When the user needs to update or roll back the IMEI for a certain monitoring device, after configuring the IMEI of the monitoring device in the background of the monitoring cloud platform, the monitoring cloud platform will send the IMEI to the corresponding monitoring device in real time. Furthermore, the user can perform monitoring version configuration for a certain batch of monitoring devices (such as monitoring devices of the same model or monitoring devices in the same location) in the background of the monitoring cloud platform, and batch release to corresponding monitoring devices to perform version changes.
此外,在本发明实施例钟,该系统还用于对所述监控设备进行AI异常预警操作,具体的,获取所述监控设备在N个时间周期发送的N个心跳消息,其中,N大于1;将所述N个心跳信息设置为时间序列组,所述时间序列组包含N维时间序列,每一个时间序列设置一键-值对key-value,所述键-值对与心跳包内容一一对应。key-value是一种分布式存储系统的存储形式。key value本意是根据关键字取值,其中,key是关键字,value是值,Key-value数据库是一种以键值对存储数据的一种数据库,每个键都会对应一个唯一的值,具有极高的并发读写性能。例如,心跳包包含了A和B信息,那么在相应的键-值对中,也需要包含同样的信息;将所述N维时间序列分别输入至M*N个异常预测器中,其中一个时间序列对应M个异常预测器,M为正整数且小于N;将N个时间序列的键-值对输入对称残差网络,通过所述对称残差网络提取所述键-值对的第一特征;通过注意力机制将所述第一特征对进行权重量化,得到量化后的第二特征;将所述量化后的第二特征输入双向长短期记忆网络,获取预测出的第N+1周期的键-值对;对所述第N+1周期的键-值对进行预警判断,若所述第N+1周期的键-值对超出预设阈值范围,则判定所述监控设备异常。其中,对称残差网络中包括卷积模块和解卷积模块,卷积模块中包括K个残差块,所述解卷积模块中包括K个解卷积块,其中,所述K为大于或等于1的整数;通过所述对称残差网络提取所述键-值对的第一特征,具体包括:In addition, in the embodiment of the present invention, the system is also used to perform an AI abnormal early warning operation on the monitoring device, specifically, to obtain N heartbeat messages sent by the monitoring device in N time periods, where N is greater than 1 ; The N heartbeat information is set as a time series group, the time series group includes an N-dimensional time series, each time series is provided with a key-value pair key-value, and the key-value pair is the same as the content of the heartbeat packet One to one correspondence. Key-value is a storage form of a distributed storage system. The original meaning of key value is to get the value according to the keyword, where key is the keyword and value is the value. The key-value database is a database that stores data in key-value pairs. Each key corresponds to a unique value. Extremely high concurrent read and write performance. For example, if the heartbeat packet contains A and B information, then the corresponding key-value pair also needs to contain the same information; input the N-dimensional time series into M*N anomaly predictors respectively, and one of the time The sequence corresponds to M abnormal predictors, M is a positive integer and less than N; the key-value pairs of N time series are input into the symmetric residual network, and the first feature of the key-value pair is extracted through the symmetric residual network ; Quantify the weight of the first feature through the attention mechanism to obtain the quantized second feature; input the quantized second feature into the bidirectional long-term short-term memory network to obtain the predicted N+1 cycle A key-value pair; performing an early warning judgment on the key-value pair of the N+1th cycle, and if the key-value pair of the N+1th cycle exceeds a preset threshold range, it is determined that the monitoring device is abnormal. Wherein, the symmetric residual network includes a convolution module and a deconvolution module, the convolution module includes K residual blocks, and the deconvolution module includes K deconvolution blocks, wherein the K is greater than or An integer equal to 1; extracting the first feature of the key-value pair through the symmetric residual network, specifically including:
通过所述卷积模块中的K个残差块将所述局部特征进行卷积运算,得到中间特征;通过所述解卷积模块中的K个解卷积块将所述中间特征进行解卷积运算,得到所述访问量的第一特征;通过所述解卷积模块中的K个解卷积块将所述中间特征进行解卷积运算,得到所述访问量的第一特征。Convolve the local features through the K residual blocks in the convolution module to obtain intermediate features; deconvolute the intermediate features through the K deconvolution blocks in the deconvolution module A product operation is performed to obtain the first feature of the access volume; the intermediate features are deconvoluted through K deconvolution blocks in the deconvolution module to obtain the first feature of the access volume.
在上述的云安全监控任务信息交互过程中,还包括:In the above cloud security monitoring task information interaction process, it also includes:
接收用户在后台配置的针对所述监控设备的监控开启状态信息和/或认证开启状态信息,所述监控开启状态信息为将所述监控设备的监控状态配置为开启状态或关闭状态,所述认证开启状态信息为将所述监控设备的认证状态配置为开启状态或关闭状态;receiving monitoring enabled status information and/or authentication enabled status information for the monitoring device configured by the user in the background, the monitoring enabled status information is configuring the monitoring status of the monitoring device as an enabled state or an disabled state, and the authentication The open state information is to configure the authentication state of the monitoring device as an open state or a closed state;
将所述监控开启状态信息和/或认证开启状态信息写入数据库;Writing the monitoring enabled status information and/or authentication enabled status information into a database;
接收所述监控设备所发送的心跳消息;receiving a heartbeat message sent by the monitoring device;
当所述心跳消息中携带的所述监控设备的监控开启状态信息和/或认证开启状态信息与数据库中配置的所述监控设备的监控开启状态信息和/或认证开启状态信息不一致时,向所述监控设备下发相应的监控开关任务和/或认证开关任务;When the monitoring enabled status information and/or authentication enabled status information of the monitoring device carried in the heartbeat message is inconsistent with the monitoring enabled status information and/or authentication enabled status information of the monitoring device configured in the database, the The above-mentioned monitoring equipment issues corresponding monitoring switch tasks and/or authentication switch tasks;
接收所述监控设备返回的所述监控开关任务和/或认证开关任务的执行结果;receiving an execution result of the monitoring switching task and/or authentication switching task returned by the monitoring device;
当所述监控开关任务和/或认证开关任务的执行结果为失败时,再次向所述监控设备下发所述监控开关任务和/或认证开关任务直至所述监控设备返回执行结果为成功的信息。When the execution result of the monitoring switching task and/or the authentication switching task is a failure, the monitoring switching task and/or the authentication switching task are sent to the monitoring device again until the monitoring device returns information that the execution result is successful .
具体的,监控设备每次心跳上报监控开启状态以及认证开启状态,若两个状态之中的任一个状态信息与监控云平台的数据库中所保存的相应状态信息不同,则监控云平台下发相应的监控开关任务或认证开关任务给该监控设备,直至监控设备上报的监控开启状态信息以及认证开启状态信息与监控云平台数据库中保存的相应状态信息一致。当用户需要关闭或重新开启某个监控设备的监控状态或认证状态时,可以在监控云平台的后台对其进行配置,监控云平台根据配置的状态与监控设备上报的心跳消息中的状态进行匹配后,下发相对应的开关任务使得该监控设备执行该任务以变更相应状态。示例性的,监控设备接收到监控开启任务后,执行该监控开启任务,并在执行完毕后向监控云平台上报该监控开启任务的执行结果。如果监控设备上报任务执行失败的消息,使监控云平台再次下发监控开启任务给该监控设备,直至监控设备在心跳消息中上报的监控状态与监控云平台的数据库中保存的该监控设备的监控开启状态一致。Specifically, each heartbeat of the monitoring device reports the monitoring enabled status and authentication enabled status. If any status information in the two statuses is different from the corresponding status information stored in the database of the monitoring cloud platform, the monitoring cloud platform will issue the corresponding The monitoring switch task or the authentication switch task is given to the monitoring device until the monitoring enabled status information and authentication enabled status information reported by the monitoring device are consistent with the corresponding status information stored in the monitoring cloud platform database. When the user needs to turn off or restart the monitoring status or authentication status of a monitoring device, it can be configured in the background of the monitoring cloud platform, and the monitoring cloud platform matches the status in the heartbeat message reported by the monitoring device according to the configured status Afterwards, the corresponding switch task is issued to make the monitoring device execute the task to change the corresponding state. Exemplarily, the monitoring device executes the monitoring enabling task after receiving the monitoring enabling task, and reports the execution result of the monitoring enabling task to the monitoring cloud platform after the execution is completed. If the monitoring device reports a task execution failure message, the monitoring cloud platform will send the monitoring start task to the monitoring device again until the monitoring status reported by the monitoring device in the heartbeat message is consistent with the monitoring status of the monitoring device saved in the database of the monitoring cloud platform. Same open state.
当监控设备需要重启时,根据该监控设备的Mac地址在监控云平台对该监控设备下发重启任务,监控设备接收任务后,执行重启指令进行重启。When the monitoring device needs to be restarted, according to the Mac address of the monitoring device, the monitoring cloud platform sends a restart task to the monitoring device. After receiving the task, the monitoring device executes the restart command to restart.
进一步的,在上述的云安全监控任务信息交互过程中,还包括:Further, in the above-mentioned cloud security monitoring task information interaction process, it also includes:
接收用户在后台配置的针对所述监控设备的检查指令,所述检查指令包括所述监控设备的物理地址信息;receiving an inspection instruction for the monitoring device configured by the user in the background, the inspection instruction including physical address information of the monitoring device;
向所述物理地址信息对应的监控设备下发所述检查指令;issuing the inspection instruction to the monitoring device corresponding to the physical address information;
接收所述监控设备返回的所述检查指令的执行结果;receiving the execution result of the inspection instruction returned by the monitoring device;
展示所述执行结果。Display the execution result.
具体的,用户在监控云平台输入需要检查的监控设备Mac及检查命令,监控云平台将命令发布给指定监控设备,监控设备接到任务后,运行指定命令,并将命令返回值上报监控云平台,监控云平台接收到命令返回结果,向用户展示。Specifically, the user enters the Mac of the monitoring device to be checked and the inspection command on the monitoring cloud platform, and the monitoring cloud platform issues the command to the designated monitoring device. After the monitoring device receives the task, it runs the designated command and reports the return value of the command to the monitoring cloud platform , the monitoring cloud platform receives the command and returns the result, and displays it to the user.
进一步的,在上述的云安全监控任务信息交互方法中,所述交互请求信息由所述监控设备使用服务器提供的公钥加密得到,交互请求信息执行解密和解码操作,获取到地址信息和订阅信息,该步骤具体包括:Further, in the above cloud security monitoring task information interaction method, the interaction request information is encrypted by the monitoring device using the public key provided by the server, and the interaction request information is decrypted and decoded to obtain address information and subscription information , this step specifically includes:
使用与所述公钥相应的私钥对所述交互请求信息进行解密得到所述监控设备的身份标识信息、消息服务模块的地址信息、订阅主题信息以及监控交互信息的明文字符串;Using the private key corresponding to the public key to decrypt the interaction request information to obtain the identity information of the monitoring device, the address information of the message service module, subscription topic information, and a plaintext string of monitoring interaction information;
判断所述订阅主题信息的明文字符串中是否包含预设的第一分隔符以及所述监控交互信息的明文字符串中是否包含预设的第二分隔符;judging whether the plaintext string of the subscription topic information contains a preset first delimiter and whether the plaintext string of the monitoring interaction information contains a preset second delimiter;
判断所述订阅主题信息的明文字符串中所述第一分隔符的数量与所述监控交互信息的明文字符串中所述第二分隔符的数量是否一致;judging whether the number of the first delimiters in the plaintext string of the subscription topic information is consistent with the number of the second delimiters in the plaintext string of the monitoring interaction information;
均判断为是时,基于所述第一分隔符和所述第二分隔符对所述订阅主题信息的明文字符串和所述监控交互信息的明文字符串进行分割分别生成订阅主题数组和交互信息数组。When both are judged to be yes, segment the plaintext string of the subscription topic information and the plaintext string of the monitoring interaction information based on the first delimiter and the second delimiter to generate subscription topic arrays and interaction information respectively array.
具体的,监控云平台生成密钥对后,将公钥证书下发给监控设备,监控设备利用从监控云平台获取公钥证书用于对监控交互信息进行加密,使得在其向监控云平台传递监控交互信息时,监控云平台使用相应的私钥可以对其进行解密。所述第一分隔符和所述第二分隔符可以为相同的符号或者不同的符号。Specifically, after the monitoring cloud platform generates a key pair, it sends the public key certificate to the monitoring device, and the monitoring device uses the public key certificate obtained from the monitoring cloud platform to encrypt the monitoring interaction information, so that when it transmits to the monitoring cloud platform When monitoring interaction information, the monitoring cloud platform can decrypt it using the corresponding private key. The first delimiter and the second delimiter may be the same symbol or different symbols.
在上述的云安全监控任务信息交互方法中,监控设备生成所述交互请求信息的方法包括:In the above cloud security monitoring task information interaction method, the method for the monitoring device to generate the interaction request information includes:
获取待生成交互请求消息的订阅主题及其对应的监控交互信息;Obtain the subscription topic of the interaction request message to be generated and the corresponding monitoring interaction information;
当待生成交互请求消息的订阅主题的数量大于一个时,基于订阅主题在监控云平台上对应的服务类型对所述订阅主题进行分组;When the number of subscription topics to be generated for an interaction request message is greater than one, the subscription topics are grouped based on the service type corresponding to the subscription topics on the monitoring cloud platform;
使用所述第一分隔符将同一分组的订阅主题顺序进行拼接生成订阅主题明的文字符串;Using the first delimiter to splice the order of subscription topics in the same group to generate a text string of subscription topics;
使用所述第二分隔符将同一分组的订阅主题对应的交互信息顺序进行拼接生成监控交互信息的明文字符串;Using the second delimiter to sequentially splice the interaction information corresponding to the subscription topic of the same group to generate a plaintext string of the monitoring interaction information;
使用服务器提供的公钥对所述订阅主题明的文字符串和所述监控交互信息的明文字符串进行加密生成所述交互请求信息。The public key provided by the server is used to encrypt the plaintext string of the subscription topic and the plaintext string of the monitoring interaction information to generate the interaction request information.
具体的,所述监控云平台可以在同一个服务器或多个服务器上运行多个不同类型的监控管理服务程序以适应不同的使用场景,例如可以将系统消息处理服务和业务消息处理服务进行分隔,或者面向不同场所的监控设备的消息处理服务进行分隔,简化业务处理逻辑,避免信息耦合产生数据错误。监控设备侧基于监控交互消息对应的服务类型不同,对监控交互消息进行分组合并,以减小设备与监控云平台之前所传递信息之中的冗余数据,提高了交互效率。Specifically, the monitoring cloud platform can run multiple different types of monitoring management service programs on the same server or multiple servers to adapt to different usage scenarios, for example, the system message processing service and business message processing service can be separated, Or separate message processing services for monitoring devices in different places to simplify business processing logic and avoid data errors caused by information coupling. Based on the different service types corresponding to the monitoring interaction messages, the monitoring device side groups and merges the monitoring interaction messages to reduce redundant data in the information previously transmitted between the device and the monitoring cloud platform and improve interaction efficiency.
在上述的云安全监控任务信息交互方法中,将所述监控交互信息输入与所述订阅主题信息关联的监控设备的步骤具体包括:In the above cloud security monitoring task information interaction method, the step of inputting the monitoring interaction information into the monitoring device associated with the subscription topic information specifically includes:
将所述订阅主题数组中的每一个订阅主题与数据库中保存的订阅主题列表相匹配;Matching each subscription topic in the subscription topic array with a list of subscription topics saved in the database;
根据匹配结果确定与所述订阅主题数组中每一个订阅主题相对应的监控设备;determining a monitoring device corresponding to each subscription topic in the subscription topic array according to the matching result;
将所述交互信息数组中的每一个交互信息输入到相应的监控设备。Each interaction information in the interaction information array is input to a corresponding monitoring device.
具体的,所述监控云平台在数据库中存储有一个订阅主题列表并根据与监控设备之间的交互情况对该订阅主题列表进行动态更新,用户可以通过所述监控云平台的后台管理界面对所述订阅主题列表进行维护,包括新增订阅主题、将订阅主题与监控设备进行关联、删除没有监控设备订阅的订阅主题以及修改订阅主题及其监控交互信息等。Specifically, the monitoring cloud platform stores a subscription topic list in the database and dynamically updates the subscription topic list according to the interaction with the monitoring device, and the user can use the background management interface of the monitoring cloud platform. Maintain the above subscription topic list, including adding a subscription topic, associating a subscription topic with a monitoring device, deleting a subscription topic that is not subscribed by a monitoring device, modifying a subscription topic and its monitoring interaction information, etc.
本发明提出一种云安全监控任务信息交互方法、系统及计算机可读介质,通过交互形式实现对监控设备的远程实时管理,便于用户及运维人员管理监控设备,同时采用支持轻量级的发布/订阅式消息传输,为低带宽和不稳定的网络环境中的监控设备提供可靠的网络服务,并提供海量连接、高并发、低时延的稳定监控设备接入服务,支持数据加密,提供高安全的监控设备数据传输通道,对监控设备消息进行筛选与转发并通过发送消息来异步执行以提高系统响应速度,支持监控云平台对监控设备指令下发,根据不同指令,获取监控设备的状态信息。The present invention proposes a cloud security monitoring task information interaction method, system and computer-readable medium, which realizes remote real-time management of monitoring equipment through interactive forms, facilitates the management of monitoring equipment by users and operation and maintenance personnel, and adopts lightweight release support /Subscription-based message transmission, providing reliable network services for monitoring devices in low-bandwidth and unstable network environments, and providing stable monitoring device access services with massive connections, high concurrency, and low latency, supporting data encryption, and providing high Secure monitoring device data transmission channel, screen and forward monitoring device messages and execute them asynchronously by sending messages to improve system response speed, support monitoring cloud platform to issue monitoring device commands, and obtain status information of monitoring devices according to different commands .
应当说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者监控设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者监控设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者监控设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Moreover, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or monitoring device comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or monitoring device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or monitoring device comprising said element.
依照本发明的实施例如上文所述,这些实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施例。显然,根据以上描述,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本发明的原理和实际应用,从而使所属技术领域技术人员能很好地利用本发明以及在本发明基础上的修改使用。本发明仅受权利要求书及其全部范围和等效物的限制。Embodiments according to the present invention are described above, and these embodiments do not describe all details in detail, nor do they limit the invention to only the specific embodiments described. Obviously many modifications and variations are possible in light of the above description. This description selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and its modification on the basis of the present invention. The invention is to be limited only by the claims, along with their full scope and equivalents.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211400767.4A CN115766828B (en) | 2022-11-09 | 2022-11-09 | A cloud security monitoring task information interaction method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211400767.4A CN115766828B (en) | 2022-11-09 | 2022-11-09 | A cloud security monitoring task information interaction method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115766828A true CN115766828A (en) | 2023-03-07 |
| CN115766828B CN115766828B (en) | 2025-07-04 |
Family
ID=85368735
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211400767.4A Active CN115766828B (en) | 2022-11-09 | 2022-11-09 | A cloud security monitoring task information interaction method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115766828B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130103729A1 (en) * | 2011-10-24 | 2013-04-25 | Nokia Corporation | Method and apparatus for providing a key-value based storage interface |
| CN103944784A (en) * | 2014-04-23 | 2014-07-23 | 南京邮电大学 | Large-scale-cloud-data-center-oriented server cooperative monitoring method |
| CN115048262A (en) * | 2022-05-25 | 2022-09-13 | 中电信数智科技有限公司 | Method for detecting and monitoring whether APP stops running or not by intelligent terminal |
| CN115051978A (en) * | 2022-08-15 | 2022-09-13 | 广东采日能源科技有限公司 | Equipment monitoring implementation method and system |
-
2022
- 2022-11-09 CN CN202211400767.4A patent/CN115766828B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130103729A1 (en) * | 2011-10-24 | 2013-04-25 | Nokia Corporation | Method and apparatus for providing a key-value based storage interface |
| CN103944784A (en) * | 2014-04-23 | 2014-07-23 | 南京邮电大学 | Large-scale-cloud-data-center-oriented server cooperative monitoring method |
| CN115048262A (en) * | 2022-05-25 | 2022-09-13 | 中电信数智科技有限公司 | Method for detecting and monitoring whether APP stops running or not by intelligent terminal |
| CN115051978A (en) * | 2022-08-15 | 2022-09-13 | 广东采日能源科技有限公司 | Equipment monitoring implementation method and system |
Non-Patent Citations (1)
| Title |
|---|
| 张晓海;操新文;张敏;: "基于自注意力机制的军事命名实体识别", 指挥控制与仿真, no. 06, 15 December 2019 (2019-12-15) * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115766828B (en) | 2025-07-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA2943128C (en) | Computer system to support failover in an event stream processing system | |
| CN111639061B (en) | Data management method, device, medium and electronic equipment in Redis cluster | |
| US10097659B1 (en) | High performance geographically distributed data storage, retrieval and update | |
| US10678619B2 (en) | Unified logs and device statistics | |
| US10409514B2 (en) | IP multicast message transmission for event notifications | |
| US20170126802A1 (en) | Peer-to-peer synchronization protocol for multi-premises hosting of digital content items | |
| JP6191159B2 (en) | Server, backup system, backup method, and computer program | |
| WO2019041930A1 (en) | Inspection method, device and system, computer apparatus, and storage medium | |
| JP2016508638A (en) | Method and system using recursive event listeners in nodes of hierarchical data structures | |
| US9858302B1 (en) | Management of streaming data | |
| US11849037B1 (en) | Cross-region replication of secrets | |
| AU2017272153A1 (en) | Email webclient notification queuing | |
| US8543680B2 (en) | Migrating device management between object managers | |
| CN117376346A (en) | Equipment data processing method and device based on edge calculation and distributed calculation | |
| CN112860505A (en) | Method and device for regulating and controlling distributed clusters | |
| CN112883103A (en) | Method and device for data transfer between clusters | |
| WO2023029485A1 (en) | Data processing method and apparatus, computer device, and computer-readable storage medium | |
| CN115190125A (en) | Monitoring method and device for cache cluster | |
| CN115766828A (en) | Cloud security monitoring task information interaction method and system | |
| US11467731B2 (en) | Client driven multi-site consistency for object storage | |
| CN115086347A (en) | Data synchronization method and device, electronic equipment and storage medium | |
| US10540669B2 (en) | Managing object values and resource consumption | |
| CN111858260A (en) | Information display method, device, equipment and medium | |
| US10304096B2 (en) | Renting a pipe to a storage system | |
| CN114500485B (en) | Data processing method and device |
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 | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20250609 Address after: 710000 Shaanxi Province Xi'an City Yanta District Keji 6th Road 200 No. 4 building 2 unit 1 floor 102 room Applicant after: Wei Li Country or region after: China Address before: 518110 Guangdong Province Shenzhen City Longhua District Guanlan Street Huan Guan Nan Road 72-1 Chuangke Building 423A-425 Applicant before: Shenzhen United Xinye Technology Co.,Ltd. Country or region before: China |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |