CN115941818A - A method for analyzing and controlling a hot-loaded industrial control protocol and a system having the same - Google Patents
A method for analyzing and controlling a hot-loaded industrial control protocol and a system having the same Download PDFInfo
- Publication number
- CN115941818A CN115941818A CN202211430821.XA CN202211430821A CN115941818A CN 115941818 A CN115941818 A CN 115941818A CN 202211430821 A CN202211430821 A CN 202211430821A CN 115941818 A CN115941818 A CN 115941818A
- Authority
- CN
- China
- Prior art keywords
- industrial control
- control protocol
- analysis module
- loading
- library
- 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
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
Description
技术领域technical field
本申请涉及工控协议加载技术领域,尤其涉及一种热加载工控协议解析和控制的方法及具有其的系统。The present application relates to the technical field of industrial control protocol loading, in particular to a method for parsing and controlling a hot loading industrial control protocol and a system thereof.
背景技术Background technique
随着信息技术的发展,工业控制系统逐步走向开放,互联和通用。很多工业控制协议逐渐运行于工业以太网上,其中,工业控制协议的种类五花八门,很多还是工控设备厂商设计的私有协议,并不对外公开。这些都对工控协议的深度解析带来巨大的挑战。With the development of information technology, industrial control systems are gradually becoming open, interconnected and universal. Many industrial control protocols are gradually running on industrial Ethernet. Among them, there are various types of industrial control protocols, many of which are private protocols designed by industrial control equipment manufacturers and are not disclosed to the public. All of these pose huge challenges to the in-depth analysis of industrial control protocols.
传统的工控协议深度解析的实现方式,是在对工控协议有了充分的了解和掌握以后,将某种工控协议深度解析过程硬编码到工控协议解析模块中,当有对应的工控协议报文进入深度解析流程时,就会按照之前硬编码的工控协议深度解析过程对报文进行解析。The traditional implementation of in-depth analysis of industrial control protocols is to hard-code the in-depth analysis process of certain industrial control protocols into the industrial control protocol analysis module after fully understanding and mastering the industrial control protocols. When a corresponding industrial control protocol message enters During the in-depth analysis process, the message will be analyzed according to the previously hard-coded in-depth analysis process of the industrial control protocol.
但是,由于硬编码到工控协议解析的代码已经固定,新增工控协议时需要修改整个解析模块、重启解析模块或重启系统等操作,甚至需要更换设备版本镜像。However, since the code hard-coded into the industrial control protocol analysis has been fixed, when adding an industrial control protocol, it is necessary to modify the entire analysis module, restart the analysis module or restart the system, or even replace the device version image.
发明内容Contents of the invention
本申请一种热加载工控协议解析和控制的方法及具有其的系统,能够解决现有技术中,由于硬编码到工控协议解析的代码已经固定,新增工控协议时需要修改整个解析模块、重启解析模块或重启系统等操作,甚至需要更换设备版本镜像的问题。The present application relates to a hot-loading industrial control protocol analysis and control method and a system thereof, which can solve the problem in the prior art that, since the code hard-coded into the industrial control protocol analysis has been fixed, it is necessary to modify the entire analysis module and restart when adding an industrial control protocol. Operations such as parsing modules or restarting the system may even require changing the device version image.
本申请第一方面提供热加载工控协议解析和控制的方法,包括:The first aspect of the present application provides a method for analyzing and controlling the hot loading industrial control protocol, including:
获取特征库,其中,所述特征库内封装有工控协议的解析识别码;Obtaining a feature library, wherein the feature library is encapsulated with a parsing identification code of an industrial control protocol;
根据预设的目标路径,将所述特征库上传到工控设备,并向所述工控设备发送加载指令,其中,所述工控设备包括工控协议解析模块;Upload the feature library to the industrial control device according to the preset target path, and send a loading instruction to the industrial control device, wherein the industrial control device includes an industrial control protocol analysis module;
所述工控协议解析模块响应于所述加载指令,从所述目标路径加载所述特征库;The industrial control protocol analysis module loads the feature library from the target path in response to the loading instruction;
所述工控协议解析模块基于所述特征库中的所述解析识别码,对工控报文进行解析;The industrial control protocol analysis module analyzes the industrial control message based on the analysis identification code in the feature library;
所述工控设备根据所述工控报文的解析结果,对所述工控报文进行控制。The industrial control device controls the industrial control message according to the parsing result of the industrial control message.
可实现的一种实施方式中,所述工控协议解析模块响应于所述加载指令,从所述目标路径加载所述特征库的步骤,包括:In an achievable implementation manner, the step of loading the feature library from the target path by the industrial control protocol parsing module in response to the loading instruction includes:
所述工控协议解析模块建立动态库以及所述动态库的接口,其中,所述接口至少用于所述工控协议解析模块查询所述特征库当前支持解析的工控协议;The industrial control protocol analysis module establishes a dynamic library and an interface of the dynamic library, wherein the interface is at least used for the industrial control protocol analysis module to query the industrial control protocol currently supported by the feature library;
所述动态库对所述特征库的所述工控协议进行编号。The dynamic library numbers the industrial control protocol of the feature library.
可实现的一种实施方式中,所述根据预设的目标路径,将所述特征库上传到工控设备,并向所述工控设备发送加载指令的步骤,包括:In an achievable implementation manner, the step of uploading the feature library to the industrial control device according to the preset target path, and sending a loading instruction to the industrial control device includes:
基于http或ftp的传输方式,所述特征库通过所述目标路径上传到所述工控设备;Based on the transmission mode of http or ftp, the feature library is uploaded to the industrial control device through the target path;
向所述工控协议解析模块发送加载指令。Send a loading instruction to the industrial control protocol analysis module.
可实现的一种实施方式中,所述工控协议解析模块响应于所述加载指令,从所述目标路径加载所述特征库的步骤包括:In an implementation manner that can be realized, the step of loading the feature library from the target path by the industrial control protocol parsing module in response to the loading instruction includes:
所述工控协议解析模块响应于所述加载指令,将全局函数指针设置赋空值,其中,所述全局函数指针用于指示所述动态库的接口位置;In response to the loading instruction, the industrial control protocol analysis module sets the global function pointer to a null value, wherein the global function pointer is used to indicate the interface location of the dynamic library;
所述工控协议解析模块根据所述动态库的系统调用函数,打开所述动态库,并重新为所述全局函数指针赋值,以使所述工控协议解析模块根据重新赋值的所述全局函数指针调用所述动态库的接口。The industrial control protocol analysis module opens the dynamic library according to the system call function of the dynamic library, and reassigns the global function pointer, so that the industrial control protocol analysis module calls according to the reassigned global function pointer The interface to the dynamic library.
可实现的一种实施方式中,所述工控协议解析模块基于所述特征库中的所述解析识别码,对工控报文进行解析的步骤,包括:In an achievable implementation manner, the step of parsing the industrial control message by the industrial control protocol parsing module based on the parsing identification code in the feature library includes:
所述工控协议解析模块调用所述动态库的接口对所述工控报文进行解析;The industrial control protocol analysis module calls the interface of the dynamic library to analyze the industrial control message;
所述工控协议解析模块接收所述动态库返回的所述解析结果,所述解析结果包括所述工控报文对应的工控协议编号、解析结果内存块和内存块的大小。The industrial control protocol analysis module receives the analysis result returned by the dynamic library, and the analysis result includes the industrial control protocol number corresponding to the industrial control message, the memory block of the analysis result, and the size of the memory block.
可实现的一种实施方式中,所述工控协议解析模块基于所述特征库中的所述解析识别码,对工控报文进行解析的步骤,还包括:In an achievable implementation manner, the step of parsing the industrial control message by the industrial control protocol parsing module based on the parsing identification code in the feature library further includes:
所述工控协议解析模块通过所述动态库的接口向所述动态库下发至少一个规则信息,其中,每个所述规则信息至少包括规则模板名称、工控协议编号、目标字段的数量、以及所述目标字段的匹配规则;The industrial control protocol parsing module sends at least one rule information to the dynamic library through the interface of the dynamic library, wherein each rule information includes at least a rule template name, an industrial control protocol number, the number of target fields, and the Matching rules for the target field described above;
所述动态库将具有相同规则模板名称的规则信息保存在同一个规则模板下,以得到各个规则模板对应的规则链。The dynamic library stores the rule information with the same rule template name under the same rule template, so as to obtain the rule chain corresponding to each rule template.
可实现的一种实施方式中,所述工控协议解析模块基于所述特征库中的所述解析识别码,对工控报文进行解析的步骤,包括:In an achievable implementation manner, the step of parsing the industrial control message by the industrial control protocol parsing module based on the parsing identification code in the feature library includes:
所述工控协议解析模块调用所述动态库的接口向所述动态库发送匹配信息,其中,所述匹配信息包括规则模板名称和所述解析结果;The industrial control protocol parsing module calls the interface of the dynamic library to send matching information to the dynamic library, wherein the matching information includes a rule template name and the parsing result;
所述动态库根据所述规则模板名称确定目标规则模板,遍历所述目标规则模板的规则链对所述解析结果进行匹配,并根据所述匹配结果转发或者丢弃所述工控报文。The dynamic library determines the target rule template according to the name of the rule template, traverses the rule chain of the target rule template to match the parsing result, and forwards or discards the industrial control message according to the matching result.
本申请第二方面提供一种热加载工控协议解析和控制的系统,包括前述的热加载工控协议解析和控制的方法,包括:The second aspect of the present application provides a system for analyzing and controlling a hot-loading industrial control protocol, including the aforementioned method for analyzing and controlling a hot-loading industrial control protocol, including:
获取单元,用于获取特征库,其中,所述特征库内封装有工控协议的解析识别码;An acquisition unit, configured to acquire a feature library, wherein the feature library is encapsulated with a parsing identification code of an industrial control protocol;
传输单元,用于根据预设的目标路径,将所述特征库上传到工控设备,并向所述工控设备发送加载指令,其中,所述工控设备包括工控协议解析模块;A transmission unit, configured to upload the feature library to the industrial control device according to a preset target path, and send a loading instruction to the industrial control device, wherein the industrial control device includes an industrial control protocol analysis module;
响应单元,用于所述工控协议解析模块响应于所述加载指令,从所述目标路径加载所述特征库;a response unit, configured for the industrial control protocol analysis module to load the feature library from the target path in response to the loading instruction;
识别单元,用于所述工控协议解析模块基于所述特征库中的所述解析识别码,对工控报文进行解析;The identification unit is used for the industrial control protocol analysis module to analyze the industrial control message based on the analysis identification code in the feature library;
控制单元,用于所述工控设备根据所述工控报文的解析结果,对所述工控报文进行控制。The control unit is used for the industrial control device to control the industrial control message according to the analysis result of the industrial control message.
本申请第三方面提供一种电子设备,包括:The third aspect of the present application provides an electronic device, including:
处理器;processor;
用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现前述的热加载工控协议解析和控制的方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the aforementioned method for analyzing and controlling the hot loading industrial control protocol.
本申请第四方面提供一种计算机可读存储介质,其上存储有计算机程序指令,该程序指令被处理器执行时,以实现前述的热加载工控协议解析和控制的方法的步骤。The fourth aspect of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for analyzing and controlling the aforementioned hot loading industrial control protocol can be realized.
本申请一种热加载工控协议解析和控制的方法的有益效果,在特征库内封装工控协议的解析识别码,再根据目标路径,将特征库上传到工控设备,工控设备中的工控协议解析模块响应于接收到的加载指令,加载特征库,待加载完成后,利用特征库中的解析识别码,工控协议解析模块对工控报文解析。此种方法,无需重启工控协议解析模块或重启系统,也不需要更换工控设备版本镜像,即可实现新增工控协议的识别和控制。The beneficial effect of the method for analyzing and controlling a hot-loaded industrial control protocol of the present application is to encapsulate the analysis identification code of the industrial control protocol in the feature library, and then upload the feature library to the industrial control device according to the target path, and the industrial control protocol analysis module in the industrial control device In response to the received loading instruction, the feature library is loaded, and after the loading is completed, the industrial control protocol analysis module analyzes the industrial control message by using the analysis identification code in the feature library. In this method, the identification and control of new industrial control protocols can be realized without restarting the industrial control protocol analysis module or restarting the system, and without replacing the version image of the industrial control equipment.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图1为本申请一种热加载工控协议解析和控制的方法的流程图;Fig. 1 is the flow chart of the method for analyzing and controlling a kind of hot loading industrial control agreement of the present application;
图2为本申请一种热加载工控协议解析和控制的方法的特征库上传到工控设备的流程图;Fig. 2 is the flow chart of uploading the characteristic library of the method for the analysis and control of a hot loading industrial control protocol to the industrial control equipment of the present application;
图3为本申请一种热加载工控协议解析和控制的方法的工控协议进行编号的流程图;Fig. 3 is a flow chart of numbering the industrial control protocol of a method for thermal loading industrial control protocol analysis and control in the present application;
图4为本申请一种热加载工控协议解析和控制的方法的全局函数指针设定的流程图;Fig. 4 is the flow chart of the global function pointer setting of a kind of hot loading industrial control protocol analysis and control method of the present application;
图5为本申请一种热加载工控协议解析和控制的方法的工控协议解析模块调用动态库的接口返回解析结果的流程图;Fig. 5 is a flow chart of returning an analysis result to an interface of a dynamic library by an industrial control protocol analysis module of a method for hot loading industrial control protocol analysis and control in the present application;
图6为本申请一种热加载工控协议解析和控制的方法的时序图;Fig. 6 is a sequence diagram of a method for analyzing and controlling a hot loading industrial control protocol of the present application;
图7为本申请一种热加载工控协议解析和控制的方法的建立规则信息的流程图;Fig. 7 is a flow chart of establishing rule information of a method for analyzing and controlling a hot loading industrial control protocol in the present application;
图8为本申请一种热加载工控协议解析和控制的方法的规则链示意图;FIG. 8 is a schematic diagram of a rule chain of a method for analyzing and controlling a hot-loading industrial control protocol in the present application;
图9为本申请一种热加载工控协议解析和控制的方法的对工控协议进行控制的流程图。FIG. 9 is a flow chart of controlling the industrial control protocol in a method for analyzing and controlling the hot loading industrial control protocol of the present application.
具体实施方式Detailed ways
下面将结合实施例对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
为便于对申请的技术方案进行,以下首先在对本申请所涉及到的一些概念进行说明。In order to facilitate the implementation of the technical solution of the application, some concepts involved in the application are firstly described below.
特征库,为数据仓库,基于设定的特征,将具有该特征的数据、协议等集合在同一个库中,方便对数据和协议进行调用,并且方便进行统一的管理。The feature library is a data warehouse. Based on the set features, the data and protocols with the features are collected in the same library, which is convenient for invoking data and protocols and for unified management.
http,为Hyper Text Transportation Protocol,超文本传输协议,用于在万维网上传输文件。http, Hyper Text Transportation Protocol, Hypertext Transfer Protocol, used to transfer files on the World Wide Web.
ftp,为File Transportation Protocol,文件传输协议,用于使用TCP在FTP服务器和网络中的客户端计算机之间上传和下载文件,可以将文件从一个主机复制到另一个主机。ftp, File Transportation Protocol, a file transfer protocol, is used to upload and download files between an FTP server and a client computer in the network using TCP, and can copy files from one host to another.
内存块,为memory block,一段在运行时刻承载着若干值部的连续内存片段,不同的内存块的大小可能不同,因它们所承载的值部的尺寸而定。A memory block is a memory block, a continuous memory segment that carries several value units at runtime. Different memory blocks may have different sizes, depending on the size of the value units they carry.
参见图1至图9,本申请第一方面提供一种热加载工控协议和控制的方法包括:Referring to Figures 1 to 9, the first aspect of the present application provides a thermal loading industrial control protocol and control method including:
如图1所示,S100:获取特征库。As shown in FIG. 1, S100: Obtain a feature library.
其中,特征库内封装有工控协议的解析识别码。Wherein, the analysis identification code of the industrial control protocol is encapsulated in the feature library.
工控协议在使用时,需要对工控协议进行解析,然后,再依据解析的内容对工控协议报文进行解析。特征库内封装有工控协议对应的解析识别码,方便工控协议被解析识别码解析。此外,由于工控协议的种类较多,可在特征库内集成多个工控协议的解析识别码,以便不同种类的工控协议进行相应的解析。When the industrial control protocol is used, it is necessary to analyze the industrial control protocol, and then analyze the industrial control protocol message according to the analyzed content. The analysis identification code corresponding to the industrial control protocol is encapsulated in the feature library, which facilitates the analysis of the industrial control protocol by the analysis identification code. In addition, because there are many types of industrial control protocols, the analysis identification codes of multiple industrial control protocols can be integrated in the feature library, so that different types of industrial control protocols can be analyzed accordingly.
需要说明地是,可以根据需要增加特征库内的解析识别码,以便应对后续工控协议的更新或升级,增加解析识别码的特征库需要重新获取。It should be noted that the analysis identification codes in the feature database can be added as needed, so as to cope with the update or upgrade of the subsequent industrial control protocol, and the feature library with the analysis identification codes needs to be acquired again.
S200:根据预设的目标路径,将特征库上传到工控设备,并向工控设备发送加载指令。S200: Upload the feature library to the industrial control device according to the preset target path, and send a loading instruction to the industrial control device.
其中,工控设备包括工控协议解析模块,工控协议解析模块用于对工控报文解析。Wherein, the industrial control equipment includes an industrial control protocol analysis module, and the industrial control protocol analysis module is used to analyze the industrial control message.
需要说明地是,工控协议解析模块可以设置在工控设备中,还外接在工控设备上。由工控协议解析模块对工控设备需要的工控报文进行解析。It should be noted that the industrial control protocol parsing module can be set in the industrial control equipment and connected externally to the industrial control equipment. The industrial control protocol analysis module analyzes the industrial control messages required by the industrial control equipment.
当特征库上传到工控设备后,会向工控设备发出加载指令,以便工控设备加载,从而方便在对工控报文解释时,调用特征库内的工控协议解析识别码,来对工控报文进行解析。When the feature library is uploaded to the industrial control equipment, it will send a loading command to the industrial control equipment, so that the industrial control equipment can be loaded, so that when explaining the industrial control message, the industrial control protocol analysis identification code in the feature library is called to analyze the industrial control message. .
如图2所示,具体地,特征库上传到工控设备包括步骤S201和S202。As shown in FIG. 2, specifically, uploading the feature database to the industrial control device includes steps S201 and S202.
S201:基于http或ftp的传输方式,特征库通过目标路径上传到工控设备。S201: Based on the transmission mode of http or ftp, the feature library is uploaded to the industrial control device through the target path.
其中,目标路径可以为工控设备的网络地址,利用http或ftp的传输方式,将特征库由一台服务器(服务器也可以为一台具有http或ftp传输方式的计算机设备)传输到工控设备。Wherein, the target path can be the network address of the industrial control equipment, and the feature library is transmitted from a server (the server can also be a computer device with http or ftp transmission mode) to the industrial control equipment by using http or ftp transmission mode.
需要说明地是,将特征库由服务器传输到工控设备还可以通过其他的传输协议进行传输,亦或者使用外部存储器将特征库直接拷贝到工控设备内。It should be noted that the transfer of the signature database from the server to the industrial control equipment can also be performed through other transmission protocols, or the signature database can be directly copied to the industrial control equipment by using an external memory.
S202:向工控协议解析模块发送加载指令。S202: Send a loading instruction to the industrial control protocol analysis module.
其中,特征库被传输至工控设备后,向工控协议解析模块发出加载指令,以便工控协议解析模块能够加载特征库。Wherein, after the feature library is transmitted to the industrial control equipment, a loading instruction is sent to the industrial control protocol analysis module, so that the industrial control protocol analysis module can load the feature library.
具体地,升级特征库的过程,首先通过http或者ftp将特征库文件上传到指定路径下。再通过信号处理的方式,向工控协议解析模块发送信号,通知工控协议解析模块重新加载特征库。接下来,工控协议解析模块收到信号后加载新的特征库。Specifically, in the process of upgrading the signature database, the signature database file is first uploaded to the specified path through http or ftp. Then, through signal processing, a signal is sent to the industrial control protocol analysis module to notify the industrial control protocol analysis module to reload the feature library. Next, the industrial control protocol analysis module loads a new feature library after receiving the signal.
需要说明地是,加载指令可以随特征库一同传输至工控设备,当特征库未被传输完成的情况下处于沉睡状态,加载指令响应于特征库上传完成的信息,向工控协议解析模块发出加载指令。亦可以当特征库上传完成后,服务器向工控协议解析模块发出一条加载指令。It should be noted that the loading instruction can be transmitted to the industrial control equipment together with the signature library. When the signature library is not transferred, it is in a dormant state. The loading instruction responds to the information that the signature library is uploaded and sends a loading instruction to the industrial control protocol analysis module. . Alternatively, after the feature library is uploaded, the server sends a loading command to the industrial control protocol analysis module.
S300:工控协议解析模块响应于加载指令,从目标路径加载特征库。S300: The industrial control protocol parsing module loads the feature library from the target path in response to the loading instruction.
其中,工控协议解析模块在接收到加载指令后,从目标路径加载特征库,以便工控协议解析模块收到工控报文时通过调用特征库中的工控协议的解析识别码对工控报文进行解析。Wherein, the industrial control protocol analysis module loads the feature library from the target path after receiving the loading instruction, so that when the industrial control protocol analysis module receives the industrial control message, it can analyze the industrial control message by calling the analysis identification code of the industrial control protocol in the feature library.
需要说明地是,由于特征库内封装有多个工控协议的解析识别码,因此需要对工控协议进行编号,包括步骤S301和S302。It should be noted that since the feature library encapsulates the analysis identification codes of multiple industrial control protocols, the industrial control protocols need to be numbered, including steps S301 and S302.
如图3所示,S301:工控协议解析模块建立动态库以及动态库的接口。As shown in FIG. 3 , S301 : the industrial control protocol analysis module establishes a dynamic library and an interface of the dynamic library.
其中,接口至少用于工控协议解析模块查询特征库当前支持解析的工控协议。Wherein, the interface is at least used for the industrial control protocol analysis module to query the industrial control protocols currently supported by the feature library for analysis.
具体地,动态库能够减少内存,并且还能够减少页面的交换,并且动态库相对独立,仅更改特征库不会对动态库的接口产生影响,即当特征库需要重新加载时,不会对动态库的接口产生影响,减少因加载特征库所带来的工作量。Specifically, the dynamic library can reduce memory and page swapping, and the dynamic library is relatively independent. Only changing the feature library will not affect the interface of the dynamic library, that is, when the feature library needs to be reloaded, there will be no impact on the dynamic library. The interface of the library has an impact, reducing the workload caused by loading the feature library.
S302:动态库对特征库的工控协议进行编号。S302: The dynamic library numbers the industrial control protocols of the feature library.
其中,为了方便工控协议解析模块通过动态库的接口调用特征库的工控协议进行编号。即工控协议解析模块通过动态库的接口为特征库的工控协议进行编号,方便工控协议解析模块根据编号查询工控协议。Among them, in order to facilitate the industrial control protocol analysis module to call the industrial control protocol of the feature library through the interface of the dynamic library to number. That is, the industrial control protocol analysis module numbers the industrial control protocols of the feature library through the interface of the dynamic library, so that the industrial control protocol analysis module can query the industrial control protocol according to the number.
如图4所示,需要说明地是,动态库接口的全局函数指针设定包括步骤S303至S304。As shown in FIG. 4 , it should be noted that setting the global function pointer of the dynamic library interface includes steps S303 to S304 .
S303:工控协议解析模块响应于加载指令,将全局函数指针设置赋空值。S303: The industrial control protocol parsing module sets the global function pointer to a null value in response to the loading instruction.
其中,全局函数指针用于指示动态库的接口位置。工控协议解析模块在加载指令后,首先将全局函数指针设置赋空值,避免使用原有的解析识别码对工控报文进行解析。Wherein, the global function pointer is used to indicate the interface location of the dynamic library. After the industrial control protocol analysis module loads the instruction, it first sets the global function pointer to a null value, so as to avoid using the original analysis identification code to analyze the industrial control message.
S304:工控协议解析模块根据动态库的系统调用函数,打开动态库,并重新为全局函数指针赋值,以使工控协议解析模块根据重新赋值的全局函数指针调用动态库的接口。S304: The industrial control protocol analysis module opens the dynamic library according to the system call function of the dynamic library, and reassigns a value to the global function pointer, so that the industrial control protocol analysis module calls the interface of the dynamic library according to the reassigned global function pointer.
其中,工控协议解析模块根据加载指令加载特征库,待加载完成后,根据动态库的系统调用函数,打开新的特征库,在全局函数指针设置赋空值的基础上,重新为全局函数指针赋值,完成全局函数指针调用动态库的接口的动作,以便工控协议深度解析模块使用新的接口对工控报文进行处理。Among them, the industrial control protocol analysis module loads the feature library according to the loading instruction. After the loading is completed, it opens a new feature library according to the system call function of the dynamic library, and re-assigns the global function pointer on the basis of assigning a null value to the global function pointer. , complete the action of calling the interface of the dynamic library by the global function pointer, so that the industrial control protocol deep analysis module uses the new interface to process the industrial control message.
S400:工控协议解析模块基于特征库中的解析识别码,对工控报文进行解析。S400: The industrial control protocol analysis module analyzes the industrial control message based on the analysis identification code in the feature library.
其中,工控协议解析模块接收到工控设备的工控报文转发请求后,利用特征库中的解析识别码对工控报文进行解析,当工控报文解析成功后,即可判断工控设备要转发的文件是否可转发。Among them, after the industrial control protocol analysis module receives the industrial control message forwarding request from the industrial control device, it uses the analysis identification code in the feature library to analyze the industrial control message. When the industrial control message is successfully parsed, it can determine the file to be forwarded by the industrial control device. Whether it can be forwarded.
如图5所示,需要说明地是,工控协议解析模块调用动态库的接口返回解析结果包括步骤S401和S402。As shown in FIG. 5 , it should be noted that the industrial control protocol analysis module calls the interface of the dynamic library and returns the analysis result including steps S401 and S402 .
S401:工控协议解析模块调用动态库的接口对工控报文进行解析。S401: The industrial control protocol analysis module calls the interface of the dynamic library to analyze the industrial control message.
其中,工控协议解析模块在接收到工控设备发出的工控报文时,经过工控协议解析模块进行解析,工控协议解析模块对工控报文的解析需要通过调用动态库的接口,来完成工控报文解析的动作。Among them, when the industrial control protocol analysis module receives the industrial control message sent by the industrial control device, it analyzes it through the industrial control protocol analysis module. The industrial control protocol analysis module needs to call the interface of the dynamic library to complete the analysis of the industrial control message. Actions.
S402:工控协议解析模块接收动态库返回的解析结果,解析结果包括工控报文对应的工控协议编号、解析结果内存块和内存块的大小。S402: The industrial control protocol analysis module receives the analysis result returned by the dynamic library, and the analysis result includes the industrial control protocol number corresponding to the industrial control message, the memory block of the analysis result, and the size of the memory block.
其中,动态库收到工控协议解析模块发出的工控报文解析请求后,动态库会返回解析结果,解析结果中包括工控协议编号、解析结果内存块和内存块的大小,工控设备根据工控协议解析模块得到的解析结果,根据解析结果确定是否继续转发工控协议。Among them, after the dynamic library receives the industrial control message analysis request sent by the industrial control protocol analysis module, the dynamic library will return the analysis result, which includes the industrial control protocol number, the memory block of the analysis result, and the size of the memory block. The industrial control equipment parses according to the industrial control protocol The analysis result obtained by the module determines whether to continue forwarding the industrial control protocol according to the analysis result.
如图6所示,示例性地,动态库会返回解析结果为:As shown in Figure 6, for example, the dynamic library will return the parsing result as:
其中,id表示工控协议编号,"id":15表示工控协议编号为15;result表示解析结果,"result":"0x8000000001"表示解析结果位于内存块0x8000000001;result_len表示内存块的大小,"result_len":128表示内存块的大小为128。Among them, id indicates the industrial control protocol number, "id": 15 indicates that the industrial control protocol number is 15; result indicates the analysis result, "result": "0x8000000001" indicates that the analysis result is located in the memory block 0x8000000001; result_len indicates the size of the memory block, "result_len" :128 indicates that the size of the memory block is 128.
如图7所示,还需要说明地是,工控协议解析模块通过动态库的接口向动态库下发规则信息,以便工控协议解析模块发送工控报文解析请求时判断是否与规则信息匹配,建立规则信息包括步骤S403和S404。As shown in Figure 7, it also needs to be explained that the industrial control protocol analysis module sends rule information to the dynamic library through the interface of the dynamic library, so that when the industrial control protocol analysis module sends an industrial control packet analysis request, it can determine whether it matches the rule information and establish a rule The information includes steps S403 and S404.
S403:工控协议解析模块通过动态库的接口向动态库下发至少一个规则信息。S403: The industrial control protocol analysis module delivers at least one rule information to the dynamic library through the interface of the dynamic library.
其中,每个规则信息至少包括规则模板名称、工控协议编号、目标字段的数量、以及目标字段的匹配规则。Wherein, each rule information at least includes a rule template name, an industrial control protocol number, the number of target fields, and a matching rule of the target field.
工控协议解析模块设定规则信息,并将规则信息通过接口保存在特征库中,工控协议解析模块设定的规则信息可以理解为预先设定的规则信息,以便工控协议解析模块发出报文负载时,特征库返回解析结果,工控协议解析模块可以根据解析结果与预先设定的规则信息进行比较。The industrial control protocol analysis module sets the rule information, and saves the rule information in the feature library through the interface. The rule information set by the industrial control protocol analysis module can be understood as the preset rule information, so that when the industrial control protocol analysis module sends a message load , the feature library returns the analysis result, and the industrial control protocol analysis module can compare the analysis result with the preset rule information.
S404:动态库将具有相同规则模板名称的规则信息保存在同一个规则模板下,以得到各个规则模板对应的规则链。S404: The dynamic library stores the rule information with the same rule template name under the same rule template, so as to obtain the rule chain corresponding to each rule template.
其中,动态库将工控协议解析模块下发的工控协议编号和字段等整合成一条规则信息,然后在对参数进行定义,根据不同的协议编号指定不同参数的意义。Among them, the dynamic library integrates the industrial control protocol number and fields issued by the industrial control protocol analysis module into a rule information, and then defines the parameters, specifying the meaning of different parameters according to different protocol numbers.
如图6所示,例如:对于GOOSE协议,工控协议解析模块下发的工控协议编号和字段的内容为:As shown in Figure 6, for example, for the GOOSE protocol, the industrial control protocol number and field contents issued by the industrial control protocol analysis module are:
其中,template表示规则模板,"template":"test1"表示规则模板为test1;id表示工控协议编号,"id":15表示工控协议编号为15;param_cnt表示目标字段的数量,"param_cnt":2表示目标字段的数量为2;param表示目标字段匹配参数,"param":["abc","123"]表示目标字段匹配参数gocbref(控制块引用名)为abc,appid(应用编号)为123。Among them, template indicates the rule template, "template": "test1" indicates that the rule template is test1; id indicates the industrial control protocol number, "id":15 indicates that the industrial control protocol number is 15; param_cnt indicates the number of target fields, "param_cnt":2 Indicates that the number of target fields is 2; param indicates the target field matching parameter, "param":["abc","123"] indicates that the target field matching parameter gocbref (control block reference name) is abc, and appid (application number) is 123 .
在动态库中处理时,针对工控协议编号为15的规则信息对参数定义为,允许gocbref为abc并且appid为123的工控报文允许通过,其他工控报文为拒绝。When processing in the dynamic library, the parameter definition for the rule information of the industrial
每个规则信息都保存在一个规则模板下,每个规则模板可以配置多条规则信息。例如每个规则模板可以配置2000条规则信息,总共可配置16个规则模板。Each rule information is stored under a rule template, and each rule template can be configured with multiple pieces of rule information. For example, each rule template can be configured with 2000 pieces of rule information, and a total of 16 rule templates can be configured.
如图8所示,每个规则模板配置的规则信息形成规则链。以便后续步骤的调用和匹配。As shown in FIG. 8 , the rule information configured in each rule template forms a rule chain. In order to call and match in subsequent steps.
如图9所示,最后需要说明地是,工控协议深度解析模块如果需要对工控协议进行控制包括步骤S405和S406。As shown in FIG. 9 , it should be explained finally that if the industrial control protocol deep analysis module needs to control the industrial control protocol, it includes steps S405 and S406 .
S405:工控协议解析模块调用动态库的接口向动态库发送匹配信息。S405: The industrial control protocol analysis module calls the interface of the dynamic library to send matching information to the dynamic library.
其中,匹配信息包括规则模板名称和解析结果。工控协议解析模块根据动态库返回的解析结果,再向动态库发出匹配信息的请求,动态库基于请求反回的解析结果,解析结果能够与预先设定的规则信息比较。Wherein, the matching information includes a rule template name and a parsing result. The industrial control protocol analysis module sends a request for matching information to the dynamic library based on the analysis result returned by the dynamic library. The dynamic library returns the analysis result based on the request, and the analysis result can be compared with the preset rule information.
如图6所示,示例性地,工控协议解析模块向动态库发出匹配信息的请求为:As shown in Figure 6, for example, the industrial control protocol parsing module sends a request for matching information to the dynamic library as follows:
其中,template表示规则模板,"template":"test1"表示规则模板为test1;id表示工控协议编号,"id":15表示工控协议编号为15;result表示解析结果,"result":"0x8000000001"表示解析结果位于内存块0x8000000001;result_len表示内存块的大小,"result_len":128表示内存块的大小为128。Among them, template means the rule template, "template": "test1" means the rule template is test1; id means the industrial control protocol number, "id":15 means the industrial control protocol number is 15; result means the analysis result, "result": "0x8000000001" Indicates that the analysis result is located in the memory block 0x8000000001; result_len indicates the size of the memory block, and "result_len":128 indicates that the size of the memory block is 128.
S406:动态库根据规则模板名称确定目标规则模板,遍历目标规则模板的规则链对解析结果进行匹配,并根据匹配结果转发或者丢弃工控报文。S406: The dynamic library determines the target rule template according to the name of the rule template, traverses the rule chain of the target rule template to match the analysis result, and forwards or discards the industrial control message according to the matching result.
其中,动态库首先确定工控协议解析模块根据动态库返回的解析结果,再向动态库发出匹配信息中包含的目标规则模板,在该目标规则模板下遍历规则链,对结果进行匹配,如果匹配成功则认为规则信息存在允许转发,否则返回拒绝。Among them, the dynamic library first determines the industrial control protocol analysis module according to the analysis result returned by the dynamic library, and then sends the target rule template contained in the matching information to the dynamic library, traverses the rule chain under the target rule template, and matches the results, if the match is successful It is considered that the rule information exists to allow forwarding, otherwise it returns a rejection.
S500:工控设备根据工控报文的解析结果,对工控报文进行控制。S500: The industrial control device controls the industrial control message according to the analysis result of the industrial control message.
其中,工控协议解析模块将工控报文的解析结果反馈给工控设备,工控设备根据反馈的解析结果,对工控报文进行控制,控制包括继续转发或停止转发。Wherein, the industrial control protocol analysis module feeds back the analysis result of the industrial control message to the industrial control equipment, and the industrial control equipment controls the industrial control message according to the feedback analysis result, and the control includes continuing to forward or stop forwarding.
如图6和图8所述,综上所述,本申请一种热加载工控协议解析和控制的方法,获取封装有多个工控协议的解析识别码的特征库,动态库对特征库支持的每个工控协议进行编号,并提供一个接口,供工控协议解析模块查询当前支持的协议种类。As shown in Figure 6 and Figure 8, in summary, the present application provides a hot-loading industrial control protocol analysis and control method, which obtains a feature library packaged with analytic identification codes of multiple industrial control protocols, and the dynamic library supports the feature library. Each industrial control protocol is numbered and an interface is provided for the industrial control protocol analysis module to query the types of protocols currently supported.
工控协议解析模块收到信号后,将接口都空出,防止继续使用旧接口的(将全局函数指针设置为空)。After the industrial control protocol analysis module receives the signal, all the interfaces are vacated to prevent the use of the old interface (set the global function pointer to be empty).
打开新加载的特征库,使用动态库的系统调用函数打开动态库,重新对全局函数指针赋值,工控协议解析模块可以使用新的接口对工控报文进行处理。Open the newly loaded feature library, use the system call function of the dynamic library to open the dynamic library, and reassign the global function pointer. The industrial control protocol analysis module can use the new interface to process the industrial control message.
工控协议解析模块建立规则信息,规则信息至少包括规则模板名称、工控协议编号、目标字段的数量、以及目标字段的匹配规则。The industrial control protocol parsing module establishes rule information, and the rule information includes at least the rule template name, the industrial control protocol number, the number of target fields, and the matching rules of the target fields.
将规则信息发送至动态库,存储在特征库中,特征库将工控协议解析模块下发的规则信息进行分类存储,相同规则模板名称的规则信息保存在同一个规则模板下,在一个规则模板下的规则信息,形成规则链,当需要使用规则时,遍历该规则模板的规则链即可。Send the rule information to the dynamic library and store it in the feature library. The feature library classifies and stores the rule information issued by the industrial control protocol analysis module. The rule information with the same rule template name is stored under the same rule template. rule information to form a rule chain, when a rule needs to be used, just traverse the rule chain of the rule template.
工控设备想要转发工控报文时,需要对工控报文解析,此种情况,工控设备首先向工控协议解析模块发出工控报文,再由工控协议解析模块向动态库发送工控报文负载,最后由特征库对工控报文进行解析,并返回给工控协议解析模块解析结果,解析结果中包括协议编号、包含解析结果的内存地址和内存大小。When the industrial control device wants to forward the industrial control message, it needs to analyze the industrial control message. In this case, the industrial control device first sends the industrial control message to the industrial control protocol analysis module, and then the industrial control protocol analysis module sends the industrial control message load to the dynamic library, and finally The industrial control message is analyzed by the feature library, and the analysis result is returned to the industrial control protocol analysis module. The analysis result includes the protocol number, the memory address and memory size containing the analysis result.
工控协议解析模块将工控报文的解析结果与预先设置在特征库中的规则信息匹配,需要说明地是,工控协议解析模块将工控报文的解析结果向特征库发送的解析结果包括规则模板名称、协议编号、字段个数和字段内容,其中字段内容均为字符串。也就是说,工控协议解析模块向特征库发送的解析结果与特征库返回给工控协议解析模块的解析结果内容并不完全相同。The industrial control protocol analysis module matches the analysis result of the industrial control message with the rule information preset in the feature library. It should be noted that the analysis result sent by the industrial control protocol analysis module to the feature library includes the rule template name , protocol number, number of fields, and field content, where the field content is a string. That is to say, the content of the analysis result sent by the industrial control protocol analysis module to the feature library is not exactly the same as the content of the analysis result returned by the feature library to the industrial control protocol analysis module.
动态库接收到工控协议解析模块发出的包含有模板名称、协议编号、字段个数和字段内容的解析结果时,首先会匹配规则模板,当规则模板匹配成功后,再将协议编号和字段个数与该规则模板下的规则链匹配,动态库会遍历该规则模板的规则链与协议编号和字段个数进行匹配,匹配成功后,字段内容即可允许转发。When the dynamic library receives the parsing result containing the template name, protocol number, field number and field content sent by the industrial control protocol parsing module, it will first match the rule template. After the rule template is successfully matched, the protocol number and field number To match the rule chain under the rule template, the dynamic library will traverse the rule chain of the rule template to match the protocol number and the number of fields. After the match is successful, the field content can be forwarded.
工控设备根据工控报文的解析结果,实现对工控报文的控制,如转发或丢弃等控制动作。According to the analysis result of the industrial control message, the industrial control equipment realizes the control of the industrial control message, such as forwarding or discarding and other control actions.
工控协议解析模块打开预设的目标路径的动态库文件,加载需要使用的接口函数,需要具有相应的功能,具体地,图9中工控协议解析模块的接口函数分别用icf_show_proto、icf_proto_parse、icf_proto_match和icf_proto_set_rule表示。The industrial control protocol analysis module opens the dynamic library file of the preset target path, loads the interface functions to be used, and needs to have corresponding functions. Specifically, the interface functions of the industrial control protocol analysis module in Figure 9 use icf_show_proto, icf_proto_parse, icf_proto_match and icf_proto_set_rule respectively express.
其中,icf_show_proto显示当前支持的工控协议列表,返回内容包括协议编号和规则模板名称。Among them, icf_show_proto displays the list of currently supported industrial control protocols, and the returned content includes the protocol number and rule template name.
icf_proto_parse入参为工控报文负载,返回结果为协议编号、包含解析结果的内存地址和内存大小。The input parameter of icf_proto_parse is the payload of the industrial control message, and the returned result is the protocol number, the memory address and memory size including the parsed result.
icf_proto_match入参为icf_proto_parse返回的解析结果和需要匹配的规则模板名称,返回工控报文转发状态(允许或拒绝)。The input parameter of icf_proto_match is the analysis result returned by icf_proto_parse and the name of the rule template to be matched, and returns the forwarding status of the industrial control message (allow or deny).
icf_proto_set_rule入参为规则模板名称、协议编号、字段个数和字段内容,其中字段内容均为字符串。The input parameters of icf_proto_set_rule are rule template name, protocol number, number of fields and field content, where the field content is a string.
需要说明地是,图6中的icf_proto_set_rule和icf_proto_parse时序可以互换。It should be noted that the timing of icf_proto_set_rule and icf_proto_parse in Figure 6 can be interchanged.
基于上述内容,动态库对工控报文负载进行解析,获取需要实现控制的字段,并将字段值保存到内存块中,同时将内存地址和内存块加上协议编号返回给工控协议解析模块。其中需要控制的字段和规则信息中的字段需要对应,此逻辑在动态库中设定,工控协议解析模块中会将该逻辑抽象成参数。Based on the above content, the dynamic library parses the industrial control message load, obtains the fields that need to be controlled, saves the field values in the memory block, and returns the memory address and memory block plus the protocol number to the industrial control protocol analysis module. The fields that need to be controlled and the fields in the rule information need to correspond. This logic is set in the dynamic library, and the industrial control protocol analysis module will abstract this logic into parameters.
本实施例中,工控设备在收发工控报文时,工控报文可能是其他设备发出的,在此情况下,需要对工控报文解析才能够被工控设备所识别,工控协议解析模块即起到解析工控报文的作用。由于工控协议种类较多,并且时长伴有工控协议更新的情况发生,若将工控协议的解析识别码编译到工控协议解析模块中,此种情况会将解析识别码固定在工控协议解析模块中。当面对新增的工控协议,则需要修改整个工控协议解析模块中的代码,并且还需要重启解析模块或重启系统,甚至需要更换设备的镜像。In this embodiment, when the industrial control device sends and receives the industrial control message, the industrial control message may be sent by other devices. In this case, it is necessary to analyze the industrial control message before it can be recognized by the industrial control device. Analyze the function of industrial control messages. Since there are many types of industrial control protocols, and the time is accompanied by the update of the industrial control protocol, if the analysis identification code of the industrial control protocol is compiled into the industrial control protocol analysis module, in this case, the analysis identification code will be fixed in the industrial control protocol analysis module. When faced with a new industrial control protocol, the code in the entire industrial control protocol analysis module needs to be modified, and the analysis module or system needs to be restarted, and even the image of the device needs to be replaced.
基于上述原因,将封装有工控协议的解析识别码的特征库上传到工控设备,再由工控协议解析模块,利用动态库调用特征库中的工控协议的解析识别码,同样可以实现工控协议的解析,并且当工控协议的解析识别码需要更新或增加时,加载新的特征库即可。此外,动态库的接口由于工控协议解析模块对动态库内部的名称、参数、返回值类型和调用约定等条件并未发声变化,所以动态库的接口无需改动,仅需要为全局函数指针赋空值,避免工控报文调用旧的接口即可。加载完成特征库后,再为全局函数指针重新赋值即可,无需重启解析模块或重启系统,更不需要更换设备的镜像,实现了热加载工控协议解析和控制。Based on the above reasons, the feature library encapsulated with the analysis identification code of the industrial control protocol is uploaded to the industrial control equipment, and then the industrial control protocol analysis module uses the dynamic library to call the analysis identification code of the industrial control protocol in the feature library, and the analysis of the industrial control protocol can also be realized , and when the analysis identification code of the industrial control protocol needs to be updated or added, just load a new feature library. In addition, the interface of the dynamic library does not change the internal name, parameters, return value type and calling convention of the dynamic library by the industrial control protocol analysis module, so the interface of the dynamic library does not need to be changed, only the global function pointer needs to be assigned a null value , to prevent the industrial control message from calling the old interface. After the feature library is loaded, just reassign the global function pointer. There is no need to restart the analysis module or restart the system, and there is no need to replace the image of the device, which realizes the analysis and control of the hot loading industrial control protocol.
本申请第二方面提供了一种热加载工控协议解析和控制的系统,包括前述中任一项热加载工控协议解析和控制的方法,包括:The second aspect of the present application provides a system for analyzing and controlling a hot-loading industrial control protocol, including any one of the aforementioned methods for analyzing and controlling a hot-loading industrial control protocol, including:
获取单元,用于获取特征库,其中,特征库内封装有工控协议的解析识别码;The acquiring unit is used to acquire the feature library, wherein the feature library is encapsulated with the analysis identification code of the industrial control protocol;
传输单元,用于根据预设的目标路径,将特征库上传到工控设备,并向工控设备发送加载指令,其中,工控设备包括工控协议解析模块;The transmission unit is used to upload the feature library to the industrial control device according to the preset target path, and send a loading instruction to the industrial control device, wherein the industrial control device includes an industrial control protocol analysis module;
响应单元,用于工控协议解析模块响应于加载指令,从目标路径加载特征库;The response unit is used for the industrial control protocol analysis module to load the feature library from the target path in response to the loading instruction;
识别单元,用于工控协议解析模块基于特征库中的解析识别码,对工控报文进行解析;The identification unit is used for the industrial control protocol analysis module to analyze the industrial control message based on the analysis identification code in the feature library;
控制单元,用于工控设备根据工控报文的解析结果,对工控报文进行控制。The control unit is used for the industrial control equipment to control the industrial control message according to the analysis result of the industrial control message.
本申请第三方面提供了一种电子设备,包括:The third aspect of the present application provides an electronic device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
处理器,用于从存储器中读取可执行指令,并执行指令以实现前述的热加载工控协议解析和控制的方法。The processor is used to read executable instructions from the memory, and execute the instructions to implement the aforementioned method for analyzing and controlling the hot loading industrial control protocol.
本申请第四方面提供一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,该程序指令被处理器执行时,以实现前述的热加载工控协议解析和控制的方法的步骤。The fourth aspect of the present application provides a computer-readable storage medium, on which computer program instructions are stored, which is characterized in that, when the program instructions are executed by the processor, the steps of the aforementioned method for analyzing and controlling the hot loading industrial control protocol are implemented .
以上实施例仅表达了本发明的具体实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。The above examples only express the specific implementation manner of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211430821.XA CN115941818B (en) | 2022-11-15 | 2022-11-15 | Method for analyzing and controlling hot-loading industrial control protocol |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211430821.XA CN115941818B (en) | 2022-11-15 | 2022-11-15 | Method for analyzing and controlling hot-loading industrial control protocol |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115941818A true CN115941818A (en) | 2023-04-07 |
| CN115941818B CN115941818B (en) | 2025-12-23 |
Family
ID=86549614
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211430821.XA Active CN115941818B (en) | 2022-11-15 | 2022-11-15 | Method for analyzing and controlling hot-loading industrial control protocol |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115941818B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025025542A1 (en) * | 2023-07-28 | 2025-02-06 | 京东科技信息技术有限公司 | Data communication protocol implementation method, apparatus, and system |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5903754A (en) * | 1994-06-21 | 1999-05-11 | Microsoft Corporation | Dynamic layered protocol stack |
| US20060080682A1 (en) * | 2004-10-12 | 2006-04-13 | Picsel Research Ltd. | Run time dynamic linking |
| CN102447627A (en) * | 2011-12-05 | 2012-05-09 | 上海顶竹通讯技术有限公司 | Message encapsulation/decapsulation device and method |
| US20120314584A1 (en) * | 2011-06-13 | 2012-12-13 | Huawei Technologies Co., Ltd. | Method and apparatus for protocol parsing |
| CN111506599A (en) * | 2020-04-20 | 2020-08-07 | 广州大学 | Method and system for identification of industrial control equipment based on rule matching and deep learning |
| CN113301049A (en) * | 2021-05-26 | 2021-08-24 | 杭州安恒信息技术股份有限公司 | Industrial control equipment auditing method, device, equipment and readable storage medium |
| CN114139133A (en) * | 2021-12-07 | 2022-03-04 | 浙江国利网安科技有限公司 | Industrial control safety protection method and device |
-
2022
- 2022-11-15 CN CN202211430821.XA patent/CN115941818B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5903754A (en) * | 1994-06-21 | 1999-05-11 | Microsoft Corporation | Dynamic layered protocol stack |
| US20060080682A1 (en) * | 2004-10-12 | 2006-04-13 | Picsel Research Ltd. | Run time dynamic linking |
| US20120314584A1 (en) * | 2011-06-13 | 2012-12-13 | Huawei Technologies Co., Ltd. | Method and apparatus for protocol parsing |
| CN102447627A (en) * | 2011-12-05 | 2012-05-09 | 上海顶竹通讯技术有限公司 | Message encapsulation/decapsulation device and method |
| CN111506599A (en) * | 2020-04-20 | 2020-08-07 | 广州大学 | Method and system for identification of industrial control equipment based on rule matching and deep learning |
| CN113301049A (en) * | 2021-05-26 | 2021-08-24 | 杭州安恒信息技术股份有限公司 | Industrial control equipment auditing method, device, equipment and readable storage medium |
| CN114139133A (en) * | 2021-12-07 | 2022-03-04 | 浙江国利网安科技有限公司 | Industrial control safety protection method and device |
Non-Patent Citations (1)
| Title |
|---|
| 左贝: "传感器网络与云统一连接框架设计与实现", 传感器网络与云统一连接框架设计与实现, 15 February 2020 (2020-02-15) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025025542A1 (en) * | 2023-07-28 | 2025-02-06 | 京东科技信息技术有限公司 | Data communication protocol implementation method, apparatus, and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115941818B (en) | 2025-12-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108170740B (en) | Data migration method, system and computer readable storage medium | |
| CN107205055B (en) | Terminal upgrading method and device | |
| WO2020248375A1 (en) | Method and system for synchronizing data between databases, computer device and storage medium | |
| CN111580926A (en) | Model publishing method, model deployment method, apparatus, device and storage medium | |
| CN112698817B (en) | Message access method, device and system based on micro-service architecture and storage medium | |
| CN110187986B (en) | Command management method, system, device and computer readable storage medium | |
| CN113114706B (en) | Multi-channel Ethernet packet processing method based on power chip | |
| CN114090074A (en) | Method and device for configuring operating environment, storage medium and electronic device | |
| WO2023050706A1 (en) | Database multi-write method and apparatus, and related device | |
| CN111857881A (en) | Repo-based manifest warehouse loading method, device and storage medium | |
| CN113179269A (en) | Internet of things-based protocol data analysis method, system, medium, and program product | |
| CN117743214A (en) | IO device control method, device and storage medium | |
| CN115941818A (en) | A method for analyzing and controlling a hot-loaded industrial control protocol and a system having the same | |
| CN118153689A (en) | Inference data processing method, device and equipment | |
| CN116032968A (en) | IoT device communication method and IoT device | |
| CN115329170A (en) | Webpage crawling method, device, equipment and storage medium | |
| EP3737066B1 (en) | Method for processing nginx network isolation spaces in batches and nginx server | |
| CN115454575B (en) | Method, device, equipment and storage medium for jar package conversion and automatic loading | |
| CN107347024B (en) | Method, equipment and system for storing operation log | |
| CN110286926A (en) | A method and device for updating an industrial machine | |
| CN109871277B (en) | Inter-process multi-request management method and device, terminal equipment and readable storage medium | |
| CN114338393A (en) | Transmission method, transparent transmission equipment, device, communication system and medium for upgrade data | |
| CN115994038A (en) | Request processing method, system, device and computer storage medium | |
| CN116107954A (en) | A data processing method and related equipment | |
| CN120090970B (en) | Data forwarding method, device, storage medium and program product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |