CN116032764A - Firewall configuration processing method and device, processor and electronic equipment - Google Patents
Firewall configuration processing method and device, processor and electronic equipment Download PDFInfo
- Publication number
- CN116032764A CN116032764A CN202211625513.2A CN202211625513A CN116032764A CN 116032764 A CN116032764 A CN 116032764A CN 202211625513 A CN202211625513 A CN 202211625513A CN 116032764 A CN116032764 A CN 116032764A
- Authority
- CN
- China
- Prior art keywords
- configuration
- target
- difference
- configuration object
- attribute
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请公开了一种防火墙配置的处理方法和装置、处理器及电子设备,涉及网络安全技术领域,该方法包括:获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合;依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合;依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙。通过本申请,解决了配置防火墙策略的效率比较低的问题。
The present application discloses a firewall configuration processing method and device, a processor, and electronic equipment, and relates to the technical field of network security. The method includes: acquiring the current configuration data set of the target data format of the target firewall and the preset configuration of the target data format Data collection; perform difference analysis according to multiple first configuration objects and multiple second configuration objects, and determine a set of difference configuration objects; according to the configuration type corresponding to each difference configuration object in the set of difference configuration objects, determine the order of configuration delivery; Each differential configuration object is converted into the XML corresponding to the target firewall through the converter corresponding to the version information of the target firewall, and the XML is delivered to the target firewall according to the configuration delivery sequence. Through this application, the problem of relatively low efficiency in configuring firewall policies is solved.
Description
技术领域technical field
本申请涉及网络安全技术领域,具体而言,涉及一种防火墙配置的处理方法和装置、处理器及电子设备。The present application relates to the technical field of network security, and in particular, relates to a processing method and device for firewall configuration, a processor, and electronic equipment.
背景技术Background technique
XML是一种可扩展标记语言(EXtensible Markup Language)。XML是一种标记语言,很类似HTML,它的意义在于传输数据,而非显示数据。它没有预定的标签,在使用时需要由用户自己定义。XML is an Extensible Markup Language (EXtensible Markup Language). XML is a markup language, very similar to HTML, and its meaning is to transmit data, not to display data. It has no predetermined label and needs to be defined by the user when using it.
配置管理最常见的手段为命令行接口,简称CLI(Command Line Interface)。比如,配置某个接口的IP的地址,linux下的命令为:$ifconfig eth1 ip address/netmask。The most common means of configuration management is the command line interface, referred to as CLI (Command Line Interface). For example, to configure the IP address of an interface, the command under Linux is: $ifconfig eth1 ip address/netmask.
CLI(Command Line Interface)的特点是比较简单直接,每次配置一个或者相关联的多个参数,所见即所得,配置实时生效。如果执行过程中检查发现错误,配置不会生效。通过将XML(EXtensible Markup Language)和操作类型映射为一组具体的CLI命令,配置管理中心可以实现一次执行一组命令的功能。配置中心实现统一的配置差异比较算法生成差异化对象,并将差异化对象转换为具有动作意义的XML。The feature of CLI (Command Line Interface) is that it is relatively simple and direct. Each time you configure one or multiple associated parameters, what you see is what you get, and the configuration takes effect in real time. If errors are detected during execution, the configuration will not take effect. By mapping XML (EXtensible Markup Language) and operation types to a set of specific CLI commands, the configuration management center can realize the function of executing a set of commands at a time. The configuration center implements a unified configuration difference comparison algorithm to generate differentiated objects, and converts the differentiated objects into XML with action meaning.
通过一个XML实例就可以映射为下列一组CLI命令,但是这个技术方案所带来的主要问题:因为业务需求等原因,对于防火墙的部分模块,配置管理的方式是不同的,导致原配置管理方案过于理想化,为了兼容各种各样的个性化情况,需要用过多的分支判断语句来处理,使得代码的后期维护成本越高。An XML instance can be mapped to the following set of CLI commands, but the main problem brought by this technical solution: due to business requirements and other reasons, for some modules of the firewall, the configuration management methods are different, resulting in the original configuration management solution It is too idealized. In order to be compatible with various personalized situations, it needs to use too many branch judgment statements to deal with it, which makes the later maintenance cost of the code higher.
以安全策略举例,如果需要更改一条安全策略的配置,如更改其原地址,系统只要以策略id作为主键,分支对原地址簿结点操作删除和增加的行为即可达到目的。但是以snat策略来举例,比如需要将snat规则的源地址add1和转换地址add1修改为add2和add2,因为防火墙业务原因,要求原地址条目和转换地址条目必须数量一致,因此防火墙需要先执行snat策略删除的动作,而后执行snat策略新增的动作才能达到目的,从配置差异角度来看,虽然都是某几个属性发生变化产生的配置差异,但是形成的xml却完全不一样。Taking the security policy as an example, if it is necessary to change the configuration of a security policy, such as changing its original address, the system only needs to use the policy id as the primary key, and the branch deletes and adds the original address book node to achieve the goal. But take the snat policy as an example. For example, the source address add1 and translation address add1 of the snat rule need to be changed to add2 and add2. Due to firewall business reasons, the number of original address entries and translation address entries must be the same, so the firewall needs to execute the snat policy first. Delete the action, and then execute the new action of the snat policy to achieve the goal. From the perspective of configuration differences, although the configuration differences are caused by changes in certain attributes, the resulting xml is completely different.
有同样问题的模块在系统中不算少数,比如ospf/bgp模块、接口模块、iQos模块等等。这些模块的共同特点是,因为实际业务的需要,对配置下发xml有特殊的要求,使得原配置管理方案不得不增加很多分支判断语句来特殊处理,使得软件的维护成本越来越高。There are not a few modules with the same problem in the system, such as ospf/bgp module, interface module, iQos module and so on. The common feature of these modules is that due to the needs of actual business, there are special requirements for the configuration delivery xml, so that the original configuration management solution has to add a lot of branch judgment statements for special processing, which makes the maintenance cost of the software more and more high.
针对相关技术中为了兼容各种版本的防火墙策略,需要采用过多的分支判断语句来处理,导致配置防火墙策略的效率比较低的问题,目前尚未提出有效的解决方案。In order to be compatible with various versions of firewall policies in related technologies, it is necessary to use too many branch judgment statements for processing, resulting in relatively low efficiency in configuring firewall policies, and no effective solution has been proposed yet.
发明内容Contents of the invention
本申请的主要目的在于提供一种防火墙配置的处理方法和装置、处理器及电子设备,以解决相关技术中为了兼容各种版本的防火墙策略,需要采用过多的分支判断语句来处理,导致配置防火墙策略的效率比较低的问题。The main purpose of this application is to provide a firewall configuration processing method and device, processor and electronic equipment to solve the problem that in the related art, in order to be compatible with various versions of firewall policies, it is necessary to use too many branch judgment statements for processing, resulting in configuration The efficiency of the firewall policy is relatively low.
为了实现上述目的,根据本申请的一个方面,提供了一种防火墙配置的处理方法。该方法包括:获取目标防火墙的目标数据格式的当前配置数据集合和所述目标数据格式的预设配置数据集合,其中,所述目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,所述目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,所述第一配置对象和所述第二配置对象是所述目标防火墙中的配置对象;依据所述多个第一配置对象和所述多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,所述差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;依据所述差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过所述目标防火墙的版本信息对应的转换器将每个差异配置对象转换为所述目标防火墙对应的可扩展标记语言,并依据所述配置下发顺序,将所述可扩展标记语言下发至所述目标防火墙,以完成对所述目标防火墙的配置。In order to achieve the above purpose, according to one aspect of the present application, a method for processing firewall configuration is provided. The method includes: acquiring a current configuration data set in a target data format of the target firewall and a preset configuration data set in the target data format, wherein the current configuration data set in the target data format includes a plurality of first configuration objects, Each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, the preset configuration data set in the target data format includes a plurality of second configuration objects, and each second configuration object includes a plurality of Attributes and configuration information corresponding to each attribute, the first configuration object and the second configuration object are configuration objects in the target firewall; according to the plurality of first configuration objects and the plurality of second configuration objects Perform difference analysis on objects to determine a set of difference configuration objects, wherein the set of difference configuration objects includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and configuration information corresponding to each attribute; according to the difference The configuration type corresponding to each difference configuration object in the configuration object set, and determine the configuration delivery sequence; convert each difference configuration object into the extensible markup language corresponding to the target firewall through the converter corresponding to the version information of the target firewall , and deliver the extensible markup language to the target firewall according to the configuration delivery sequence, so as to complete the configuration of the target firewall.
进一步地,依据所述多个第一配置对象和所述多个第二配置对象进行差异性分析,确定差异配置对象集合包括:获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;依据所述第一主键对所述多个第一配置对象进行排序,得到排序后的第一配置对象;依据所述第二主键对所述多个第二配置对象进行排序,得到排序后的第二配置对象;将处于相同序位的第一配置对象和所述第二配置对象进行差异性分析,确定所述差异配置对象集合和每个差异配置对象对应的配置类型。Further, performing difference analysis according to the plurality of first configuration objects and the plurality of second configuration objects, and determining the set of difference configuration objects includes: obtaining the first primary key corresponding to each first configuration object and each second configuration object The second primary key corresponding to the configuration object; sort the multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; sort the multiple second configuration objects according to the second primary key Perform sorting to obtain the sorted second configuration objects; perform difference analysis on the first configuration objects in the same order and the second configuration objects, and determine the configuration corresponding to the set of difference configuration objects and each difference configuration object type.
进一步地,所述配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,将处于相同序位的第一配置对象和所述第二配置对象进行差异性分析,确定所述差异配置对象集合和每个差异配置对象对应的配置类型包括:若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定所述处于第一目标序位的第一配置对象为第一差异配置对象,且确定所述第一差异配置对象的配置类型为创建类型和/或更新类型;若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定所述处于第二目标序位的第二配置对象为第二差异配置对象,且确定所述第二差异配置对象的配置类型为删除类型;若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和所述第三差异配置对象的配置类型。Further, the configuration type at least includes: unbinding type, deletion type, creation type and/or update type, binding type, performing difference analysis on the first configuration object and the second configuration object in the same order , determining the set of difference configuration objects and the configuration type corresponding to each difference configuration object includes: if the hash value corresponding to the primary key of the first configuration object in the first target order is greater than the second configuration in the first target order The hash value corresponding to the primary key of the object, then determine that the first configuration object in the first target sequence is the first difference configuration object, and determine that the configuration type of the first difference configuration object is the creation type and/or update type; if the hash value corresponding to the primary key of the first configuration object in the second target sequence is smaller than the hash value corresponding to the primary key of the second configuration object in the target sequence, then determine the The second configuration object is the second difference configuration object, and it is determined that the configuration type of the second difference configuration object is the deletion type; if the hash value corresponding to the primary key of the first configuration object in the third target sequence is equal to the third The hash value corresponding to the primary key of the second configuration object in the target sequence is determined according to each attribute of the first configuration object in the third target sequence and each attribute of the second configuration object in the third target sequence The third difference configuration object and the configuration type of the third difference configuration object.
进一步地,依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和所述第三差异配置对象的配置类型包括:对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;若所述分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为创建类型和/或更新类型。Further, according to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order, determine the third difference configuration object and the third difference configuration object The configuration type includes: analyzing the difference between the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, and obtaining the analysis results ; If there is a difference in the analysis result representation, the configuration information of the primary key of the second configuration object in the third target sequence and the difference attribute of the second configuration object in the third target sequence is used as the third difference configuration object, and determine that the configuration type of the third differential configuration object is the creation type and/or the update type.
进一步地,在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,所述方法还包括:确定处于第三目标序位的第二配置对象的每个属性的标志位;若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为创建类型和/或更新类型;若所述目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为绑定类型;若所述目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为解绑类型。Further, before performing difference analysis on the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, the The method also includes: determining the flag bit of each attribute of the second configuration object in the third target order; if the first flag bit of the target attribute is the first preset value, the first flag in the third target The primary key of the second configuration object and the target attribute are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined to be the creation type and/or the update type; if the second flag bit of the target attribute is the second preset value, the primary key of the second configuration object in the third target order and the target attribute are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as binding type; if the second flag of the target attribute is the third preset value, the primary key of the second configuration object in the third target sequence and the target attribute are used as the third difference configuration object, and It is determined that the configuration type of the third difference configuration object is an unbinding type.
进一步地,获取目标防火墙的目标数据格式的当前配置数据集合和所述目标数据格式的预设配置数据集合包括:获取所述目标防火墙的当前配置数据集合;获取目标对象设置的预设配置数据集合;对所述当前配置数据集合和所述预设配置数据集合进行格式转换,得到所述目标数据格式的当前配置数据集合和所述目标数据格式的预设配置数据集。Further, acquiring the current configuration data set of the target data format of the target firewall and the preset configuration data set of the target data format includes: acquiring the current configuration data set of the target firewall; acquiring the preset configuration data set set by the target object ; performing format conversion on the current configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
进一步地,通过所述目标防火墙的版本信息对应的转换器将每个差异配置对象转换为所述目标防火墙对应的可扩展标记语言包括:获取所述目标防火墙的版本信息,并从转换管理器中确定所述版本信息对应的转换器,其中,所述转换管理器中包括多个转换器,每个转换器对应不同的版本信息;通过所述版本信息对应的转换器将每个差异配置对象转换为所述目标防火墙对应的可扩展标记语言。Further, converting each difference configuration object into the Extensible Markup Language corresponding to the target firewall through the converter corresponding to the version information of the target firewall includes: obtaining the version information of the target firewall, and obtaining the Determine the converter corresponding to the version information, wherein the conversion manager includes a plurality of converters, and each converter corresponds to different version information; convert each difference configuration object through the converter corresponding to the version information XML corresponding to the target firewall.
为了实现上述目的,根据本申请的另一方面,提供了一种防火墙配置的处理装置。该装置包括:获取单元,用于获取目标防火墙的目标数据格式的当前配置数据集合和所述目标数据格式的预设配置数据集合,其中,所述目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,所述目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,所述第一配置对象和所述第二配置对象是所述目标防火墙中的配置对象;分析单元,用于依据所述多个第一配置对象和所述多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,所述差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;第一确定单元,用于依据所述差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;转换单元,用于通过所述目标防火墙的版本信息对应的转换器将每个差异配置对象转换为所述目标防火墙对应的可扩展标记语言,并依据所述配置下发顺序,将所述可扩展标记语言下发至所述目标防火墙,以完成对所述目标防火墙的配置。In order to achieve the above object, according to another aspect of the present application, an apparatus for processing firewall configuration is provided. The device includes: an acquisition unit, configured to acquire a current configuration data set in a target data format of the target firewall and a preset configuration data set in the target data format, wherein the current configuration data set in the target data format includes a plurality of The first configuration object, each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the preset configuration data set in the target data format includes a plurality of second configuration objects, each second configuration The object includes a plurality of attributes and configuration information corresponding to each attribute, the first configuration object and the second configuration object are configuration objects in the target firewall; the analysis unit is configured to Difference analysis is performed on the configuration object and the plurality of second configuration objects to determine a difference configuration object set, wherein the difference configuration object set includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and each The configuration information corresponding to the attribute; the first determination unit is used to determine the configuration delivery sequence according to the configuration type corresponding to each difference configuration object in the difference configuration object set; the conversion unit is used to pass the version information of the target firewall The corresponding converter converts each difference configuration object into the XML corresponding to the target firewall, and sends the XML to the target firewall according to the configuration delivery sequence, so as to complete the target firewall. The configuration of the target firewall.
进一步地,所述第一确定单元包括:第三获取模块,用于获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;第一排序模块,用于依据所述第一主键对所述多个第一配置对象进行排序,得到排序后的第一配置对象;第二排序模块,用于依据所述第二主键对所述多个第二配置对象进行排序,得到排序后的第二配置对象;分析模块,用于将处于相同序位的第一配置对象和所述第二配置对象进行差异性分析,确定所述差异配置对象集合和每个差异配置对象对应的配置类型。Further, the first determining unit includes: a third obtaining module, configured to obtain a first primary key corresponding to each first configuration object and a second primary key corresponding to each second configuration object; a first sorting module, configured to Sorting the multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; a second sorting module, configured to sort the multiple second configuration objects according to the second primary key Sorting to obtain the sorted second configuration objects; the analysis module is used to analyze the difference between the first configuration object and the second configuration object in the same order, and determine the set of difference configuration objects and each difference configuration The configuration type corresponding to the object.
进一步地,所述配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,所述分析模块包括:第一确定子模块,用于若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定所述处于第一目标序位的第一配置对象为第一差异配置对象,且确定所述第一差异配置对象的配置类型为创建类型和/或更新类型;第二确定子模块,用于若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定所述处于第二目标序位的第二配置对象为第二差异配置对象,且确定所述第二差异配置对象的配置类型为删除类型;第三确定子模块,用于若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和所述第三差异配置对象的配置类型。Further, the configuration type at least includes: unbinding type, deletion type, creation type and/or update type, and binding type, and the analysis module includes: a first determination sub-module, configured to if the first target sequence position If the hash value corresponding to the primary key of the first configuration object is greater than the hash value corresponding to the primary key of the second configuration object in the first target sequence, then it is determined that the first configuration object in the first target sequence is the first difference configuration object, and determine that the configuration type of the first difference configuration object is the creation type and/or the update type; the second determination submodule is used for the hash corresponding to the primary key of the first configuration object in the second target order If the Hash value is less than the hash value corresponding to the primary key of the second configuration object in the target sequence, it is determined that the second configuration object in the second target sequence is a second difference configuration object, and the second difference configuration is determined The configuration type of the object is a deletion type; the third determining submodule is used to determine if the hash value corresponding to the primary key of the first configuration object in the third target sequence is equal to the corresponding hash value of the primary key of the second configuration object in the third target sequence hash value, then determine the third difference configuration object and the third difference according to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order The configuration type of the configuration object.
进一步地,所述第三确定子模块包括:分析子模块,用于对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;处理子模块,用于若所述分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为创建类型和/或更新类型。Further, the third determination submodule includes: an analysis submodule, configured to analyze the configuration information of each attribute of the first configuration object in the third target order and the configuration information of the second configuration object in the third target order The configuration information of each attribute is subjected to difference analysis to obtain the analysis result; the processing sub-module is used to combine the primary key of the second configuration object in the third target order and the third target if there is a difference in the representation of the analysis result The configuration information of the differential attribute of the second sequential configuration object is used as the third differential configuration object, and the configuration type of the third differential configuration object is determined as the creation type and/or the update type.
进一步地,所述装置还包括:第二确定单元,用于在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,确定处于第三目标序位的第二配置对象的每个属性的标志位;第三确定单元,用于若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为创建类型和/或更新类型;第四确定单元,用于若所述目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为绑定类型;第五确定单元,用于若所述目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和所述目标属性作为所述第三差异配置对象,并确定所述第三差异配置对象的配置类型为解绑类型。Further, the device further includes: a second determining unit, configured to compare the configuration information of each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order Before the configuration information of each attribute is subjected to difference analysis, determine the flag bit of each attribute of the second configuration object in the third target sequence; the third determining unit is used to determine if the first flag bit of the target attribute is the first preset value, the primary key of the second configuration object in the third target order and the target attribute are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or Or the update type; the fourth determining unit is used to use the primary key of the second configuration object in the third target order and the target attribute as the target attribute if the second flag bit of the target attribute is a second preset value the third difference configuration object, and determine that the configuration type of the third difference configuration object is a binding type; the fifth determining unit is configured to set the The primary key of the second configuration object in the third target order and the target attribute are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined to be an unbinding type.
进一步地,所述获取单元包括:第一获取模块,用于获取所述目标防火墙的当前配置数据集合;第二获取模块,用于获取目标对象设置的预设配置数据集合;第一转换模块,用于对所述当前配置数据集合和所述预设配置数据集合进行格式转换,得到所述目标数据格式的当前配置数据集合和所述目标数据格式的预设配置数据集。Further, the acquisition unit includes: a first acquisition module, configured to acquire the current configuration data set of the target firewall; a second acquisition module, configured to acquire a preset configuration data set set by the target object; a first conversion module, and performing format conversion on the current configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
进一步地,所述转换单元包括:第四获取模块,用于获取所述目标防火墙的版本信息,并从转换管理器中确定所述版本信息对应的转换器,其中,所述转换管理器中包括多个转换器,每个转换器对应不同的版本信息;第二转换模块,用于通过所述版本信息对应的转换器将每个差异配置对象转换为所述目标防火墙对应的可扩展标记语言。Further, the converting unit includes: a fourth acquiring module, configured to acquire version information of the target firewall, and determine a converter corresponding to the version information from a conversion manager, wherein the conversion manager includes A plurality of converters, each corresponding to different version information; a second conversion module, configured to convert each difference configuration object into the Extensible Markup Language corresponding to the target firewall through the converter corresponding to the version information.
为了实现上述目的,根据本申请的一个方面,提供了一种处理器,处理器用于运行程序,其中,所述程序运行时执行上述任意一项所述的防火墙配置的处理方法。In order to achieve the above object, according to one aspect of the present application, a processor is provided, and the processor is used to run a program, wherein, when the program is running, the method for processing firewall configuration described in any one of the above items is executed.
为了实现上述目的,根据本申请的一个方面,提供了一种电子设备,该电子设备包括一个或多个处理器和存储器,存储器用于存储一个或多个处理器实现上述任意一项所述的防火墙配置的处理方法。In order to achieve the above object, according to one aspect of the present application, an electronic device is provided, the electronic device includes one or more processors and a memory, and the memory is used to store one or more processors to implement any of the above-mentioned How to handle firewall configuration.
通过本申请,采用以下步骤:获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置,解决了相关技术中为了兼容各种版本的防火墙策略,需要采用过多的分支判断语句来处理,导致配置防火墙策略的效率比较低的问题。在本方案中,通过目标数据格式兼顾不同版本防火墙的普遍性和特殊性,通过差异性分析准确得到差异配置对象集合,通过配置类型达到对配置命令进行快速排序的目的,通过转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,进而达到了提高配置防火墙策略的效率的效果。Through this application, the following steps are adopted: obtaining the current configuration data set in the target data format and the preset configuration data set in the target data format of the target firewall, wherein the current configuration data set in the target data format includes a plurality of first configuration objects, Each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the preset configuration data set in the target data format includes a plurality of second configuration objects, and each second configuration object includes a plurality of attributes and The configuration information corresponding to each attribute, the first configuration object and the second configuration object are configuration objects in the target firewall; performing difference analysis according to a plurality of first configuration objects and a plurality of second configuration objects, and determining a set of difference configuration objects, Wherein, the difference configuration object set includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and configuration information corresponding to each attribute; according to the configuration type corresponding to each difference configuration object in the difference configuration object set, determine the configuration Sequence of distribution: through the converter corresponding to the version information of the target firewall, each difference configuration object is converted into the XML corresponding to the target firewall, and the XML is delivered to the target firewall according to the configuration delivery sequence, so as to The configuration of the target firewall is completed, which solves the problem in related technologies that in order to be compatible with various versions of firewall policies, too many branch judgment statements are required to process, resulting in low efficiency in configuring firewall policies. In this solution, the universality and particularity of different versions of firewalls are taken into account through the target data format, the set of different configuration objects is accurately obtained through difference analysis, the purpose of quickly sorting configuration commands is achieved through configuration types, and each The difference configuration object is converted into the extensible markup language corresponding to the target firewall, thereby achieving the effect of improving the efficiency of configuring the firewall policy.
附图说明Description of drawings
构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings constituting a part of the application are used to provide further understanding of the application, and the schematic embodiments and descriptions of the application are used to explain the application, and do not constitute an improper limitation to the application. In the attached picture:
图1是根据本申请实施例提供的防火墙配置的处理方法的流程图;FIG. 1 is a flow chart of a processing method for firewall configuration provided according to an embodiment of the present application;
图2是根据本申请实施例提供的差异配置对象集合的示意图;Fig. 2 is a schematic diagram of a set of difference configuration objects provided according to an embodiment of the present application;
图3是根据本申请实施例提供的确定差异配置对象的示意图;Fig. 3 is a schematic diagram of determining difference configuration objects provided according to an embodiment of the present application;
图4是根据本申请实施例提供的差异配置对象的示意图;Fig. 4 is a schematic diagram of a difference configuration object provided according to an embodiment of the present application;
图5是根据本申请实施例提供的转换器的示意图;Fig. 5 is a schematic diagram of a converter provided according to an embodiment of the present application;
图6是根据本申请实施例提供的差异性分析的示意图;Fig. 6 is a schematic diagram of the difference analysis provided according to the embodiment of the present application;
图7是根据本申请实施例提供的防火墙配置的处理装置的示意图;FIG. 7 is a schematic diagram of a processing device configured with a firewall according to an embodiment of the present application;
图8是根据本申请实施例提供的电子设备的示意图。Fig. 8 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It should be understood that the data so used may be interchanged under appropriate circumstances for the embodiments of the application described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
需要说明的是,本公开所涉及的相关信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于展示的数据、分析的数据等),均为经用户授权或者经过各方充分授权的信息和数据。例如,本系统和相关用户或机构间设置有接口,在获取相关信息之前,需要通过接口向前述的用户或机构发送获取请求,并在接收到前述的用户或机构反馈的同意信息后,获取相关信息。It should be noted that the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are authorized by the user. Or information and data fully authorized by the parties. For example, there is an interface between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution. information.
下面结合优选的实施步骤对本发明进行说明,图1是根据本申请实施例提供的防火墙配置的处理方法的流程图,如图1所示,该方法包括如下步骤:The present invention is described below in conjunction with preferred implementation steps. Fig. 1 is a flow chart of a processing method for firewall configuration provided according to an embodiment of the present application. As shown in Fig. 1, the method includes the following steps:
步骤S101,获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;Step S101, obtaining the current configuration data set of the target data format and the preset configuration data set of the target data format of the target firewall, wherein the current configuration data set of the target data format includes a plurality of first configuration objects, and each first configuration The object includes a plurality of attributes and configuration information corresponding to each attribute. The preset configuration data set in the target data format includes a plurality of second configuration objects, and each second configuration object includes a plurality of attributes and the configuration information corresponding to each attribute. For configuration information, the first configuration object and the second configuration object are configuration objects in the target firewall;
具体地,通过目标数据格式解决不同版本防火墙配置信息的存储问题。目标数据格式是屏蔽了版本差异的、仅存储配置的通用实体,可以简称为UCO。Specifically, the storage problem of firewall configuration information of different versions is solved through the target data format. The target data format is a generic entity that shields version differences and only stores configurations, which can be referred to as UCO for short.
例如,一个地址簿对象的属性是有限的,只是因为防火墙各个版本不同,实际在防火墙上存储的方式不同而已。比如对于ip范围属性,虽然存储了相同的信息,但是xml格式不同。UCO摒弃版本间存储的差异,将实际的对象配置信息存储在配置管理中心端,也就说一个配置对象的UCO的配置信息只包括多个属性和每个属性对应的配置信息,不包括版本信息。例如,地址簿,对应的属性就是IP/掩码、IP范围等。For example, the attributes of an address book object are limited, just because the different versions of the firewall are actually stored in different ways on the firewall. For example, for the ip range attribute, although the same information is stored, the xml format is different. UCO discards the differences stored between versions and stores the actual object configuration information in the configuration management center. That is to say, the UCO configuration information of a configuration object only includes multiple attributes and the configuration information corresponding to each attribute, and does not include version information. . For example, address book, the corresponding attributes are IP/mask, IP range and so on.
获取目标数据格式的防火墙的当前配置数据集合,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息。获取目标数据格式的预设配置数据集合,预设配置数据集合是用户根据实际需求想到在防火墙上配置的数据集合。目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息。The current configuration data set of the firewall in the target data format is acquired. The current configuration data set in the target data format includes a plurality of first configuration objects, and each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute. Obtain a preset configuration data set in a target data format, where the preset configuration data set is a data set that a user thinks of to be configured on the firewall according to actual needs. The preset configuration data set in the target data format includes multiple second configuration objects, and each second configuration object includes multiple attributes and configuration information corresponding to each attribute.
步骤S102,依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;Step S102, performing difference analysis based on multiple first configuration objects and multiple second configuration objects, and determining a set of differential configuration objects, wherein the set of differential configuration objects includes multiple differential configuration objects, each of which includes at least one Attributes and configuration information corresponding to each attribute;
具体地,差异配置对象用于描述一种配置对象的操作行为,比如,将什么属性修改、将什么属性删除等等,差异配置对象可以简称为CDO。差异配置对象集合用于承载两份UCO配置进行差异比较后,所需要进行的配置操作。差异配置对象集合可以转换成任意版本的一份防火墙配置。差异配置对象集合就是由四种类型的差异配置对象组合而成,分别为“属性解除”、“属性绑定”、“配置删除”、“配置创建和\或更新”。Specifically, a difference configuration object is used to describe an operation behavior of a configuration object, for example, which attribute is modified, which attribute is deleted, etc., and the difference configuration object may be referred to as CDO for short. The difference configuration object collection is used to carry the configuration operations that need to be performed after two UCO configurations are compared for differences. A collection of differential configuration objects can be converted into a firewall configuration of any version. The differential configuration object collection is composed of four types of differential configuration objects, which are "property release", "property binding", "configuration deletion", "configuration creation and/or update".
【属性解除】表示在两份配置差异对比过程中,需要将某个属性解绑或删除的动作集合,如安全策略不引用某条地址簿时,就会放到这个集合中。【属性绑定】表示在两份配置差异对比过程中,需要将某个属性绑定的动作集合,如安全策略引用某条地址簿时,就会放到这个集合中。【配置删除】表示在两份配置差异对比后,需要删除的配置集合,如在管理端删除某个地址簿,则需要放入该集合中。【配置创建或更新】表示在两份配置差异对比后,需要新建的配置集合,如果在管理端创建某个地址簿,刚需要放入该集合中。[Attribute release] indicates the set of actions that need to unbind or delete an attribute during the comparison of two configuration differences. For example, if the security policy does not refer to an address book, it will be placed in this set. 【Attribute Binding】Indicates the set of actions that need to be bound to an attribute during the comparison of two configuration differences. For example, when a security policy references an address book, it will be placed in this set. 【Delete Configuration】Indicates the configuration collection that needs to be deleted after comparing the differences between the two configurations. If you delete an address book on the management side, you need to put it into this collection. [Configuration creation or update] means that after comparing the differences between the two configurations, a new configuration collection is required. If an address book is created on the management side, it needs to be put into the collection just now.
经过此种结构的设计,各模块只要比较出配置类型,放到差异配置对象集合中,系统会自动根据依赖关系将差异配置对象集合转换为XML(可扩展标记语言)。差异配置对象集合的数据结构可以如图2所示。After the design of this structure, as long as each module compares the configuration type and puts it into the difference configuration object set, the system will automatically convert the difference configuration object set into XML (Extensible Markup Language) according to the dependency relationship. The data structure of the differential configuration object set may be shown in FIG. 2 .
两个UCO对比会生成多个CDO,因为对比差异会有解绑类型的CDO,会有绑定类型的CDO等等。如图3所示。因此,对多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象的配置类型。The comparison of two UCOs will generate multiple CDOs, because there will be CDOs of the unbound type, CDOs of the bound type, and so on. As shown in Figure 3. Therefore, a difference analysis is performed on the plurality of first configuration objects and the plurality of second configuration objects, and a set of difference configuration objects and a configuration type of each difference configuration object are determined.
步骤S103,依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;Step S103, according to the configuration type corresponding to each difference configuration object in the difference configuration object set, determine the configuration delivery sequence;
具体地,在实际各厂商的防火墙配置中,基本都会涉及到各待配置的模块间配置与配置引用的问题,更有甚者,会涉及到模块间配置循环引用的情况,例如,ModuleA、ModuleB、ModuleC是三个配置模块,但是三种配置中的实例存在循环引用的情况。在ModuleA中的aname1引用bname1,在ModuleB中的bname1引用cname1,在ModuleC中的cname1引用aname1。在这种情况下,使用传统的配置方式永远不会成功,因为每种配置的创建都需要另一种配置作为前提。但是通过差异配置对象集合可以实现上述配置。在配置全部为新增的情况下,系统会将上述配置转换为6个CDO对象,分别为:创建aname1、bname1、cname1对象,绑定aname1、bname1、cname1的引用关系,如图4所示。然后,根据差异配置对象集合中每个差异配置对象对应的配置类型确定配置下发顺序。Specifically, in the actual firewall configuration of each manufacturer, the configuration and configuration reference between the modules to be configured will basically be involved, and what is more, it will involve the configuration circular reference between modules, for example, ModuleA, ModuleB , ModuleC is three configuration modules, but the instances in the three configurations have circular references. aname1 in ModuleA refers to bname1, bname1 in ModuleB refers to cname1, and cname1 in ModuleC refers to aname1. In this case, using traditional configuration methods will never succeed, because the creation of each configuration requires another configuration as a prerequisite. But the above configuration can be achieved through a collection of differential configuration objects. In the case that all the configurations are new, the system will convert the above configurations into 6 CDO objects, respectively: create aname1, bname1, cname1 objects, and bind the reference relationship of aname1, bname1, cname1, as shown in Figure 4. Then, determine the configuration delivery order according to the configuration type corresponding to each difference configuration object in the difference configuration object set.
在一可选的实施例中,执行顺序为:第一配置类型是解绑类型的CDO、第二配置类型是删除类型的CDO、第三配置类型是创建类型或者更新类型的CDO。第四配置类型为绑定类型。同种类型的CDO是没有严格顺序的。In an optional embodiment, the execution order is as follows: the first configuration type is unbinding CDO, the second configuration type is deletion CDO, and the third configuration type is creation or update CDO. The fourth configuration type is a binding type. There is no strict order for CDOs of the same type.
通过上述的顺序下发图4中的6个CDO对象,究竟可以准确实现对ModuleA、ModuleB、ModuleC三个配置模块的配置。By issuing the six CDO objects in Figure 4 in the above sequence, the configuration of the three configuration modules ModuleA, ModuleB, and ModuleC can be accurately realized after all.
步骤S104,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。Step S104, convert each difference configuration object into the XML corresponding to the target firewall through the converter corresponding to the version information of the target firewall, and deliver the XML to the target firewall according to the order of configuration delivery, to complete Configuration of the target firewall.
具体地,在确定配置下发顺序之后,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。Specifically, after determining the configuration delivery sequence, each difference configuration object is converted into the corresponding XML of the target firewall through the converter corresponding to the version information of the target firewall, and the XML is delivered to the target firewall, to complete the configuration of the target firewall.
转换器管理器中提供各种版本的基础转换器Base Converter,用于将一份差异配置对象集合转换为防火墙可以识别的xml,例如address Base Converter。如果地址簿版本间差异过大,支持自定义其它版本转换器,如addressV1Converter。The converter manager provides various versions of the base converter Base Converter, which is used to convert a set of differential configuration objects into xml that can be recognized by the firewall, such as address Base Converter. If the difference between the address book versions is too large, it is supported to customize other version converters, such as addressV1Converter.
转换器管理器(Converter Factory Manager),就是用来管理转换器的容器,Converter Factory Manager对外提供方法,可以根据模块名及【版本信息】,返回相应的转换器,用于xml转换,如图5所示。所有的多版本适配均由转换器(Converter)来完成。对于每一个转换器,支持两个属性y,n。y代表转换器可以支持哪些版本,n代表转换器不支持哪些版本。不支持的优先级高估支持的优先级,即,说明转换器不支持此版本。例如,某个转换器的配置为y={“V1-”},n={“V2.1-V2.3”},则表示当前converter只对版本号大于V1的设备生效,但是在V2.1和V2.3之间的配置是不支持的,需要用其它转换器来转换。Converter Factory Manager (Converter Factory Manager) is a container used to manage converters. Converter Factory Manager provides methods to the outside world, which can return corresponding converters according to the module name and [version information] for xml conversion, as shown in Figure 5 shown. All multi-version adaptations are done by Converter. For each converter, two attributes y, n are supported. y represents which versions the converter can support, and n represents which versions the converter does not support. Unsupported priority overestimates supported priority, i.e., indicates that the converter does not support this version. For example, if the configuration of a certain converter is y={"V1-"}, n={"V2.1-V2.3"}, it means that the current converter is only effective for devices whose version number is greater than V1, but in V2. The configuration between 1 and V2.3 is not supported and needs to be converted by other converters.
综上所述,通过目标数据格式兼顾不同版本防火墙的普遍性和特殊性,通过差异性分析准确得到差异配置对象集合,通过配置类型达到对配置命令进行快速排序的目的,通过转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,进而达到了提高配置防火墙策略的效率的效果。To sum up, the universality and particularity of different versions of firewalls are taken into account through the target data format, the set of different configuration objects is accurately obtained through difference analysis, the purpose of quickly sorting configuration commands is achieved through configuration types, and each The difference configuration object is converted into the extensible markup language corresponding to the target firewall, thereby achieving the effect of improving the efficiency of configuring the firewall policy.
为了准确地进行差异性分析,在本申请实施例提供的防火墙配置的处理方法中,依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合包括:获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;依据第一主键对多个第一配置对象进行排序,得到排序后的第一配置对象;依据第二主键对多个第二配置对象进行排序,得到排序后的第二配置对象;将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型。In order to accurately perform difference analysis, in the firewall configuration processing method provided in the embodiment of the present application, difference analysis is performed based on multiple first configuration objects and multiple second configuration objects, and determining the set of difference configuration objects includes: obtaining each The first primary key corresponding to each first configuration object and the second primary key corresponding to each second configuration object; sort multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; according to the second primary key Sorting a plurality of second configuration objects to obtain the sorted second configuration objects; analyzing the difference between the first configuration objects and the second configuration objects in the same order, and determining the set of difference configuration objects and each difference configuration object The corresponding configuration type.
具体地,对多个第一配置对象和多个第二配置对象进行差异性分析包括:确定每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键。然后根据第一主键对第一配置对象进行排序和根据第二主键对第二配置对象进行排序,然后通过对比处于相同序位的第一配置对象和第二配置对象确定差异配置对象集合和每个差异配置对象对应的配置类型。Specifically, performing difference analysis on the plurality of first configuration objects and the plurality of second configuration objects includes: determining a first primary key corresponding to each first configuration object and a second primary key corresponding to each second configuration object. Then sort the first configuration object according to the first primary key and sort the second configuration object according to the second primary key, and then determine the difference configuration object set and each by comparing the first configuration object and the second configuration object in the same order The configuration type corresponding to the difference configuration object.
配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型包括:若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定处于第一目标序位的第一配置对象为第一差异配置对象,且确定第一差异配置对象的配置类型为创建类型和/或更新类型;若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定处于第二目标序位的第二配置对象为第二差异配置对象,且确定第二差异配置对象的配置类型为删除类型;若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型。The configuration type at least includes: unbinding type, deletion type, creation type and/or update type, binding type, performing difference analysis on the first configuration object and the second configuration object in the same order, and determining the set of difference configuration objects and The configuration type corresponding to each difference configuration object includes: if the hash value corresponding to the primary key of the first configuration object in the first target sequence is greater than the hash value corresponding to the primary key of the second configuration object in the first target sequence, Then determine that the first configuration object in the first target order is the first difference configuration object, and determine that the configuration type of the first difference configuration object is the creation type and/or update type; if the first configuration in the second target order If the hash value corresponding to the primary key of the object is less than the hash value corresponding to the primary key of the second configuration object in the target sequence, it is determined that the second configuration object in the second target sequence is the second difference configuration object, and the second The configuration type of the difference configuration object is the deletion type; if the hash value corresponding to the primary key of the first configuration object in the third target order is equal to the hash value corresponding to the primary key of the second configuration object in the third target order, then The configuration types of the third difference configuration object and the third difference configuration object are determined according to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order.
具体地,如图6所示,集合a中的为第二配置对象,集合b中的为第一配置对象。Specifically, as shown in FIG. 6 , the objects in the set a are the second configuration objects, and the objects in the set b are the first configuration objects.
1.将两个集合进行排序(按主键排)1. Sort the two collections (by primary key)
2.如果a[i]<b[j],将a[i]数据转换为差异配置对象,配置类型为创建类型和/或更新类型,加入到结果列表,i++;2. If a[i]<b[j], convert a[i] data into a difference configuration object, the configuration type is the creation type and/or update type, and add it to the result list, i++;
3.如果a[i]>b[j],将b[j]数据转换为差异配置对象,配置类型为删除类型,加入到结果列表,j++;3. If a[i]>b[j], convert the b[j] data into a difference configuration object, the configuration type is the deletion type, and add it to the result list, j++;
4.如果a[i]=b[j],通过第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性生成差异配置对象和配置类型,将差异对象集合加入到结果列表中。4. If a[i]=b[j], generate difference configuration objects and configuration types through each attribute of the first configuration object and each attribute of the second configuration object in the third target order, and collect the difference objects added to the result list.
5.如果a遍历完了,b尚未完成,将b中剩余的第一配置对象转成删除类型的差异配置对象,加入到结果列表;5. If a has been traversed and b has not been completed, convert the remaining first configuration object in b into a difference configuration object of deletion type, and add it to the result list;
6.如果b遍历完了,a尚未完成,将a中剩余的第二配置对象转成创建类型的差异配置对象,加入到结果列表。6. If b has been traversed and a has not been completed, convert the remaining second configuration object in a into a difference configuration object of the created type, and add it to the result list.
7.将结果列表中的差异配置对象和配置类型返回。7. Return the difference configuration object and configuration type in the result list.
针对主键相同的配置对象,确定差异对象包括:对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;若分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。For configuration objects with the same primary key, determining the difference object includes: configuration information for each attribute of the first configuration object in the third target order and configuration information for each attribute of the second configuration object in the third target order Perform difference analysis to obtain the analysis result; if the analysis result indicates that there is a difference, the configuration information of the primary key of the second configuration object in the third target order and the difference attribute of the second configuration object in the third target order are used as The third difference configures the object, and determines that the configuration type of the third difference configuration object is the creation type and/or the update type.
具体地,针对主键相同的两个配置对象,对比差异,返回差异结果。遍历所有属性对应的配置信息,逐个对比,得到分析结果。如果分析结果表征存在差异,也就是说某一个属性的配置信息存在不同。在存在某些属性的配置信息存在差异性,则根据存在差异的属性的配置信息和第二配置对象的主键生成第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Specifically, compare the differences between two configuration objects with the same primary key, and return the difference result. Traverse the configuration information corresponding to all attributes, compare them one by one, and get the analysis results. If there are differences in the representation of the analysis results, it means that the configuration information of a certain attribute is different. When there are differences in the configuration information of certain attributes, a third difference configuration object is generated according to the configuration information of the difference attributes and the primary key of the second configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or or update type.
由于绑定以及解绑等特性是通过属性的标志位来实现的,因此在本申请实施例提供的防火墙配置的处理方法中,在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,该方法还包括:确定处于第三目标序位的第二配置对象的每个属性的标志位;若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型;若目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型;若目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。Since features such as binding and unbinding are implemented through attribute flags, in the firewall configuration processing method provided in the embodiment of this application, each attribute of the first configuration object in the third target sequence Before the difference analysis is performed between the configuration information of the configuration information of the second configuration object and the configuration information of each attribute of the second configuration object in the third target order, the method also includes: determining the configuration information of each attribute of the second configuration object in the third target order flag; if the first flag of the target attribute is the first preset value, the primary key and target attribute of the second configuration object in the third target sequence will be used as the third difference configuration object, and the third difference configuration will be determined The configuration type of the object is the creation type and/or the update type; if the second flag of the target attribute is the second preset value, the primary key and target attribute of the second configuration object in the third target order are used as the third difference Configure the object, and determine that the configuration type of the third difference configuration object is the binding type; if the second flag of the target attribute is the third preset value, the primary key and target of the second configuration object in the third target sequence will be attribute as the third difference configuration object, and determine that the configuration type of the third difference configuration object is the unbinding type.
具体地,读取处于第三目标序位的第二配置对象的每个属性的标志位,如果存在目标属性的第一标志位(unset性质)为第一预设数值(例如,1),则表明对目标属性的配置信息进行了删除。因此,将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Specifically, read the flag bit of each attribute of the second configuration object in the third target sequence, if the first flag bit (unset property) of the target attribute is the first preset value (for example, 1), then Indicates that the configuration information of the target attribute has been deleted. Therefore, the primary key and the target attribute of the second configuration object in the third target order are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or the update type.
如果存在目标属性的第二标志位(绑定性质)为第二预设数值(例如,1),则表明目标属性引用了其他属性,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型。If the second flag (binding property) of the target attribute is the second preset value (for example, 1), it indicates that the target attribute refers to other attributes, and the primary key of the second configuration object in the third target sequence will be and the target attribute as the third difference configuration object, and determine that the configuration type of the third difference configuration object is the binding type.
如果存在目标属性的第二标志位为第三预设数值(例如,0),则表明目标属性不再引用其他属性,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。If the second flag of the target attribute is the third preset value (for example, 0), it indicates that the target attribute no longer refers to other attributes, and the primary key and target attribute of the second configuration object in the third target sequence are used as The third difference configures the object, and determines that the configuration type of the third difference configuration object is the unbinding type.
可选地,在本申请实施例提供的防火墙配置的处理方法中,获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合包括:获取目标防火墙的当前配置数据集合;获取目标对象设置的预设配置数据集合;对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。Optionally, in the firewall configuration processing method provided in the embodiment of the present application, acquiring the current configuration data set in the target data format of the target firewall and the preset configuration data set in the target data format includes: acquiring the current configuration data set of the target firewall ; Obtain the preset configuration data set set by the target object; perform format conversion on the current configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
具体地,采集当前目标防火墙的当前配置数据集合以及用户设置的预设配置数据集合;对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。通过目标数据格式可以有效解决不同版本防火墙配置信息的存储问题Specifically, collect the current configuration data set of the current target firewall and the preset configuration data set set by the user; perform format conversion on the current configuration data set and the preset configuration data set, and obtain the current configuration data set and the target data format of the target data format The preset configuration data set for . The storage problem of firewall configuration information of different versions can be effectively solved through the target data format
为了能够配置不同版本的防火墙,在本申请实施例提供的防火墙配置的处理方法中,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言包括:获取目标防火墙的版本信息,并从转换管理器中确定版本信息对应的转换器,其中,转换管理器中包括多个转换器,每个转换器对应不同的版本信息;通过版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言。In order to be able to configure firewalls of different versions, in the firewall configuration processing method provided in the embodiment of the present application, converting each difference configuration object into an Extensible Markup Language corresponding to the target firewall through a converter corresponding to the version information of the target firewall includes: Obtain the version information of the target firewall, and determine the converter corresponding to the version information from the conversion manager, wherein the conversion manager includes multiple converters, and each converter corresponds to different version information; through the converter corresponding to the version information Convert each differential configuration object to the corresponding Extensible Markup Language of the target firewall.
所有的多版本适配均由转换器(Converter)来完成。对于每一个转换器,支持两个属性y,n。y代表转换器可以支持哪些版本,n代表转换器不支持哪些版本。不支持优先,即,版本在不匹配的定义中,说明转换器不支持此版本。举例,某个转换器的配置为y={“V1-”},n={“V2.1-V2.3”},则表示当前converter只对版本号大于V1的设备生效,但是在V2.1和V2.3之间的配置是不支持的,需要用其它转换器来转换。All multi-version adaptations are done by Converter. For each converter, two attributes y, n are supported. y represents which versions the converter can support, and n represents which versions the converter does not support. Unsupported precedence, i.e., a version in a definition that does not match, means that the converter does not support this version. For example, if the configuration of a certain converter is y={"V1-"}, n={"V2.1-V2.3"}, it means that the current converter is only effective for devices whose version number is greater than V1, but in V2. The configuration between 1 and V2.3 is not supported and needs to be converted by other converters.
本申请实施例提供的防火墙配置的处理方法,通过获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置,解决了相关技术中为了兼容各种版本的防火墙策略,需要采用过多的分支判断语句来处理,导致配置防火墙策略的效率比较低的问题。在本方案中,通过目标数据格式兼顾不同版本防火墙的普遍性和特殊性,通过差异性分析准确得到差异配置对象集合,通过配置类型达到对配置命令进行快速排序的目的,通过转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,进而达到了提高配置防火墙策略的效率的效果。The firewall configuration processing method provided by the embodiment of the present application obtains the current configuration data set in the target data format of the target firewall and the preset configuration data set in the target data format, wherein the current configuration data set in the target data format includes multiple The first configuration object, each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, the preset configuration data set in the target data format includes a plurality of second configuration objects, each second configuration object Including multiple attributes and configuration information corresponding to each attribute, the first configuration object and the second configuration object are configuration objects in the target firewall; performing difference analysis based on multiple first configuration objects and multiple second configuration objects to determine A set of difference configuration objects, wherein the set of difference configuration objects includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and configuration information corresponding to each attribute; The configuration type determines the order of configuration delivery; through the converter corresponding to the version information of the target firewall, each difference configuration object is converted into the Extensible Markup Language corresponding to the target firewall, and the Extensible Markup Language is delivered according to the order of configuration delivery to the target firewall to complete the configuration of the target firewall, which solves the problem in related technologies that in order to be compatible with various versions of firewall policies, too many branch judgment statements are required to process, resulting in relatively low efficiency in configuring firewall policies. In this solution, the universality and particularity of different versions of firewalls are taken into account through the target data format, the set of different configuration objects is accurately obtained through difference analysis, the purpose of quickly sorting configuration commands is achieved through configuration types, and each The difference configuration object is converted into the extensible markup language corresponding to the target firewall, thereby achieving the effect of improving the efficiency of configuring the firewall policy.
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be performed in a computer system, such as a set of computer-executable instructions, and that although a logical order is shown in the flowcharts, in some cases, The steps shown or described may be performed in an order different than here.
本申请实施例还提供了一种防火墙配置的处理装置,需要说明的是,本申请实施例的防火墙配置的处理装置可以用于执行本申请实施例所提供的用于防火墙配置的处理方法。以下对本申请实施例提供的防火墙配置的处理装置进行介绍。The embodiment of the present application also provides a firewall configuration processing device. It should be noted that the firewall configuration processing device in the embodiment of the present application can be used to execute the processing method for firewall configuration provided in the embodiment of the present application. The device for processing the firewall configuration provided by the embodiment of the present application is introduced below.
图7是根据本申请实施例的防火墙配置的处理装置的示意图。如图7所示,该装置包括:获取单元701,分析单元702,第一确定单元703和转换单元704。Fig. 7 is a schematic diagram of a processing device for a firewall configuration according to an embodiment of the present application. As shown in FIG. 7 , the device includes: an acquisition unit 701 , an analysis unit 702 , a first determination unit 703 and a conversion unit 704 .
获取单元701,用于获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;The acquiring unit 701 is configured to acquire a current configuration data set in a target data format and a preset configuration data set in a target data format of the target firewall, wherein the current configuration data set in the target data format includes a plurality of first configuration objects, each The first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the preset configuration data set in the target data format includes a plurality of second configuration objects, and each second configuration object includes a plurality of attributes and each The configuration information corresponding to the attribute, the first configuration object and the second configuration object are configuration objects in the target firewall;
分析单元702,用于依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;The analysis unit 702 is configured to perform difference analysis based on multiple first configuration objects and multiple second configuration objects, and determine a set of difference configuration objects, wherein the set of difference configuration objects includes a plurality of difference configuration objects, and each difference configuration object Including at least one attribute and configuration information corresponding to each attribute;
第一确定单元703,用于依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;The first determining unit 703 is configured to determine the configuration delivery sequence according to the configuration type corresponding to each difference configuration object in the difference configuration object set;
转换单元704,用于通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。The conversion unit 704 is configured to convert each difference configuration object into the XML corresponding to the target firewall through the converter corresponding to the version information of the target firewall, and deliver the XML to the target firewall according to the configuration delivery sequence , to complete the configuration of the target firewall.
具体地,通过目标数据格式解决不同版本防火墙配置信息的存储问题。目标数据格式是屏蔽了版本差异的、仅存储配置的通用实体,可以简称为UCO。Specifically, the storage problem of firewall configuration information of different versions is solved through the target data format. The target data format is a generic entity that shields version differences and only stores configurations, which can be referred to as UCO for short.
例如,一个地址簿对象的属性是有限的,只是因为防火墙各个版本不同,实际在防火墙上存储的方式不同而已。比如对于ip范围属性,虽然存储了相同的信息,但是xml格式不同。UCO摒弃版本间存储的差异,将实际的对象配置信息存储在配置管理中心端,也就说一个配置对象的UCO的配置信息只包括多个属性和每个属性对应的配置信息,不包括版本信息。例如,地址簿,对应的属性就是IP/掩码、IP范围等。For example, the attributes of an address book object are limited, just because the different versions of the firewall are actually stored in different ways on the firewall. For example, for the ip range attribute, although the same information is stored, the xml format is different. UCO discards the differences stored between versions and stores the actual object configuration information in the configuration management center. That is to say, the UCO configuration information of a configuration object only includes multiple attributes and the configuration information corresponding to each attribute, and does not include version information. . For example, address book, the corresponding attributes are IP/mask, IP range and so on.
获取目标数据格式的防火墙的当前配置数据集合,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息。获取目标数据格式的预设配置数据集合,预设配置数据集合是用户根据实际需求想到在防火墙上配置的数据集合。目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息。The current configuration data set of the firewall in the target data format is acquired. The current configuration data set in the target data format includes a plurality of first configuration objects, and each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute. Obtain a preset configuration data set in a target data format, where the preset configuration data set is a data set that a user thinks of to be configured on the firewall according to actual needs. The preset configuration data set in the target data format includes multiple second configuration objects, and each second configuration object includes multiple attributes and configuration information corresponding to each attribute.
差异配置对象用于描述一种配置对象的操作行为,比如,将什么属性修改、将什么属性删除等等,差异配置对象可以简称为CDO。差异配置对象集合用于承载两份UCO配置进行差异比较后,所需要进行的配置操作。差异配置对象集合可以转换成任意版本的一份防火墙配置。差异配置对象集合就是由四种类型的差异配置对象组合而成,分别为“属性解除”、“属性绑定”、“配置删除”、“配置创建或更新”。The difference configuration object is used to describe the operation behavior of a configuration object, for example, which attribute is modified, which attribute is deleted, etc., and the difference configuration object can be called CDO for short. The difference configuration object collection is used to carry the configuration operations that need to be performed after two UCO configurations are compared for differences. A collection of differential configuration objects can be converted into a firewall configuration of any version. The differential configuration object collection is composed of four types of differential configuration objects, which are "property release", "property binding", "configuration deletion", and "configuration creation or update".
【属性解除】表示在两份配置差异对比过程中,需要将某个属性解绑或删除的动作集合,如安全策略不引用某条地址簿时,就会放到这个集合中。【属性绑定】表示在两份配置差异对比过程中,需要将某个属性绑定的动作集合,如安全策略引用某条地址簿时,就会放到这个集合中。【配置删除】表示在两份配置差异对比后,需要删除的配置集合,如在管理端删除某个地址簿,则需要放入该集合中。【配置创建或更新】表示在两份配置差异对比后,需要新建的配置集合,如果在管理端创建某个地址簿,刚需要放入该集合中。[Attribute release] indicates the set of actions that need to unbind or delete an attribute during the comparison of two configuration differences. For example, if the security policy does not refer to an address book, it will be placed in this set. 【Attribute Binding】Indicates the set of actions that need to be bound to an attribute during the comparison of two configuration differences. For example, when a security policy references an address book, it will be placed in this set. 【Delete Configuration】Indicates the configuration collection that needs to be deleted after comparing the differences between the two configurations. If you delete an address book on the management side, you need to put it into this collection. [Configuration creation or update] means that after comparing the differences between the two configurations, a new configuration collection is required. If an address book is created on the management side, it needs to be put into the collection just now.
经过此种结构的设计,各模块只要比较出配置类型,放到差异配置对象集合中,系统会自动根据依赖关系将差异配置对象集合转换为XML(可扩展标记语言)。差异配置对象集合的数据结构可以如图2所示。After the design of this structure, as long as each module compares the configuration type and puts it into the difference configuration object set, the system will automatically convert the difference configuration object set into XML (Extensible Markup Language) according to the dependency relationship. The data structure of the differential configuration object set may be shown in FIG. 2 .
两个UCO对比会生成多个CDO,因为对比差异会有解绑类型的CDO,会有绑定类型的CDO等等。如图3所示。因此,对多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象的配置类型。The comparison of two UCOs will generate multiple CDOs, because there will be CDOs of the unbound type, CDOs of the bound type, and so on. As shown in Figure 3. Therefore, a difference analysis is performed on the plurality of first configuration objects and the plurality of second configuration objects, and a set of difference configuration objects and a configuration type of each difference configuration object are determined.
在实际各厂商的防火墙配置中,基本都会涉及到各待配置的模块间配置与配置引用的问题,更有甚者,会涉及到模块间配置循环引用的情况ModuleA、ModuleB、ModuleC是三个配置模块,但是三种配置中的实例存在循环引用的情况。aname1引用bname1,bname1引用cname1,cname1引用aname1。在这种情况下,使用传统的配置方式永远不会成功,因为每种配置的创建都需要另一种配置作为前提。但是通过差异配置对象集合可以实现上述配置。在配置全部为新增的情况下,系统会将上述配置转换为6个CDO对象,分别为:创建aname1、bname1、cname1对象,绑定aname1、bname1、cname1的引用关系,如图4所示。然后,根据差异配置对象集合中每个差异配置对象对应的配置类型确定配置下发顺序。In the actual firewall configuration of each manufacturer, it will basically involve the configuration and configuration reference between the modules to be configured, and what is more, it will involve the configuration circular reference between the modules. ModuleA, ModuleB, and ModuleC are three configurations. module, but instances in the three configurations have circular references. aname1 refers to bname1, bname1 refers to cname1, and cname1 refers to aname1. In this case, using traditional configuration methods will never succeed, because the creation of each configuration requires another configuration as a prerequisite. But the above configuration can be achieved through a collection of differential configuration objects. In the case that all the configurations are new, the system will convert the above configurations into 6 CDO objects, respectively: create aname1, bname1, cname1 objects, and bind the reference relationship of aname1, bname1, cname1, as shown in Figure 4. Then, determine the configuration delivery order according to the configuration type corresponding to each difference configuration object in the difference configuration object set.
在一可选的实施例中,执行顺序为:第一配置类型是解绑类型的CDO、第二配置类型是删除类型的CDO、第三配置类型是创建类型或者更新类型的CDO。第四配置类型为绑定类型。同种类型的CDO是没有严格顺序的。In an optional embodiment, the execution order is as follows: the first configuration type is unbinding CDO, the second configuration type is deletion CDO, and the third configuration type is creation or update CDO. The fourth configuration type is a binding type. There is no strict order for CDOs of the same type.
通过上述的顺序下发图4中的6个CDO对象,究竟可以准确实现对ModuleA、ModuleB、ModuleC这三个配置模块的配置。By issuing the six CDO objects in Figure 4 in the above order, the configuration of the three configuration modules ModuleA, ModuleB, and ModuleC can be accurately realized after all.
在确定配置下发顺序之后,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。After determining the configuration delivery sequence, convert each difference configuration object into the corresponding XML of the target firewall through the converter corresponding to the version information of the target firewall, and deliver the XML to the target firewall to complete the The configuration of the target firewall.
转换器管理器中提供各种版本的基础转换器Base Converter,用于将一份差异配置对象集合转换为防火墙可以识别的xml,例如address Base Converter。如果地址簿版本间差异过大,支持自定义其它版本转换器,如addressV1Converter。The converter manager provides various versions of the base converter Base Converter, which is used to convert a set of differential configuration objects into xml that can be recognized by the firewall, such as address Base Converter. If the difference between the address book versions is too large, it is supported to customize other version converters, such as addressV1Converter.
转换器管理器(Converter Factory Manager),就是用来管理转换器的容器,Converter Factory Manager对外提供方法,可以根据模块名及【版本信息】,返回相应的转换器,用于xml转换,如图5所示。所有的多版本适配均由转换器(Converter)来完成。对于每一个转换器,支持两个属性y,n。y代表转换器可以支持哪些版本,n代表转换器不支持哪些版本。不支持的优先级高估支持的优先级,即,说明转换器不支持此版本。例如,某个转换器的配置为y={“V1-”},n={“V2.1-V2.3”},则表示当前converter只对版本号大于V1的设备生效,但是在V2.1和V2.3之间的配置是不支持的,需要用其它转换器来转换。Converter Factory Manager (Converter Factory Manager) is a container used to manage converters. Converter Factory Manager provides methods to the outside world, which can return corresponding converters according to the module name and [version information] for xml conversion, as shown in Figure 5 shown. All multi-version adaptations are done by Converter. For each converter, two attributes y, n are supported. y represents which versions the converter can support, and n represents which versions the converter does not support. The priority of unsupported overestimates the priority of supported, i.e., the version is not supported by the converter. For example, if the configuration of a certain converter is y={"V1-"}, n={"V2.1-V2.3"}, it means that the current converter is only effective for devices whose version number is greater than V1, but in V2. The configuration between 1 and V2.3 is not supported and needs to be converted by other converters.
综上所述,通过目标数据格式兼顾不同版本防火墙的普遍性和特殊性,通过差异性分析准确得到差异配置对象集合,通过配置类型达到对配置命令进行快速排序的目的,通过转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,进而达到了提高配置防火墙策略的效率的效果。To sum up, the universality and particularity of different versions of firewalls are taken into account through the target data format, the set of different configuration objects is accurately obtained through difference analysis, the purpose of quickly sorting configuration commands is achieved through configuration types, and each The difference configuration object is converted into the extensible markup language corresponding to the target firewall, thereby achieving the effect of improving the efficiency of configuring the firewall policy.
本申请实施例提供的防火墙配置的处理装置,通过获取单元701获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;分析单元702依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;第一确定单元703依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;转换单元704通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置,解决了相关技术中为了兼容各种版本的防火墙策略,需要采用过多的分支判断语句来处理,导致配置防火墙策略的效率比较低的问题。在本方案中,通过目标数据格式兼顾不同版本防火墙的普遍性和特殊性,通过差异性分析准确得到差异配置对象集合,通过配置类型达到对配置命令进行快速排序的目的,通过转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,进而达到了提高配置防火墙策略的效率的效果。The firewall configuration processing device provided in the embodiment of the present application obtains the current configuration data set in the target data format and the preset configuration data set in the target data format of the target firewall through the acquisition unit 701, wherein the current configuration data set in the target data format Including multiple first configuration objects, each first configuration object includes multiple attributes and configuration information corresponding to each attribute, and the preset configuration data set in the target data format includes multiple second configuration objects, each second The configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the first configuration object and the second configuration object are configuration objects in the target firewall; the analysis unit 702 Perform difference analysis to determine a set of difference configuration objects, wherein the set of difference configuration objects includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and configuration information corresponding to each attribute; the first determination unit 703 according to the difference The configuration type corresponding to each difference configuration object in the configuration object set determines the configuration delivery order; the conversion unit 704 converts each difference configuration object into the extensible markup language corresponding to the target firewall through the converter corresponding to the version information of the target firewall, And according to the order of configuration delivery, the Extensible Markup Language is delivered to the target firewall to complete the configuration of the target firewall, which solves the problem that in related technologies, in order to be compatible with various versions of firewall policies, it is necessary to use too many branch judgment statements to process , leading to the problem that the efficiency of configuring firewall policies is relatively low. In this solution, the universality and particularity of different versions of firewalls are taken into account through the target data format, the set of different configuration objects is accurately obtained through difference analysis, the purpose of quickly sorting configuration commands is achieved through configuration types, and each The difference configuration object is converted into the extensible markup language corresponding to the target firewall, thereby achieving the effect of improving the efficiency of configuring the firewall policy.
可选地,在本申请实施例提供的防火墙配置的处理装置中,第一确定单元703包括:第三获取模块,用于获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;第一排序模块,用于依据第一主键对多个第一配置对象进行排序,得到排序后的第一配置对象;第二排序模块,用于依据第二主键对多个第二配置对象进行排序,得到排序后的第二配置对象;分析模块,用于将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型。Optionally, in the firewall configuration processing apparatus provided in the embodiment of the present application, the first determination unit 703 includes: a third acquisition module, configured to acquire the first primary key corresponding to each first configuration object and each second configuration object The second primary key corresponding to the object; the first sorting module is used to sort multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; the second sorting module is used to sort multiple configuration objects according to the second primary key The second configuration objects are sorted to obtain the sorted second configuration objects; the analysis module is used to analyze the differences between the first configuration objects and the second configuration objects in the same order, and determine the set of difference configuration objects and each The configuration type corresponding to the difference configuration object.
具体地,对多个第一配置对象和多个第二配置对象进行差异性分析包括:确定每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键。然后根据第一主键对第一配置对象进行排序和根据第二主键对第二配置对象进行排序,然后通过对比处于相同序位的第一配置对象和第二配置对象确定差异配置对象集合和每个差异配置对象对应的配置类型。Specifically, performing difference analysis on the plurality of first configuration objects and the plurality of second configuration objects includes: determining a first primary key corresponding to each first configuration object and a second primary key corresponding to each second configuration object. Then sort the first configuration object according to the first primary key and sort the second configuration object according to the second primary key, and then determine the difference configuration object set and each by comparing the first configuration object and the second configuration object in the same order The configuration type corresponding to the difference configuration object.
可选地,在本申请实施例提供的防火墙配置的处理装置中,配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,分析模块包括:第一确定子模块,用于若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定处于第一目标序位的第一配置对象为第一差异配置对象,且确定第一差异配置对象的配置类型为创建类型和/或更新类型;第二确定子模块,用于若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定处于第二目标序位的第二配置对象为第二差异配置对象,且确定第二差异配置对象的配置类型为删除类型;第三确定子模块,用于若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型。Optionally, in the firewall configuration processing device provided in the embodiment of the present application, the configuration type includes at least: unbinding type, deletion type, creation type and/or update type, and binding type, and the analysis module includes: a first determiner A module, configured to determine that the primary key of the first configuration object in the first target sequence corresponds to a hash value greater than the hash value corresponding to the primary key of the second configuration object in the first target sequence. The first configuration object of the bit is the first difference configuration object, and it is determined that the configuration type of the first difference configuration object is the creation type and/or the update type; the second determination submodule is used if the first The hash value corresponding to the primary key of the configuration object is less than the hash value corresponding to the primary key of the second configuration object in the target sequence, then determine that the second configuration object in the second target sequence is the second difference configuration object, and determine the first The configuration type of the second difference configuration object is the deletion type; the third determining submodule is used to determine if the hash value corresponding to the primary key of the first configuration object in the third target sequence is equal to the second configuration object in the third target sequence According to the hash value corresponding to the primary key of , then determine the third difference configuration object and the third The configuration type of the diff configuration object.
具体地,如图6所示,集合a中的为第二配置对象,集合b中的为第一配置对象。Specifically, as shown in FIG. 6 , the objects in the set a are the second configuration objects, and the objects in the set b are the first configuration objects.
1.将两个集合进行排序(按主键排)1. Sort the two collections (by primary key)
2.如果a[i]<b[j],将a[i]数据转换为差异配置对象,配置类型为创建类型和/或更新类型,加入到结果列表,i++;2. If a[i]<b[j], convert a[i] data into a difference configuration object, the configuration type is the creation type and/or update type, and add it to the result list, i++;
3.如果a[i]>b[j],将b[j]数据转换为差异配置对象,配置类型为删除类型,加入到结果列表,j++;3. If a[i]>b[j], convert the b[j] data into a difference configuration object, the configuration type is the deletion type, and add it to the result list, j++;
4.如果a[i]=b[j],通过第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性生成差异配置对象和配置类型,将差异对象集合加入到结果列表中。4. If a[i]=b[j], generate difference configuration objects and configuration types through each attribute of the first configuration object and each attribute of the second configuration object in the third target order, and collect the difference objects added to the result list.
5.如果a遍历完了,b尚未完成,将b中剩余的第一配置对象转成删除类型的差异配置对象,加入到结果列表;5. If a has been traversed and b has not been completed, convert the remaining first configuration object in b into a difference configuration object of deletion type, and add it to the result list;
6.如果b遍历完了,a尚未完成,将a中剩余的第二配置对象转成创建类型的差异配置对象,加入到结果列表。6. If b has been traversed and a has not been completed, convert the remaining second configuration object in a into a difference configuration object of the created type, and add it to the result list.
7.将结果列表中的差异配置对象和配置类型返回。7. Return the difference configuration object and configuration type in the result list.
可选地,在本申请实施例提供的防火墙配置的处理装置中,第三确定子模块包括:分析子模块,用于对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;处理子模块,用于若分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Optionally, in the firewall configuration processing device provided in the embodiment of the present application, the third determination submodule includes: an analysis submodule, configured to analyze the configuration information of each attribute of the first configuration object in the third target order Perform difference analysis with the configuration information of each attribute of the second configuration object in the third target sequence to obtain the analysis result; the processing sub-module is used to convert the The primary key of the second configuration object and the configuration information of the difference attribute of the second configuration object in the third target order are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or the update type.
具体地,针对主键相同的两个配置对象,对比差异,返回差异结果。遍历所有属性对应的配置信息,逐个对比,得到分析结果。如果分析结果表征存在差异,也就是说某一个属性的配置信息存在不同。在存在某些属性的配置信息存在差异性,则根据存在差异的属性的配置信息和第二配置对象的主键生成第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Specifically, compare the differences between two configuration objects with the same primary key, and return the difference result. Traverse the configuration information corresponding to all attributes, compare them one by one, and get the analysis results. If there are differences in the representation of the analysis results, it means that the configuration information of a certain attribute is different. When there are differences in the configuration information of certain attributes, a third difference configuration object is generated according to the configuration information of the difference attributes and the primary key of the second configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or or update type.
可选地,在本申请实施例提供的防火墙配置的处理装置中,该装置还包括:第二确定单元,用于在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,确定处于第三目标序位的第二配置对象的每个属性的标志位;第三确定单元,用于若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型;第四确定单元,用于若目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型;第五确定单元,用于若目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。Optionally, in the device for processing firewall configuration provided in the embodiment of the present application, the device further includes: a second determining unit, configured to configure the configuration information of each attribute of the first configuration object in the third target order Before performing difference analysis with the configuration information of each attribute of the second configuration object in the third target order, determine the flag bit of each attribute of the second configuration object in the third target order; the third determination unit, It is used to use the primary key and target attribute of the second configuration object in the third target order as the third difference configuration object if the first flag bit of the target attribute is the first preset value, and determine the third difference configuration object The configuration type is the creation type and/or the update type; the fourth determining unit is used to set the primary key and The target attribute is used as the third difference configuration object, and it is determined that the configuration type of the third difference configuration object is the binding type; the fifth determination unit is used to set the target attribute to the third preset value if the second flag bit is the third preset value. The primary key and target attribute of the second configuration object in the three-target sequence are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the unbinding type.
具体地,读取处于第三目标序位的第二配置对象的每个属性的标志位,如果存在目标属性的第一标志位(unset性质)为第一预设数值(例如,1),则表明对目标属性的配置信息进行了删除。因此,将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Specifically, read the flag bit of each attribute of the second configuration object in the third target sequence, if the first flag bit (unset property) of the target attribute is the first preset value (for example, 1), then Indicates that the configuration information of the target attribute has been deleted. Therefore, the primary key and the target attribute of the second configuration object in the third target order are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the creation type and/or the update type.
如果存在目标属性的第二标志位(绑定性质)为第二预设数值(例如,1),则表明目标属性引用了其他属性,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型。If the second flag (binding property) of the target attribute is the second preset value (for example, 1), it indicates that the target attribute refers to other attributes, and the primary key of the second configuration object in the third target sequence will be and the target attribute as the third difference configuration object, and determine that the configuration type of the third difference configuration object is the binding type.
如果存在目标属性的第二标志位为第三预设数值(例如,0),则表明目标属性不再引用其他属性,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。If the second flag of the target attribute is the third preset value (for example, 0), it indicates that the target attribute no longer refers to other attributes, and the primary key and target attribute of the second configuration object in the third target sequence are used as The third difference configures the object, and determines that the configuration type of the third difference configuration object is the unbinding type.
可选地,在本申请实施例提供的防火墙配置的处理装置中,获取单元701包括:第一获取模块,用于获取目标防火墙的当前配置数据集合;第二获取模块,用于获取目标对象设置的预设配置数据集合;第一转换模块,用于对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。Optionally, in the firewall configuration processing device provided in the embodiment of the present application, the acquiring unit 701 includes: a first acquiring module, configured to acquire the current configuration data set of the target firewall; a second acquiring module, configured to acquire the target object setting The preset configuration data set; the first conversion module is configured to perform format conversion on the current configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
具体地,采集当前目标防火墙的当前配置数据集合以及用户设置的预设配置数据集合;对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。通过目标数据格式可以有效解决不同版本防火墙配置信息的存储问题。Specifically, collect the current configuration data set of the current target firewall and the preset configuration data set set by the user; perform format conversion on the current configuration data set and the preset configuration data set, and obtain the current configuration data set and the target data format of the target data format The preset configuration data set for . The storage problem of firewall configuration information of different versions can be effectively solved through the target data format.
可选地,在本申请实施例提供的防火墙配置的处理装置中,转换单元包括:第四获取模块,用于获取目标防火墙的版本信息,并从转换管理器中确定版本信息对应的转换器,其中,转换管理器中包括多个转换器,每个转换器对应不同的版本信息;第二转换模块,用于通过版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言。Optionally, in the processing device for firewall configuration provided in the embodiment of the present application, the conversion unit includes: a fourth acquisition module, configured to acquire version information of the target firewall, and determine a converter corresponding to the version information from the conversion manager, Wherein, the conversion manager includes a plurality of converters, and each converter corresponds to different version information; the second conversion module is used to convert each difference configuration object into an extensible configuration object corresponding to the target firewall through the converter corresponding to the version information. markup language.
防火墙配置的处理装置包括处理器和存储器,上述的获取单元701,分析单元702,第一确定单元703和转换单元704等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The processing device configured by the firewall includes a processor and a memory. The above-mentioned acquisition unit 701, analysis unit 702, first determination unit 703, and conversion unit 704 are all stored in the memory as program units, and the above-mentioned programs stored in the memory are executed by the processor. Program unit to realize the corresponding function.
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来实现对防火墙的配置。The processor includes a kernel, and the kernel fetches corresponding program units from the memory. One or more kernels can be set, and the configuration of the firewall can be realized by adjusting kernel parameters.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。Memory may include non-permanent memory in computer-readable media, in the form of random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory including at least one memory chip.
本发明实施例提供了一种处理器,处理器用于运行程序,其中,程序运行时执行防火墙配置的处理方法。An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein, when the program is running, the firewall configuration processing method is executed.
如图8所示,本发明实施例提供了一种电子设备,设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现以下步骤:获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。As shown in FIG. 8 , an embodiment of the present invention provides an electronic device. The device includes a processor, a memory, and a program stored on the memory and operable on the processor. When the processor executes the program, the following steps are implemented: obtain the target firewall The current configuration data set in the target data format and the preset configuration data set in the target data format, wherein the current configuration data set in the target data format includes a plurality of first configuration objects, and each first configuration object includes a plurality of attributes The configuration information corresponding to each attribute, the preset configuration data set in the target data format includes multiple second configuration objects, each second configuration object includes multiple attributes and configuration information corresponding to each attribute, the first configuration The object and the second configuration object are configuration objects in the target firewall; performing difference analysis based on multiple first configuration objects and multiple second configuration objects to determine a set of differential configuration objects, wherein the set of differential configuration objects includes multiple differential configurations Object, each difference configuration object includes at least one attribute and configuration information corresponding to each attribute; according to the configuration type corresponding to each difference configuration object in the difference configuration object set, determine the order of configuration delivery; through the version information of the target firewall The converter converts each difference configuration object into the corresponding XML of the target firewall, and sends the XML to the target firewall according to the order of configuration distribution, so as to complete the configuration of the target firewall.
可选地,依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合包括:获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;依据第一主键对多个第一配置对象进行排序,得到排序后的第一配置对象;依据第二主键对多个第二配置对象进行排序,得到排序后的第二配置对象;将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型。Optionally, performing difference analysis based on a plurality of first configuration objects and a plurality of second configuration objects, and determining a set of difference configuration objects includes: obtaining the first primary key corresponding to each first configuration object and the corresponding the second primary key; sort multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; sort multiple second configuration objects according to the second primary key to obtain the sorted second configuration objects ; Analyzing the difference between the first configuration object and the second configuration object in the same order, and determining the set of difference configuration objects and the configuration type corresponding to each difference configuration object.
可选地,配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型包括:若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定处于第一目标序位的第一配置对象为第一差异配置对象,且确定第一差异配置对象的配置类型为创建类型和/或更新类型;若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定处于第二目标序位的第二配置对象为第二差异配置对象,且确定第二差异配置对象的配置类型为删除类型;若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型。Optionally, the configuration type at least includes: unbinding type, deletion type, creation type and/or update type, binding type, performing difference analysis on the first configuration object and the second configuration object in the same order, and determining the difference The configuration object set and the configuration type corresponding to each difference configuration object include: if the hash value corresponding to the primary key of the first configuration object in the first target sequence is greater than the hash value corresponding to the primary key of the second configuration object in the first target sequence hash value, it is determined that the first configuration object in the first target order is the first difference configuration object, and the configuration type of the first difference configuration object is determined to be the creation type and/or the update type; if it is in the second target order The hash value corresponding to the primary key of the first configuration object is smaller than the hash value corresponding to the primary key of the second configuration object in the target sequence, then determine that the second configuration object in the second target sequence is the second difference configuration object, And determine that the configuration type of the second difference configuration object is the deletion type; if the hash value corresponding to the primary key of the first configuration object in the third target sequence is equal to the hash value corresponding to the primary key of the second configuration object in the third target sequence According to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order, determine the configuration of the third difference configuration object and the third difference configuration object type.
可选地,依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型包括:对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;若分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Optionally, determine the configurations of the third difference configuration object and the third difference configuration object according to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order The type includes: analyzing the difference between the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, and obtaining the analysis result; If there is a difference in the analysis result representation, the configuration information of the primary key of the second configuration object in the third target sequence and the difference attribute of the second configuration object in the third target sequence is used as the third difference configuration object, and the first difference is determined. The configuration type of the three-difference configuration object is a creation type and/or an update type.
可选地,在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,方法还包括:确定处于第三目标序位的第二配置对象的每个属性的标志位;若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型;若目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型;若目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。Optionally, before performing difference analysis on the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, the method It also includes: determining the flag bit of each attribute of the second configuration object in the third target sequence; if the first flag bit of the target attribute is the first preset value, the second configuration object in the third target sequence The primary key and target attribute of the configuration object are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined to be the creation type and/or the update type; if the second flag bit of the target attribute is the second preset value, then the The primary key and target attribute of the second configuration object in the third target order are used as the third differential configuration object, and the configuration type of the third differential configuration object is determined to be the binding type; if the second flag of the target attribute is the third preset If the value is set, the primary key and target attribute of the second configuration object in the third target sequence are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the unbinding type.
可选地,获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合包括:获取目标防火墙的当前配置数据集合;获取目标对象设置的预设配置数据集合;对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。Optionally, obtaining the current configuration data set in the target data format of the target firewall and the preset configuration data set in the target data format includes: acquiring the current configuration data set of the target firewall; acquiring the preset configuration data set set by the target object; Format conversion is performed on the configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
可选地,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言包括:获取目标防火墙的版本信息,并从转换管理器中确定版本信息对应的转换器,其中,转换管理器中包括多个转换器,每个转换器对应不同的版本信息;通过版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言。Optionally, using the converter corresponding to the version information of the target firewall to convert each difference configuration object into the Extensible Markup Language corresponding to the target firewall includes: obtaining the version information of the target firewall, and determining the corresponding version information from the conversion manager. A converter, wherein the conversion manager includes a plurality of converters, and each converter corresponds to different version information; each difference configuration object is converted into the Extensible Markup Language corresponding to the target firewall through the converter corresponding to the version information.
本文中的设备可以是服务器、PC、PAD、手机等。The devices in this article can be servers, PCs, PADs, mobile phones, etc.
本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合,其中,目标数据格式的当前配置数据集合中包括多个第一配置对象,每个第一配置对象中包括多个属性和每个属性对应的配置信息,目标数据格式的预设配置数据集合中包括多个第二配置对象,每个第二配置对象中包括多个属性和每个属性对应的配置信息,第一配置对象和第二配置对象是目标防火墙中的配置对象;依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合,其中,差异配置对象集合包括多个差异配置对象,每个差异配置对象中包括至少一个属性和每个属性对应的配置信息;依据差异配置对象集合中每个差异配置对象对应的配置类型,确定配置下发顺序;通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言,并依据配置下发顺序,将可扩展标记语言下发至目标防火墙,以完成对目标防火墙的配置。The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the method steps of: obtaining a current configuration data set of a target data format of a target firewall and a preset of the target data format The configuration data set, wherein the current configuration data set in the target data format includes a plurality of first configuration objects, each first configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the preset configuration of the target data format The data set includes a plurality of second configuration objects, and each second configuration object includes a plurality of attributes and configuration information corresponding to each attribute, and the first configuration object and the second configuration object are configuration objects in the target firewall; A difference analysis is performed on a first configuration object and a plurality of second configuration objects to determine a difference configuration object set, wherein the difference configuration object set includes a plurality of difference configuration objects, and each difference configuration object includes at least one attribute and each attribute Corresponding configuration information; according to the configuration type corresponding to each difference configuration object in the difference configuration object set, determine the configuration delivery sequence; convert each difference configuration object into the corresponding version information of the target firewall through the converter corresponding to the version information of the target firewall Extensible Markup Language, and according to the order of configuration delivery, the Extensible Markup Language is delivered to the target firewall to complete the configuration of the target firewall.
可选地,依据多个第一配置对象和多个第二配置对象进行差异性分析,确定差异配置对象集合包括:获取每个第一配置对象对应的第一主键和每个第二配置对象对应的第二主键;依据第一主键对多个第一配置对象进行排序,得到排序后的第一配置对象;依据第二主键对多个第二配置对象进行排序,得到排序后的第二配置对象;将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型。Optionally, performing difference analysis based on a plurality of first configuration objects and a plurality of second configuration objects, and determining a set of difference configuration objects includes: obtaining the first primary key corresponding to each first configuration object and the corresponding the second primary key; sort multiple first configuration objects according to the first primary key to obtain the sorted first configuration objects; sort multiple second configuration objects according to the second primary key to obtain the sorted second configuration objects ; Analyzing the difference between the first configuration object and the second configuration object in the same order, and determining the set of difference configuration objects and the configuration type corresponding to each difference configuration object.
可选地,配置类型至少包括:解绑类型、删除类型、创建类型和/或更新类型、绑定类型,将处于相同序位的第一配置对象和第二配置对象进行差异性分析,确定差异配置对象集合和每个差异配置对象对应的配置类型包括:若处于第一目标序位的第一配置对象的主键对应的哈希值大于处于第一目标序位的第二配置对象的主键对应的哈希值,则确定处于第一目标序位的第一配置对象为第一差异配置对象,且确定第一差异配置对象的配置类型为创建类型和/或更新类型;若处于第二目标序位的第一配置对象的主键对应的哈希值小于处于目标序位的第二配置对象的主键对应的哈希值,则确定处于第二目标序位的第二配置对象为第二差异配置对象,且确定第二差异配置对象的配置类型为删除类型;若处于第三目标序位的第一配置对象的主键对应的哈希值等于处于第三目标序位的第二配置对象的主键对应的哈希值,则依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型。Optionally, the configuration type at least includes: unbinding type, deletion type, creation type and/or update type, binding type, performing difference analysis on the first configuration object and the second configuration object in the same order, and determining the difference The configuration object set and the configuration type corresponding to each difference configuration object include: if the hash value corresponding to the primary key of the first configuration object in the first target sequence is greater than the hash value corresponding to the primary key of the second configuration object in the first target sequence hash value, it is determined that the first configuration object in the first target order is the first difference configuration object, and the configuration type of the first difference configuration object is determined to be the creation type and/or the update type; if it is in the second target order The hash value corresponding to the primary key of the first configuration object is smaller than the hash value corresponding to the primary key of the second configuration object in the target sequence, then determine that the second configuration object in the second target sequence is the second difference configuration object, And determine that the configuration type of the second difference configuration object is the deletion type; if the hash value corresponding to the primary key of the first configuration object in the third target sequence is equal to the hash value corresponding to the primary key of the second configuration object in the third target sequence According to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order, determine the configuration of the third difference configuration object and the third difference configuration object type.
可选地,依据处于第三目标序位的第一配置对象的每个属性与处于第三目标序位的第二配置对象的每个属性确定第三差异配置对象和第三差异配置对象的配置类型包括:对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析,得到分析结果;若分析结果表征存在差异,则将处于第三目标序位的第二配置对象的主键和处于第三目标序位的第二配置对象的差异属性的配置信息作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型。Optionally, determine the configurations of the third difference configuration object and the third difference configuration object according to each attribute of the first configuration object in the third target order and each attribute of the second configuration object in the third target order The type includes: analyzing the difference between the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, and obtaining the analysis result; If there is a difference in the analysis result representation, the configuration information of the primary key of the second configuration object in the third target sequence and the difference attribute of the second configuration object in the third target sequence is used as the third difference configuration object, and the first difference is determined. The configuration type of the three-difference configuration object is a creation type and/or an update type.
可选地,在对处于第三目标序位的第一配置对象的每个属性的配置信息和处于第三目标序位的第二配置对象的每个属性的配置信息进行差异性分析之前,方法还包括:确定处于第三目标序位的第二配置对象的每个属性的标志位;若存在目标属性的第一标志位为第一预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为创建类型和/或更新类型;若目标属性的第二标志位为第二预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为绑定类型;若目标属性的第二标志位为第三预设数值,则将处于第三目标序位的第二配置对象的主键和目标属性作为第三差异配置对象,并确定第三差异配置对象的配置类型为解绑类型。Optionally, before performing difference analysis on the configuration information of each attribute of the first configuration object in the third target order and the configuration information of each attribute of the second configuration object in the third target order, the method It also includes: determining the flag bit of each attribute of the second configuration object in the third target sequence; if the first flag bit of the target attribute is the first preset value, the second configuration object in the third target sequence The primary key and target attribute of the configuration object are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined to be the creation type and/or the update type; if the second flag bit of the target attribute is the second preset value, then the The primary key and target attribute of the second configuration object in the third target order are used as the third differential configuration object, and the configuration type of the third differential configuration object is determined to be the binding type; if the second flag of the target attribute is the third preset If the value is set, the primary key and target attribute of the second configuration object in the third target sequence are used as the third difference configuration object, and the configuration type of the third difference configuration object is determined as the unbinding type.
可选地,获取目标防火墙的目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集合包括:获取目标防火墙的当前配置数据集合;获取目标对象设置的预设配置数据集合;对当前配置数据集合和预设配置数据集合进行格式转换,得到目标数据格式的当前配置数据集合和目标数据格式的预设配置数据集。Optionally, obtaining the current configuration data set in the target data format of the target firewall and the preset configuration data set in the target data format includes: acquiring the current configuration data set of the target firewall; acquiring the preset configuration data set set by the target object; Format conversion is performed on the configuration data set and the preset configuration data set to obtain the current configuration data set in the target data format and the preset configuration data set in the target data format.
可选地,通过目标防火墙的版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言包括:获取目标防火墙的版本信息,并从转换管理器中确定版本信息对应的转换器,其中,转换管理器中包括多个转换器,每个转换器对应不同的版本信息;通过版本信息对应的转换器将每个差异配置对象转换为目标防火墙对应的可扩展标记语言。Optionally, using the converter corresponding to the version information of the target firewall to convert each difference configuration object into the Extensible Markup Language corresponding to the target firewall includes: obtaining the version information of the target firewall, and determining the corresponding version information from the conversion manager. A converter, wherein the conversion manager includes a plurality of converters, and each converter corresponds to different version information; each difference configuration object is converted into the Extensible Markup Language corresponding to the target firewall through the converter corresponding to the version information.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. The memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211625513.2A CN116032764A (en) | 2022-12-16 | 2022-12-16 | Firewall configuration processing method and device, processor and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211625513.2A CN116032764A (en) | 2022-12-16 | 2022-12-16 | Firewall configuration processing method and device, processor and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116032764A true CN116032764A (en) | 2023-04-28 |
Family
ID=86078961
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211625513.2A Pending CN116032764A (en) | 2022-12-16 | 2022-12-16 | Firewall configuration processing method and device, processor and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116032764A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109918123A (en) * | 2019-03-11 | 2019-06-21 | 山石网科通信技术股份有限公司 | The configuration method and device of firewall markup language |
WO2019200783A1 (en) * | 2018-04-18 | 2019-10-24 | 平安科技(深圳)有限公司 | Method for data crawling in page containing dynamic image or table, device, terminal, and storage medium |
CN111917834A (en) * | 2020-07-13 | 2020-11-10 | 腾讯科技(深圳)有限公司 | A data synchronization method, device, storage medium and computer equipment |
CN114666212A (en) * | 2022-03-25 | 2022-06-24 | 阿里云计算有限公司 | Configuration data issuing method |
-
2022
- 2022-12-16 CN CN202211625513.2A patent/CN116032764A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019200783A1 (en) * | 2018-04-18 | 2019-10-24 | 平安科技(深圳)有限公司 | Method for data crawling in page containing dynamic image or table, device, terminal, and storage medium |
CN109918123A (en) * | 2019-03-11 | 2019-06-21 | 山石网科通信技术股份有限公司 | The configuration method and device of firewall markup language |
CN111917834A (en) * | 2020-07-13 | 2020-11-10 | 腾讯科技(深圳)有限公司 | A data synchronization method, device, storage medium and computer equipment |
CN114666212A (en) * | 2022-03-25 | 2022-06-24 | 阿里云计算有限公司 | Configuration data issuing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230244516A1 (en) | Dynamic image composition for container deployment | |
CN112639740B (en) | Hierarchical API for defining multi-segment applications in the SDDC | |
US9405529B2 (en) | Designing and cross-configuring software | |
KR102464337B1 (en) | System and method for determination of partition identifiers in a multitenant application server environment | |
US7490265B2 (en) | Recovery segment identification in a computing infrastructure | |
CN112714018B (en) | Gateway-based ElasticSearch search service method, system, medium and terminal | |
US9984086B2 (en) | Performing actions on objects as a result of applying tags to the objects | |
CN108763960A (en) | Access authorization for resource management method and device | |
US20230101973A1 (en) | Protecting instances of resources of a container orchestration platform from unintentional deletion | |
CN114239055B (en) | Multi-tenant isolation method and system for distributed database | |
US12293241B2 (en) | Automated generation of application programming interfaces for microservices | |
US9436716B2 (en) | Method and system for data plane abstraction to enable a network storage platform ecosystem | |
US12314425B2 (en) | Privacy data management in distributed computing systems | |
JP7501983B2 (en) | Secure handling of unified message flows in multitenant containers | |
US10783073B2 (en) | Chronologically ordered out-of-place update key-value storage system | |
US11360789B2 (en) | Configuration of hardware devices | |
US20200150979A1 (en) | Instance mapping engine and tools | |
US20180336503A1 (en) | Model-driven and automated system for shared resource solution design | |
US10942787B2 (en) | Instance mapping engine and tools | |
US11924031B2 (en) | Highly scalable container network interface operation to reduce startup overhead of functions | |
US11595493B2 (en) | System and method for namespace masking in an integration flow | |
US8656410B1 (en) | Conversion of lightweight object to a heavyweight object | |
US9626371B2 (en) | Attribute selectable file operation | |
CN116032764A (en) | Firewall configuration processing method and device, processor and electronic equipment | |
WO2024021952A1 (en) | Sharing 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 |