[go: up one dir, main page]

CN118473921B - A method and device for planning CDN edge node port opening - Google Patents

A method and device for planning CDN edge node port opening Download PDF

Info

Publication number
CN118473921B
CN118473921B CN202410909814.0A CN202410909814A CN118473921B CN 118473921 B CN118473921 B CN 118473921B CN 202410909814 A CN202410909814 A CN 202410909814A CN 118473921 B CN118473921 B CN 118473921B
Authority
CN
China
Prior art keywords
port
information
server
client
basic data
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.)
Active
Application number
CN202410909814.0A
Other languages
Chinese (zh)
Other versions
CN118473921A (en
Inventor
王炜东
杨主决
叶立新
温峥嵘
黄玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202410909814.0A priority Critical patent/CN118473921B/en
Publication of CN118473921A publication Critical patent/CN118473921A/en
Application granted granted Critical
Publication of CN118473921B publication Critical patent/CN118473921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to a method and a device for planning CDN edge node port opening, which belong to the technical field of data exchange networks, acquire current customer base data and current service resource base data, plan ports according to the current customer base data and the current service resource base data, and generate a port planning table; extracting information from the port planning table, automatically splicing the information to obtain port configuration information, and generating a server IP-port configuration table; packaging the server IP-port configuration table to obtain a port configuration file and issuing the port configuration file to the server; and acquiring the basic data of the newly added service resource and the basic data of the newly added client, and checking and updating the port configuration information. The method and the system plan the network port to be used together with the service resource, dynamically calculate the port planning distribution condition, and visually plan the port configuration of the whole network based on the open ports of clients and the real requirements of the service resource, thereby ensuring the timeliness, the accuracy and the efficient visual operation and maintenance of the open ports.

Description

一种规划CDN边缘节点端口开放的方法及装置A method and device for planning CDN edge node port opening

技术领域Technical Field

本发明属于数据交换网络技术领域,尤其涉及一种规划CDN边缘节点端口开放的方法及装置。The present invention belongs to the technical field of data exchange networks, and in particular relates to a method and device for planning CDN edge node port opening.

背景技术Background Art

网络端口复用技术是在计算机网络中,多个进程或程序可以共享使用同一个端口的技术。NGINX端口复用功能是基于SO_REUSEPORT(端口复用)技术特性+Stream模块分流技术支持监听同一端口,根据不通的主机名或IP进行转发分流。Network port reuse technology is a technology that allows multiple processes or programs to share the same port in a computer network. The NGINX port reuse function is based on the SO_REUSEPORT (port reuse) technical feature + Stream module diversion technology to support listening to the same port and forwarding and diverting traffic based on different host names or IP addresses.

CDN的安全产品的客户对服务端口存在较多特殊的需求,比如都会要求开通8080及其他常用端口。而采用NGINX的复用的技术可以支持多个客户共用同个端口。但在CDN的庞大服务器资源体系里,如果未进行合理规划端口复用配置,会导致大量的人工维护,以及端口维护困难。最终导致客户安全产品时体验差以及业务质量下滑,可能会导致用户流失现象。Customers of CDN security products have many special requirements for service ports, such as requiring the opening of 8080 and other commonly used ports. The reuse technology of NGINX can support multiple customers to share the same port. However, in the huge server resource system of CDN, if the port reuse configuration is not properly planned, it will lead to a lot of manual maintenance and difficulty in port maintenance. Ultimately, it will lead to poor customer experience of security products and a decline in business quality, which may cause user loss.

发明内容Summary of the invention

鉴于以上现有技术的不足,发明的目的在于提供一种一种规划CDN边缘节点端口开放的方法及装置,将网络端口资源化,与服务资源一起进行规划使用,动态计算端口规划分布情况,再基于客户的开放端口及服务资源的真实需求,进行可视化地规划全网的端口配置,保证对外开放端口及时和准确率高,及高效可视化运维。In view of the above deficiencies in the prior art, the purpose of the invention is to provide a method and device for planning the opening of CDN edge node ports, which can resourceize network ports, plan and use them together with service resources, dynamically calculate the port planning distribution, and then visually plan the port configuration of the entire network based on the customer's actual needs for open ports and service resources, so as to ensure timely and accurate opening of ports to the outside world and efficient visual operation and maintenance.

本发明的第一方面,提出了一种规划CDN边缘节点端口开放的方法,包括:A first aspect of the present invention provides a method for planning CDN edge node port opening, comprising:

S1,获取当前客户基础数据和当前服务资源基础数据,依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表;S1, obtaining current customer basic data and current service resource basic data, planning ports according to the current customer basic data and current service resource basic data, and generating a port planning table;

S2,从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表;S2, extracting port information, server IP information and VIP information from the port planning table, automatically splicing to obtain port configuration information, and generating a server IP-port configuration table;

S3,将所述服务器IP-端口配置表进行封装,得到端口配置文件,将所述端口配置文件下发至服务器;S3, encapsulating the server IP-port configuration table to obtain a port configuration file, and sending the port configuration file to the server;

S4,获取新增服务资源基础数据和新增客户基础数据,依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新。S4, acquiring newly added service resource basic data and newly added customer basic data, and verifying and updating the port configuration information according to the newly added service resource basic data and the newly added customer basic data.

进一步地,所述S1中获取当前客户基础数据和当前服务资源基础数据,还包括:Furthermore, the step of obtaining the current customer basic data and the current service resource basic data in S1 further includes:

所述当前客户基础数据至少包括当前客户的:The current customer basic data at least includes the current customer's:

客户名称、客户域名、客户HTTP端口、客户HTTPS端口、是否全0;Customer name, customer domain name, customer HTTP port, customer HTTPS port, whether all are 0;

所述当前服务资源基础数据至少包括当前服务资源的:The current service resource basic data at least includes:

服务器主机组信息、VIP资源信息、服务器信息;Server host group information, VIP resource information, server information;

所述服务器主机组信息包括服务器组名称和对应的服务器主机组编码;The server host group information includes a server group name and a corresponding server host group code;

所述VIP资源信息包括VIP信息与对应的服务器主机组编码和资源端口标签;The VIP resource information includes VIP information and corresponding server host group code and resource port label;

所述服务器信息包括服务器IP信息与对应所属的服务器主机组编码;The server information includes server IP information and the corresponding server host group code;

同一个服务器主机组的服务器共享同一组VIP数据;Servers in the same server host group share the same set of VIP data;

所述S1中依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表,还包括:The S1 plans ports according to the current customer basic data and the current service resource basic data to generate a port planning table, and further includes:

依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划配置资源标签信息表和配置VIP资源信息表;According to the current customer basic data and the current service resource basic data, a resource label information table and a VIP resource information table are planned and configured for the port;

所述配置资源标签信息表中包括标签名称与所对应分配的HTTP端口与HTTPS端口;The configuration resource tag information table includes the tag name and the corresponding allocated HTTP port and HTTPS port;

所述配置VIP资源信息表中包括VIP信息与所对应的服务器主机组编码与分配的端口标签。The configuration VIP resource information table includes VIP information and the corresponding server host group code and allocated port label.

进一步地,所述S2中从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表,还包括:Further, the S2 extracts the port information, server IP information and VIP information from the port planning table, automatically splices them to obtain the port configuration information, and generates a server IP-port configuration table, and also includes:

依据所述服务器IP信息对应所属的服务器主机组编码获得对应VIP信息的端口标签;Obtain the port label corresponding to the VIP information according to the server host group code corresponding to the server IP information;

依据所述端口标签与所述配置资源标签信息表进行匹配,得到所述服务器IP信息的HTTP端口和HTTPS端口;According to the port tag, the HTTP port and the HTTPS port of the server IP information are matched with the configuration resource tag information table;

拼接所述服务器IP信息的VIP信息与HTTP端口和HTTPS端口,得到所述服务器IP信息的端口配置信息,格式转换生成服务器IP-端口配置表。The VIP information of the server IP information is spliced with the HTTP port and the HTTPS port to obtain the port configuration information of the server IP information, and the format is converted to generate a server IP-port configuration table.

进一步地,所述S3中将所述服务器IP-端口配置表进行封装,得到端口配置文件,将所述端口配置文件下发至服务器,还包括:Further, in S3, the server IP-port configuration table is encapsulated to obtain a port configuration file, and the port configuration file is sent to the server, further comprising:

由NGINX服务对所述服务器IP-端口配置表进行封装,得到端口配置文件并加载;The NGINX service encapsulates the server IP-port configuration table, obtains the port configuration file and loads it;

将所述端口配置文件下发至相应的服务器上,并记录下发的结果,将下发结果进行统计,将最终的下发数据,并通知到相关的负责人。The port configuration file is sent to the corresponding server, and the sending result is recorded and counted, and the final sending data is notified to the relevant person in charge.

进一步地,所述S4中获取新增服务资源基础数据和新增客户基础数据,依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新,还包括:Furthermore, the newly added service resource basic data and the newly added customer basic data are obtained in S4, and the port configuration information is verified and updated according to the newly added service resource basic data and the newly added customer basic data, and further includes:

依据当前已经生成的服务器IP-端口配置表对所述新增服务资源基础数据的新增服务器IP信息进行端口配置,得到所述新增服务资源基础数据的新增端口配置文件并下发至新增服务器;Perform port configuration on the newly added server IP information of the newly added service resource basic data according to the currently generated server IP-port configuration table, obtain a newly added port configuration file of the newly added service resource basic data and send it to the newly added server;

获取新增客户基础数据的客户名称、客户域名、客户HTTP端口、客户HTTPS端口;Obtain the customer name, customer domain name, customer HTTP port, and customer HTTPS port of the newly added customer basic data;

判断所述新增客户基础数据的客户HTTP端口与客户HTTPS端口是否已被所述当前客户基础数据占用,如果已经被占用则不允许提供外部服务,告知新增客户进行调整;Determine whether the client HTTP port and the client HTTPS port of the newly added client basic data have been occupied by the current client basic data; if they have been occupied, do not allow external services to be provided, and inform the newly added client to make adjustments;

如果未被占用,校验分配所述新增客户基础数据的客户HTTP端口和客户HTTPS端口,更新规划配置资源标签信息表和配置VIP资源信息表。If it is not occupied, check the client HTTP port and client HTTPS port allocated to the newly added client basic data, and update the planning configuration resource tag information table and the configuration VIP resource information table.

根据本发明第二方面,本发明请求保护一种规划CDN边缘节点端口开放的装置,包括:客户基础数据模块、服务资源基础数据模块、服务资源与端口规划模块、自动生成端口配置模块、自动下发端口配置模块、服务器;According to a second aspect of the present invention, the present invention claims protection for a device for planning CDN edge node port opening, comprising: a customer basic data module, a service resource basic data module, a service resource and port planning module, an automatic port configuration generation module, an automatic port configuration delivery module, and a server;

所述客户基础数据模块获取当前客户基础数据和新增客户基础数据;The customer basic data module obtains current customer basic data and newly added customer basic data;

所述服务资源基础数据模块获取当前服务资源基础数据和新增服务资源基础数据;The service resource basic data module obtains current service resource basic data and newly added service resource basic data;

所述服务资源与端口规划模块依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表;The service resource and port planning module plans ports according to the current customer basic data and the current service resource basic data, and generates a port planning table;

所述自动生成端口配置模块从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表;The automatic port configuration generation module extracts the port information, server IP information and VIP information from the port planning table, automatically splices the port configuration information, and generates a server IP-port configuration table;

所述自动生成端口配置模块依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新;The automatic port configuration generation module verifies and updates the port configuration information according to the newly added service resource basic data and newly added customer basic data;

所述自动下发端口配置模块将所述服务器IP-端口配置表进行封装,得到端口配置文件并将所述端口配置文件下发至服务器。The automatic port configuration sending module encapsulates the server IP-port configuration table to obtain a port configuration file and sends the port configuration file to the server.

进一步地,该装置还包括:Furthermore, the device also includes:

所述当前客户基础数据至少包括当前客户的:The current customer basic data at least includes the current customer's:

客户名称、客户域名、客户HTTP端口、客户HTTPS端口、是否全0;Customer name, customer domain name, customer HTTP port, customer HTTPS port, whether all are 0;

所述当前服务资源基础数据至少包括当前服务资源的:The current service resource basic data at least includes:

服务器主机组信息、VIP资源信息、服务器信息;Server host group information, VIP resource information, server information;

所述服务器主机组信息包括服务器组名称和对应的服务器主机组编码;The server host group information includes a server group name and a corresponding server host group code;

所述VIP资源信息包括VIP信息与对应的服务器主机组编码和资源端口标签;The VIP resource information includes VIP information and corresponding server host group code and resource port label;

所述服务器信息包括服务器IP信息与对应所属的服务器主机组编码;The server information includes server IP information and the corresponding server host group code;

同一个服务器主机组的服务器共享同一组VIP数据;Servers in the same server host group share the same set of VIP data;

所述服务资源与端口规划模块依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表,还包括:The service resource and port planning module plans ports according to the current customer basic data and the current service resource basic data to generate a port planning table, and also includes:

依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划配置资源标签信息表和配置VIP资源信息表;According to the current customer basic data and the current service resource basic data, a resource label information table and a VIP resource information table are planned and configured for the port;

所述配置资源标签信息表中包括标签名称与所对应分配的HTTP端口与HTTPS端口;The configuration resource tag information table includes the tag name and the corresponding allocated HTTP port and HTTPS port;

所述配置VIP资源信息表中包括VIP信息与所对应的服务器主机组编码与分配的端口标签。The configuration VIP resource information table includes VIP information and the corresponding server host group code and allocated port label.

进一步地,所述自动生成端口配置模块从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表,还包括:Furthermore, the automatic generation of port configuration module extracts port information, server IP information and VIP information from the port planning table, automatically splices to obtain port configuration information, generates a server IP-port configuration table, and further includes:

依据所述服务器IP信息对应所属的服务器主机组编码获得对应VIP信息的端口标签;Obtain the port label corresponding to the VIP information according to the server host group code corresponding to the server IP information;

依据所述端口标签与所述配置资源标签信息表进行匹配,得到所述服务器IP信息的HTTP端口和HTTPS端口;According to the port tag, the HTTP port and the HTTPS port of the server IP information are matched with the configuration resource tag information table;

拼接所述服务器IP信息的VIP信息与HTTP端口和HTTPS端口,得到所述服务器IP信息的端口配置信息,格式转换生成服务器IP-端口配置表。The VIP information of the server IP information is spliced with the HTTP port and the HTTPS port to obtain the port configuration information of the server IP information, and the format is converted to generate a server IP-port configuration table.

进一步地,所述自动下发端口配置模块将所述服务器IP-端口配置表进行封装,得到端口配置文件并将所述端口配置文件下发至服务器,还包括:Furthermore, the automatic port configuration module encapsulates the server IP-port configuration table to obtain a port configuration file and sends the port configuration file to the server, and further includes:

由NGINX服务对所述服务器IP-端口配置表进行封装,得到端口配置文件并加载;The NGINX service encapsulates the server IP-port configuration table, obtains the port configuration file and loads it;

将所述端口配置文件下发至相应的服务器上,并记录下发的结果,将下发结果进行统计,将最终的下发数据,并通知到相关的负责人。The port configuration file is sent to the corresponding server, and the sending result is recorded and counted, and the final sending data is notified to the relevant person in charge.

进一步地,所述自动生成端口配置模块依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新,还包括:Furthermore, the automatic port configuration generation module verifies and updates the port configuration information according to the newly added service resource basic data and the newly added customer basic data, and further includes:

依据当前已经生成的服务器IP-端口配置表对所述新增服务资源基础数据的新增服务器IP信息进行端口配置,得到所述新增服务资源基础数据的新增端口配置文件并下发至新增服务器;Perform port configuration on the newly added server IP information of the newly added service resource basic data according to the currently generated server IP-port configuration table, obtain a newly added port configuration file of the newly added service resource basic data and send it to the newly added server;

获取新增客户基础数据的客户名称、客户域名、客户HTTP端口、客户HTTPS端口;Obtain the customer name, customer domain name, customer HTTP port, and customer HTTPS port of the newly added customer basic data;

判断所述新增客户基础数据的客户HTTP端口与客户HTTPS端口是否已被所述当前客户基础数据占用,如果已经被占用则不允许提供外部服务,告知新增客户进行调整;Determine whether the client HTTP port and the client HTTPS port of the newly added client basic data have been occupied by the current client basic data; if they have been occupied, do not allow external services to be provided, and inform the newly added client to make adjustments;

如果未被占用,校验分配所述新增客户基础数据的客户HTTP端口和客户HTTPS端口,更新规划配置资源标签信息表和配置VIP资源信息表。If it is not occupied, check the client HTTP port and client HTTPS port allocated to the newly added client basic data, and update the planning configuration resource tag information table and the configuration VIP resource information table.

本发明有益效果如下:The beneficial effects of the present invention are as follows:

本发明所述的方法和装置,将网络端口资源化,与服务资源一起进行规划使用,动态计算端口规划分布情况,再基于客户的开放端口及服务资源的真实需求,进行可视化地规划全网的端口配置,保证对外开放端口及时和准确率高,及高效可视化运维。The method and device described in the present invention resourceize network ports, plan and use them together with service resources, dynamically calculate the port planning distribution, and then visually plan the port configuration of the entire network based on the customer's actual needs for open ports and service resources, thereby ensuring timely and accurate opening of ports to the outside world and efficient visual operation and maintenance.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图仅用于示出具体实施例的目的,而并不认为是对本发明的限制,在整个附图中,相同的参考符号表示相同的部件。显而易见地,下面描述中的附图仅仅是本发明实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

图1为本发明实施例一种规划CDN边缘节点端口开放的方法的工作流程图;FIG1 is a flowchart of a method for planning CDN edge node port opening according to an embodiment of the present invention;

图2为本发明实施例的一种规划CDN边缘节点端口开放的方法的服务器-VIP关系示意图;FIG2 is a schematic diagram of a server-VIP relationship in a method for planning CDN edge node port opening according to an embodiment of the present invention;

图3为本发明实施例的一种规划CDN边缘节点端口开放的装置的数据流图。FIG. 3 is a data flow diagram of a device for planning CDN edge node port opening according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。应该理解,这些描述只是示例性的,并非用于限定本发明的范围。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.

此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明公开的概念。Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的方法和系统的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

本发明的第一实施例,提出了一种规划CDN边缘节点端口开放的方法,参照图1,包括:The first embodiment of the present invention proposes a method for planning CDN edge node port opening, referring to FIG. 1 , comprising:

S1,获取当前客户基础数据和当前服务资源基础数据,依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表;S1, obtaining current customer basic data and current service resource basic data, planning ports according to the current customer basic data and current service resource basic data, and generating a port planning table;

S2,从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表;S2, extracting port information, server IP information and VIP information from the port planning table, automatically splicing to obtain port configuration information, and generating a server IP-port configuration table;

S3,将所述服务器IP-端口配置表进行封装,得到端口配置文件,将所述端口配置文件下发至服务器;S3, encapsulating the server IP-port configuration table to obtain a port configuration file, and sending the port configuration file to the server;

S4,获取新增服务资源基础数据和新增客户基础数据,依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新。S4, acquiring newly added service resource basic data and newly added customer basic data, and verifying and updating the port configuration information according to the newly added service resource basic data and the newly added customer basic data.

进一步地,所述S1中获取当前客户基础数据和当前服务资源基础数据,还包括:Furthermore, the step of obtaining the current customer basic data and the current service resource basic data in S1 further includes:

所述当前客户基础数据至少包括当前客户的:The current customer basic data at least includes the current customer's:

客户名称、客户域名、客户HTTP端口、客户HTTPS端口、是否全0;Customer name, customer domain name, customer HTTP port, customer HTTPS port, whether all are 0;

所述当前服务资源基础数据至少包括当前服务资源的:The current service resource basic data at least includes:

服务器主机组信息、VIP资源信息、服务器信息;Server host group information, VIP resource information, server information;

所述服务器主机组信息包括服务器组名称和对应的服务器主机组编码;The server host group information includes a server group name and a corresponding server host group code;

所述VIP资源信息包括VIP信息与对应的服务器主机组编码和资源端口标签;The VIP resource information includes VIP information and corresponding server host group code and resource port label;

所述服务器信息包括服务器IP信息与对应所属的服务器主机组编码;The server information includes server IP information and the corresponding server host group code;

同一个服务器主机组的服务器共享同一组VIP数据;Servers in the same server host group share the same set of VIP data;

所述S1中依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表,还包括:The S1 plans ports according to the current customer basic data and the current service resource basic data to generate a port planning table, and further includes:

依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划配置资源标签信息表和配置VIP资源信息表;According to the current customer basic data and the current service resource basic data, a resource label information table and a VIP resource information table are planned and configured for the port;

所述配置资源标签信息表中包括标签名称与所对应分配的HTTP端口与HTTPS端口;The configuration resource tag information table includes the tag name and the corresponding allocated HTTP port and HTTPS port;

所述配置VIP资源信息表中包括VIP信息与所对应的服务器主机组编码与分配的端口标签。The configuration VIP resource information table includes VIP information and the corresponding server host group code and allocated port label.

其中,在该实施例中,服务资源基础数据In this embodiment, the service resource basic data

服务器主机组信息,数据如下所示:Server host group information, the data is as follows:

服务器组名称服务器主机组编码Server Group Name Server Host Group Code

服务器组AHGAServer Group AHGA

服务器组BHGBServer Group BHGB

VIP资源信息,数据如下所示:VIP resource information, the data is as follows:

VIP信息服务器主机组编码资源端口标签VIP information server host group code resource port label

10.8.1.100HGA 无10.8.1.100HGA None

10.8.1.101HGA 无10.8.1.101HGA None

10.9.1.100HGB 无10.9.1.100HGB None

10.9.1.101HGB 无10.9.1.101HGB None

服务器信息:Server Information:

服务器IP信息服务器主机组编码Server IP information Server host group code

10.8.1.1HGA10.8.1.1HGA

10.8.1.2HGA10.8.1.2HGA

10.9.1.1HGB10.9.1.1HGB

10.9.1.2HGB10.9.1.2HGB

同服务器组的服务器共享同一组VIP数据,如图2所示;Servers in the same server group share the same set of VIP data, as shown in Figure 2;

进一步地,所述S2中从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表,还包括:Further, the S2 extracts the port information, server IP information and VIP information from the port planning table, automatically splices them to obtain the port configuration information, and generates a server IP-port configuration table, and also includes:

依据所述服务器IP信息对应所属的服务器主机组编码获得对应VIP信息的端口标签;Obtain the port label corresponding to the VIP information according to the server host group code corresponding to the server IP information;

依据所述端口标签与所述配置资源标签信息表进行匹配,得到所述服务器IP信息的HTTP端口和HTTPS端口;According to the port tag, the HTTP port and the HTTPS port of the server IP information are matched with the configuration resource tag information table;

拼接所述服务器IP信息的VIP信息与HTTP端口和HTTPS端口,得到所述服务器IP信息的端口配置信息,格式转换生成服务器IP-端口配置表。The VIP information of the server IP information is spliced with the HTTP port and the HTTPS port to obtain the port configuration information of the server IP information, and the format is converted to generate a server IP-port configuration table.

其中, 在该实施例中:Among them, in this embodiment:

服务资源与端口规划:Service resources and port planning:

端口资源规划需要满足已下条件:Port resource planning needs to meet the following conditions:

同一个端口,允许不同的IP地址绑定;The same port allows different IP addresses to be bound;

同一个端口,全0端口监听优先级最高;For the same port, the all-0 port monitoring priority is the highest;

同一个端口,同一个VIP,只能绑定一种协议;The same port and the same VIP can only be bound to one protocol;

客户的需求数据如下所示:The customer's demand data is as follows:

客户名称 客户域名 客户HTTP端口 客户HTTPS端口 是否全0Customer name Customer domain name Customer HTTP port Customer HTTPS port Is it all 0?

客户A 客户域名A 8080,8081 8443 否Customer A Customer domain name A 8080,8081 8443 No

客户B 客户域名B 8081,9091 3443,8443 否Customer B Customer Domain B 8081,9091 3443,8443 No

内部A 内部域名A 58080 51443 否Internal A Internal domain name A 58080 51443 No

内部B 内部域名A 56080 无 是Internal B Internal domain name A 56080 No Yes

是否全0:表示启动监听的IP地址,是否为0.0.0.0,仅内部组件可用;Whether it is all 0: indicates the IP address where the monitoring is started. If it is 0.0.0.0, only internal components are available.

页面进行资源及端口规划:Page for resource and port planning:

配置资源标签信息:Configure resource tag information:

标签名称 HTTP端口 HTTPS端口Tag Name HTTP Port HTTPS Port

端口标签A 8080,8081 8443Port Tag A 8080,8081 8443

端口标签B 8081,9091 3443,8443Port Tag B 8081,9091 3443,8443

配置VIP资源信息:Configure VIP resource information:

VIP信息服务器主机组编码端口标签VIP Information Server Host Group Code Port Label

10.8.1.100HGA端口标签A10.8.1.100HGA Port Label A

10.8.1.101HGA无10.8.1.101HGA None

10.9.1.100HGB端口标签B10.9.1.100HGB port label B

10.9.1.101HGB10.9.1.101HGB

配置数据,自动生成机器粒度的配置;Configuration data, automatically generating machine-granular configuration;

服务器IP信息配置数据Server IP information configuration data

10.8.1.1listen 10.8.1.100:8080 reuse_port;10.8.1.1listen 10.8.1.100:8080 reuse_port;

listen 10.8.1.100:8081 reuse_port;listen 10.8.1.100:8081 reuse_port;

listen 10.8.1.100:8443 ssl reuse_port;listen 10.8.1.100:8443 ssl reuse_port;

listen 127.0.0.1:58080 reuse_port;listen 127.0.0.1:58080 reuse_port;

listen 127.0.0.1:51443 ssl reuse_port;listen 127.0.0.1:51443 ssl reuse_port;

listen 56080 reuse_port;listen 56080 reuse_port;

10.8.1.2listen 10.8.1.100:8080 reuse_port;10.8.1.2listen 10.8.1.100:8080 reuse_port;

listen 10.8.1.100:8081 reuse_port;listen 10.8.1.100:8081 reuse_port;

listen 10.8.1.100:8443 ssl reuse_port;listen 10.8.1.100:8443 ssl reuse_port;

listen 127.0.0.1:58080 reuse_port;listen 127.0.0.1:58080 reuse_port;

listen 127.0.0.1:51443 ssl reuse_port;listen 127.0.0.1:51443 ssl reuse_port;

listen 56080 reuse_port;listen 56080 reuse_port;

10.8.9.1listen 10.9.1.100:8081 reuse_port;10.8.9.1listen 10.9.1.100:8081 reuse_port;

listen 10.9.1.100:9091 reuse_port;listen 10.9.1.100:9091 reuse_port;

listen 10.8.1.100:3443 ssl reuse_port;listen 10.8.1.100:3443 ssl reuse_port;

listen 10.8.1.100:8443 ssl reuse_port;listen 10.8.1.100:8443 ssl reuse_port;

listen 127.0.0.1:58080 reuse_port;listen 127.0.0.1:58080 reuse_port;

listen 127.0.0.1:51443 ssl reuse_port;listen 127.0.0.1:51443 ssl reuse_port;

listen 56080 reuse_port;listen 56080 reuse_port;

10.8.9.2listen 10.9.1.100:8081 reuse_port;10.8.9.2listen 10.9.1.100:8081 reuse_port;

listen 10.9.1.100:9091 reuse_port;listen 10.9.1.100:9091 reuse_port;

listen 10.8.1.100:3443 ssl reuse_port;listen 10.8.1.100:3443 ssl reuse_port;

listen 10.8.1.100:8443 ssl reuse_port;listen 10.8.1.100:8443 ssl reuse_port;

listen 127.0.0.1:58080 reuse_port;listen 127.0.0.1:58080 reuse_port;

listen 127.0.0.1:51443 ssl reuse_port;listen 127.0.0.1:51443 ssl reuse_port;

listen 56080 reuse_port;listen 56080 reuse_port;

进一步地,所述S3中将所述服务器IP-端口配置表进行封装,得到端口配置文件,将所述端口配置文件下发至服务器,还包括:Further, in S3, the server IP-port configuration table is encapsulated to obtain a port configuration file, and the port configuration file is sent to the server, further comprising:

由NGINX服务对所述服务器IP-端口配置表进行封装,得到端口配置文件并加载;The NGINX service encapsulates the server IP-port configuration table, obtains the port configuration file and loads it;

将所述端口配置文件下发至相应的服务器上,并记录下发的结果,将下发结果进行统计,将最终的下发数据,并通知到相关的负责人。The port configuration file is sent to the corresponding server, and the sending result is recorded and counted, and the final sending data is notified to the relevant person in charge.

进一步地,所述S4中获取新增服务资源基础数据和新增客户基础数据,依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新,还包括:Furthermore, the newly added service resource basic data and the newly added customer basic data are obtained in S4, and the port configuration information is verified and updated according to the newly added service resource basic data and the newly added customer basic data, and further includes:

依据当前已经生成的服务器IP-端口配置表对所述新增服务资源基础数据的新增服务器IP信息进行端口配置,得到所述新增服务资源基础数据的新增端口配置文件并下发至新增服务器;Perform port configuration on the newly added server IP information of the newly added service resource basic data according to the currently generated server IP-port configuration table, obtain a newly added port configuration file of the newly added service resource basic data and send it to the newly added server;

获取新增客户基础数据的客户名称、客户域名、客户HTTP端口、客户HTTPS端口;Obtain the customer name, customer domain name, customer HTTP port, and customer HTTPS port of the newly added customer basic data;

判断所述新增客户基础数据的客户HTTP端口与客户HTTPS端口是否已被所述当前客户基础数据占用,如果已经被占用则不允许提供外部服务,可直接告知新增客户进行调整;Determine whether the client HTTP port and the client HTTPS port of the newly added client basic data have been occupied by the current client basic data. If they have been occupied, external services are not allowed to be provided, and the newly added client may be directly informed to make adjustments;

如果未被占用,校验分配所述新增客户基础数据的客户HTTP端口和客户HTTPS端口,更新规划配置资源标签信息表和配置VIP资源信息表。If it is not occupied, check the client HTTP port and client HTTPS port allocated to the newly added client basic data, and update the planning configuration resource tag information table and the configuration VIP resource information table.

其中,在该实施例中;Wherein, in this embodiment;

新增服务资源:New service resources:

服务器组HGA增加机器服务器10.8.1.3;Server group HGA added machine server 10.8.1.3;

自动生成该机器的配置文件,文件数据格式如下:Automatically generate the configuration file for the machine. The file data format is as follows:

10.8.1.3listen 10.8.1.100:8080 reuse_port;10.8.1.3listen 10.8.1.100:8080 reuse_port;

listen 10.8.1.100:8081 reuse_port;listen 10.8.1.100:8081 reuse_port;

listen 10.8.1.100:8443 ssl reuse_port;listen 10.8.1.100:8443 ssl reuse_port;

listen 127.0.0.1:58080 reuse_port;listen 127.0.0.1:58080 reuse_port;

listen 127.0.0.1:51443 ssl reuse_port;listen 127.0.0.1:51443 ssl reuse_port;

listen 56080 reuse_port;listen 56080 reuse_port;

将该配置文件数据下发至新增机器10.8.1.3上,由NGINX服务自行加载端口配置文件。Send the configuration file data to the newly added machine 10.8.1.3, and let the NGINX service load the port configuration file by itself.

新增客户需求:New customer needs:

需求 客户域名 HTTP端口 HTTPS端口Requirements Customer domain name HTTP port HTTPS port

客户A 客户域名A 56080Customer A Customer domain name A 56080

客户B 客户域名B 10091Customer B Customer domain name B 10091

客户C 客户域名C 8081Customer C Customer domain name C 8081

检测出56080端口已被内部B组件占用,不允许提供外部服务,可直接告知客户进行调整。It is detected that port 56080 is occupied by the internal B component and is not allowed to provide external services. The customer can be directly informed to make adjustments.

更新资源标签信息:Update resource tag information:

标签名称 HTTP端口 HTTPS端口Tag Name HTTP Port HTTPS Port

端口标签A 8080,8081 8443Port Tag A 8080,8081 8443

端口标签B 8081,9091,10091 3443,8443Port tag B 8081,9091,10091 3443,8443

自动生成该机器的配置文件,并由“自动下发端口配置模块”下发到相应的机器上。The configuration file of the machine is automatically generated and sent to the corresponding machine by the "automatic port configuration module".

更新资源标签信息:Update resource tag information:

标签名称 HTTP端口 HTTPS端口Tag Name HTTP Port HTTPS Port

端口标签A 8080,8081 8443Port Tag A 8080,8081 8443

端口标签B 8081,9091,10091 3443,8443Port tag B 8081,9091,10091 3443,8443

端口标签C 8081Port Label C 8081

配置VIP资源信息:Configure VIP resource information:

VIP信息主机组编码端口标签VIP information host group code port label

10.8.1.100HGA端口标签A10.8.1.100HGA Port Label A

10.8.1.101HGA端口标签C10.8.1.101 HGA Port Label C

10.9.1.100HGB端口标签B10.9.1.100HGB port label B

10.9.1.101HGB10.9.1.101HGB

其中端口标签C,不能加在VIP 10.8.1.100上,因为会导致该VIP上同一个端口8081既绑HTTP协议又绑定HTTPS协议,规划模块会自动校验冲突告知。Port label C cannot be added to VIP 10.8.1.100, because it will cause the same port 8081 on the VIP to be bound to both HTTP and HTTPS protocols. The planning module will automatically check for conflicts and notify you.

根据本发明第二实施例,本发明请求保护一种规划CDN边缘节点端口开放的装置,参照图3,包括:客户基础数据模块、服务资源基础数据模块、服务资源与端口规划模块、自动生成端口配置模块、自动下发端口配置模块、服务器;According to the second embodiment of the present invention, the present invention claims a device for planning CDN edge node port opening, referring to FIG3, comprising: a customer basic data module, a service resource basic data module, a service resource and port planning module, an automatic port configuration generation module, an automatic port configuration delivery module, and a server;

所述客户基础数据模块获取当前客户基础数据和新增客户基础数据;The customer basic data module obtains current customer basic data and newly added customer basic data;

所述服务资源基础数据模块获取当前服务资源基础数据和新增服务资源基础数据;The service resource basic data module obtains current service resource basic data and newly added service resource basic data;

所述服务资源与端口规划模块依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表;The service resource and port planning module plans ports according to the current customer basic data and the current service resource basic data, and generates a port planning table;

所述自动生成端口配置模块从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表;The automatic port configuration generation module extracts the port information, server IP information and VIP information from the port planning table, automatically splices the port configuration information, and generates a server IP-port configuration table;

所述自动生成端口配置模块依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新;The automatic port configuration generation module verifies and updates the port configuration information according to the newly added service resource basic data and newly added customer basic data;

所述自动下发端口配置模块将所述服务器IP-端口配置表进行封装,得到端口配置文件并将所述端口配置文件下发至服务器。The automatic port configuration sending module encapsulates the server IP-port configuration table to obtain a port configuration file and sends the port configuration file to the server.

进一步地,该装置还包括:Furthermore, the device also includes:

所述当前客户基础数据至少包括当前客户的:The current customer basic data at least includes the current customer's:

客户名称、客户域名、客户HTTP端口、客户HTTPS端口、是否全0;Customer name, customer domain name, customer HTTP port, customer HTTPS port, whether all are 0;

所述当前服务资源基础数据至少包括当前服务资源的:The current service resource basic data at least includes:

服务器主机组信息、VIP资源信息、服务器信息;Server host group information, VIP resource information, server information;

所述服务器主机组信息包括服务器组名称和对应的服务器主机组编码;The server host group information includes a server group name and a corresponding server host group code;

所述VIP资源信息包括VIP信息与对应的服务器主机组编码和资源端口标签;The VIP resource information includes VIP information and corresponding server host group code and resource port label;

所述服务器信息包括服务器IP信息与对应所属的服务器主机组编码;The server information includes server IP information and the corresponding server host group code;

同一个服务器主机组的服务器共享同一组VIP数据;Servers in the same server host group share the same set of VIP data;

所述服务资源与端口规划模块依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划,生成端口规划表,还包括:The service resource and port planning module plans ports according to the current customer basic data and the current service resource basic data to generate a port planning table, and also includes:

依据所述当前客户基础数据和当前服务资源基础数据对端口进行规划配置资源标签信息表和配置VIP资源信息表;According to the current customer basic data and the current service resource basic data, a resource label information table and a VIP resource information table are planned and configured for the port;

所述配置资源标签信息表中包括标签名称与所对应分配的HTTP端口与HTTPS端口;The configuration resource tag information table includes the tag name and the corresponding allocated HTTP port and HTTPS port;

所述配置VIP资源信息表中包括VIP信息与所对应的服务器主机组编码与分配的端口标签。The configuration VIP resource information table includes VIP information and the corresponding server host group code and allocated port label.

进一步地,所述自动生成端口配置模块从所述端口规划表中提取端口信息、服务器IP信息与VIP信息,自动拼接得到端口配置信息,生成服务器IP-端口配置表,还包括:Furthermore, the automatic generation of port configuration module extracts port information, server IP information and VIP information from the port planning table, automatically splices to obtain port configuration information, generates a server IP-port configuration table, and further includes:

依据所述服务器IP信息对应所属的服务器主机组编码获得对应VIP信息的端口标签;Obtain the port label corresponding to the VIP information according to the server host group code corresponding to the server IP information;

依据所述端口标签与所述配置资源标签信息表进行匹配,得到所述服务器IP信息的HTTP端口和HTTPS端口;According to the port tag, the HTTP port and the HTTPS port of the server IP information are matched with the configuration resource tag information table;

拼接所述服务器IP信息的VIP信息与HTTP端口和HTTPS端口,得到所述服务器IP信息的端口配置信息,格式转换生成服务器IP-端口配置表。The VIP information of the server IP information is spliced with the HTTP port and the HTTPS port to obtain the port configuration information of the server IP information, and the format is converted to generate a server IP-port configuration table.

进一步地,所述自动下发端口配置模块将所述服务器IP-端口配置表进行封装,得到端口配置文件并将所述端口配置文件下发至服务器,还包括:Furthermore, the automatic port configuration module encapsulates the server IP-port configuration table to obtain a port configuration file and sends the port configuration file to the server, and further includes:

由NGINX服务对所述服务器IP-端口配置表进行封装,得到端口配置文件并加载;The NGINX service encapsulates the server IP-port configuration table, obtains the port configuration file and loads it;

将所述端口配置文件下发至相应的服务器上,并记录下发的结果,将下发结果进行统计,将最终的下发数据,并通知到相关的负责人。The port configuration file is sent to the corresponding server, and the sending result is recorded and counted, and the final sending data is notified to the relevant person in charge.

进一步地,所述自动生成端口配置模块依据所述新增服务资源基础数据新增客户基础数据对所述端口配置信息进行校验与更新,还包括:Furthermore, the automatic port configuration generation module verifies and updates the port configuration information according to the newly added service resource basic data and the newly added customer basic data, and further includes:

依据当前已经生成的服务器IP-端口配置表对所述新增服务资源基础数据的新增服务器IP信息进行端口配置,得到所述新增服务资源基础数据的新增端口配置文件并下发至新增服务器;Perform port configuration on the newly added server IP information of the newly added service resource basic data according to the currently generated server IP-port configuration table, obtain a newly added port configuration file of the newly added service resource basic data and send it to the newly added server;

获取新增客户基础数据的客户名称、客户域名、客户HTTP端口、客户HTTPS端口;Obtain the customer name, customer domain name, customer HTTP port, and customer HTTPS port of the newly added customer basic data;

判断所述新增客户基础数据的客户HTTP端口与客户HTTPS端口是否已被所述当前客户基础数据占用,如果已经被占用则不允许提供外部服务,可直接告知新增客户进行调整;Determine whether the client HTTP port and the client HTTPS port of the newly added client basic data have been occupied by the current client basic data. If they have been occupied, external services are not allowed to be provided, and the newly added client may be directly informed to make adjustments;

如果未被占用,校验分配所述新增客户基础数据的客户HTTP端口和客户HTTPS端口,更新规划配置资源标签信息表和配置VIP资源信息表。If it is not occupied, check the client HTTP port and client HTTPS port allocated to the newly added client basic data, and update the planning configuration resource tag information table and the configuration VIP resource information table.

本发明申请人结合说明书附图对本发明的实施示例做了详细的说明与描述,但是本领域技术人员应该理解,以上实施示例仅为本发明的优选实施方案,详尽的说明只是为了帮助读者更好地理解本发明精神,而并非对本发明保护范围的限制,相反,任何基于本发明的发明精神所作的任何改进或修饰都应当落在本发明的保护范围之内。The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, and it is not a limitation on the protection scope of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the protection scope of the present invention.

最后应说明的是,以上实施例仅用以说明本发明实施例的技术方案,而非对其限制。尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,任何熟悉本技术领域的技术人员在本发明公开的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims (8)

1. A method for planning CDN edge node port opening, comprising:
s1, acquiring current customer base data and current service resource base data, planning a port according to the current customer base data and the current service resource base data, and generating a port planning table;
s2, extracting port information, server IP information and VIP information from the port planning table, automatically splicing to obtain port configuration information, and generating a server IP-port configuration table;
s3, packaging the server IP-port configuration table to obtain a port configuration file, and transmitting the port configuration file to a server;
s4, obtaining newly-added service resource basic data and newly-added client basic data, and checking and updating the port configuration information according to the newly-added service resource basic data and the newly-added client basic data;
The step S1 of obtaining the current customer base data and the current service resource base data further comprises the following steps:
The current client base data includes at least the current client:
customer name, customer domain name, customer HTTP port, customer HTTPs port, whether all 0;
the current service resource basic data at least comprises the current service resource:
server host group information, VIP resource information, server information;
the server host group information comprises a server group name and a corresponding server host group code;
The VIP resource information comprises VIP information, corresponding server host group codes and resource port labels;
The server information comprises server IP information and corresponding affiliated server host group codes;
Servers of the same server host group share the same group of VIP data;
In the step S1, the port is planned according to the current customer base data and the current service resource base data, and a port planning table is generated, which further includes:
planning and configuring a resource tag information table and a VIP resource information table for a port according to the current customer base data and the current service resource base data;
the configuration resource tag information table comprises a tag name, a corresponding distributed HTTP port and a corresponding distributed HTTPS port;
The configuration VIP resource information table comprises VIP information and corresponding port labels of the server host group codes and the allocation.
2. The method for planning the port opening of the CDN edge node according to claim 1, wherein in S2, port information, server IP information, and VIP information are extracted from the port planning table, port configuration information is automatically spliced to generate a server IP-port configuration table, and the method further includes:
obtaining port labels corresponding to the VIP information according to codes of the server host group to which the server IP information corresponds;
Matching the port label with the configuration resource label information table to obtain an HTTP port and an HTTPS port of the server IP information;
And splicing the VIP information of the server IP information with the HTTP port and the HTTPS port to obtain port configuration information of the server IP information, and generating a server IP-port configuration table through format conversion.
3. The method for planning the port opening of the CDN edge node according to claim 1, wherein in S3, the server IP-port configuration table is encapsulated to obtain a port configuration file, and the port configuration file is issued to a server, and further comprising:
packaging the server IP-port configuration table by NGINX service to obtain a port configuration file and loading the port configuration file;
and issuing the port configuration file to a corresponding server, recording the issued result, counting the issued result, and notifying the final issued data to related responsible persons.
4. The method for planning the opening of the CDN edge node port according to claim 2, wherein the step S4 of obtaining the basic data of the newly added service resource and the basic data of the newly added customer, and verifying and updating the port configuration information according to the basic data of the newly added service resource and the basic data of the newly added customer, further comprises:
performing port configuration on the newly added server IP information of the newly added service resource basic data according to a currently generated server IP-port configuration table to obtain a newly added port configuration file of the newly added service resource basic data and issuing the newly added port configuration file to the newly added server;
Acquiring a client name, a client domain name, a client HTTP port and a client HTTPS port of newly added client basic data;
Judging whether a client HTTP port and a client HTTPS port of the newly added client basic data are occupied by the current client basic data, and if so, not allowing to provide external services, and directly informing the newly added client to adjust;
And if the client is not occupied, checking a client HTTP port and a client HTTPS port for distributing the newly added client basic data, and updating a planning configuration resource tag information table and a configuration VIP resource information table.
5. An apparatus for planning CDN edge node port opening, comprising: the system comprises a client basic data module, a service resource and port planning module, an automatic generation port configuration module, an automatic issuing port configuration module and a server;
the client basic data module acquires current client basic data and newly-added client basic data;
The service resource basic data module acquires current service resource basic data and newly added service resource basic data;
The service resource and port planning module plans the port according to the current customer base data and the current service resource base data to generate a port planning table;
The automatic generation port configuration module extracts port information, server IP information and VIP information from the port planning table, automatically splices the port information to generate a server IP-port configuration table;
the automatic generation port configuration module checks and updates the port configuration information according to the newly-added service resource basic data and the newly-added client basic data;
The automatic issuing port configuration module encapsulates the server IP-port configuration table to obtain a port configuration file and issues the port configuration file to a server;
The current client base data includes at least the current client:
customer name, customer domain name, customer HTTP port, customer HTTPs port, whether all 0;
the current service resource basic data at least comprises the current service resource:
server host group information, VIP resource information, server information;
the server host group information comprises a server group name and a corresponding server host group code;
The VIP resource information comprises VIP information, corresponding server host group codes and resource port labels;
The server information comprises server IP information and corresponding affiliated server host group codes;
Servers of the same server host group share the same group of VIP data;
The service resource and port planning module plans the port according to the current customer base data and the current service resource base data to generate a port planning table, and the method further comprises the following steps:
planning and configuring a resource tag information table and a VIP resource information table for a port according to the current customer base data and the current service resource base data;
the configuration resource tag information table comprises a tag name, a corresponding distributed HTTP port and a corresponding distributed HTTPS port;
The configuration VIP resource information table comprises VIP information and corresponding port labels of the server host group codes and the allocation.
6. The apparatus for planning CDN edge node port opening of claim 5, wherein the automatically generating port configuration module extracts port information, server IP information, and VIP information from the port planning table, automatically splices the port configuration information to generate a server IP-port configuration table, and further comprises:
obtaining port labels corresponding to the VIP information according to codes of the server host group to which the server IP information corresponds;
Matching the port label with the configuration resource label information table to obtain an HTTP port and an HTTPS port of the server IP information;
And splicing the VIP information of the server IP information with the HTTP port and the HTTPS port to obtain port configuration information of the server IP information, and generating a server IP-port configuration table through format conversion.
7. The apparatus for planning port opening of CDN edge node of claim 6 wherein the automatic delivery port configuration module encapsulates the server IP-port configuration table to obtain a port configuration file and delivers the port configuration file to a server, further comprising:
packaging the server IP-port configuration table by NGINX service to obtain a port configuration file and loading the port configuration file;
and issuing the port configuration file to a corresponding server, recording the issued result, counting the issued result, and notifying the final issued data to related responsible persons.
8. The apparatus for planning an opening of a CDN edge node port of claim 6 wherein the automatically generating a port configuration module verifies and updates the port configuration information based on the newly added service resource base data and the newly added customer base data, further comprising:
performing port configuration on the newly added server IP information of the newly added service resource basic data according to a currently generated server IP-port configuration table to obtain a newly added port configuration file of the newly added service resource basic data and issuing the newly added port configuration file to the newly added server;
Acquiring a client name, a client domain name, a client HTTP port and a client HTTPS port of newly added client basic data;
Judging whether a client HTTP port and a client HTTPS port of the newly added client basic data are occupied by the current client basic data, and if so, not allowing to provide external services, and directly informing the newly added client to adjust;
And if the client is not occupied, checking a client HTTP port and a client HTTPS port for distributing the newly added client basic data, and updating a planning configuration resource tag information table and a configuration VIP resource information table.
CN202410909814.0A 2024-07-09 2024-07-09 A method and device for planning CDN edge node port opening Active CN118473921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410909814.0A CN118473921B (en) 2024-07-09 2024-07-09 A method and device for planning CDN edge node port opening

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410909814.0A CN118473921B (en) 2024-07-09 2024-07-09 A method and device for planning CDN edge node port opening

Publications (2)

Publication Number Publication Date
CN118473921A CN118473921A (en) 2024-08-09
CN118473921B true CN118473921B (en) 2024-09-03

Family

ID=92151585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410909814.0A Active CN118473921B (en) 2024-07-09 2024-07-09 A method and device for planning CDN edge node port opening

Country Status (1)

Country Link
CN (1) CN118473921B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621477A (en) * 2009-08-13 2010-01-06 华为技术有限公司 Method and device for one-to-many port mirror image
CN113595796A (en) * 2015-09-30 2021-11-02 亚马逊科技公司 Network-based resource configuration discovery service

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU1143097A (en) * 1995-11-30 1997-06-19 Amsc Subsidiary Corporation Virtual network configuration and management system for satellite communications system
US11711268B2 (en) * 2019-04-30 2023-07-25 Intel Corporation Methods and apparatus to execute a workload in an edge environment
CN113709047B (en) * 2021-10-26 2022-02-08 奥特酷智能科技(南京)有限公司 Data forwarding system and method for automobile domain controller
CN114979032A (en) * 2022-05-25 2022-08-30 西安电子科技大学 TTE exchange terminal, data sending method and data receiving method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621477A (en) * 2009-08-13 2010-01-06 华为技术有限公司 Method and device for one-to-many port mirror image
CN113595796A (en) * 2015-09-30 2021-11-02 亚马逊科技公司 Network-based resource configuration discovery service

Also Published As

Publication number Publication date
CN118473921A (en) 2024-08-09

Similar Documents

Publication Publication Date Title
CN101379765B (en) Techniques for configuring customer equipment for network operations from provider edge
CN101094051B (en) System and method for synchronizing comparison of data consistency
US7673021B2 (en) Automated provisioning of phones in packet voice networks
CN107483276B (en) Service processing method, device and service distribution platform
CN105207853B (en) A kind of LAN method for managing and monitoring
CN101854348B (en) Realization method of SOA (Service Oriented Architecture) accessing core supporting system in peripheral system
CN101388903A (en) Mobile enterprise IT standardization management platform
CN101729491A (en) Method, device and system for enhancing application reliability of script-based business
CN104158686A (en) Configuration management method and system
WO2023109524A1 (en) Information leakage monitoring method and system, and electronic device
CN101433051A (en) Associating hosts with subscriber and service based requirements
CN111327619A (en) Micro-service data exchange method and device
CN106506230A (en) Method and system based on wireless network remote maintenance field apparatus
CN110958306B (en) A unified exchange mechanism for data requests based on microservices
CN118473921B (en) A method and device for planning CDN edge node port opening
CN109104309B (en) Edge server management system and method of CDN (content delivery network)
WO2013000343A1 (en) Method and device for processing transmission configuration data
CN104811340A (en) Checking method
CN101453730A (en) Apparatus and method for supporting multiple operation support system
US20170093610A1 (en) Proactive M2M Framework Using Device-Level vCard for Inventory, Identity, and Network Management
US9241029B2 (en) Open application interface for complex systems
CN114070824A (en) Registration method, registration cloud service, medium, and program product for internet of things device
US10555278B2 (en) Method and arrangement for allocating communication resources in a communication network
CN108964262A (en) The method of electrical power distribution automatization system main website identification terminal ID address
US20050165710A1 (en) Network-info 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
GR01 Patent grant
GR01 Patent grant