CN114448786B - Gateway configuration processing method, device, system and computer equipment - Google Patents
Gateway configuration processing method, device, system and computer equipment Download PDFInfo
- Publication number
- CN114448786B CN114448786B CN202111612388.7A CN202111612388A CN114448786B CN 114448786 B CN114448786 B CN 114448786B CN 202111612388 A CN202111612388 A CN 202111612388A CN 114448786 B CN114448786 B CN 114448786B
- Authority
- CN
- China
- Prior art keywords
- configuration
- host
- target node
- data structure
- gateway
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000013499 data model Methods 0.000 claims abstract description 27
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims description 20
- 230000015654 memory Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0889—Techniques to speed-up the configuration process
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a gateway configuration processing method, a device, a system and computer equipment, wherein the method comprises the steps of obtaining a target node and host variables and basic data models of hosts in the target node; converting the basic data model into a data structure corresponding to the host variable based on the host variable; obtaining configuration contents of the target node and host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway; and sending the configuration content to a host in the target node. The data structure obtained according to the host information of the target node can well solve the problems that the configuration files are difficult to maintain in the central console due to different specific contents of the configuration files of each host, the configuration updating efficiency is low, meanwhile, the configuration content is obtained based on the data structure, various information of the hosts in the target node can be well met, and flexible custom gateway configuration is realized.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a gateway configuration processing method, device, system, and computer equipment.
Background
Currently, due to the demands of short video and live broadcast service in the market, nodes are continuously sinking, and the number of CDN nodes of manufacturers is continuously increasing. In fact, the hosts on the nodes of the CDN at different levels, and even the hosts on the nodes at the edge, have different configuration file contents of the ngix (such as access rights configuration, backend ats configuration, proxy_cache configuration of the ngix, or custom configuration during some development, etc.). In the current product, when the number of CDN nodes is small, the configuration is generally manually modified along with deployment, but the method is not applicable when the number of the nodes is large, and updating is easy to make mistakes.
There is also a technology for providing centralized management of the nginx cluster configuration, the idea is to split the fixed nginx configuration, fill in the value of the fixed field and issue to the designated host computer when issuing each time, the method can better manage the configuration, but the operation and maintenance is needed to fill in data manually when issuing each time, when updating the node configuration in large batch, the workload is great, and the issuing is the fixed configuration, and the custom gateway configuration cannot be issued flexibly. Thus, the comparison lacks a general generic method of generating different node nginx profiles.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to overcome the defect of low configuration deployment efficiency caused by a general method for generating the configuration files of different nodes in the prior art, thereby providing a gateway configuration processing method, a gateway configuration processing device, a gateway configuration processing system and a gateway configuration processing computer device.
According to a first aspect, an embodiment of the present invention discloses a gateway configuration processing method, including: acquiring a target node and a host variable and a basic data model of a host in the target node; converting the basic data model into a data structure corresponding to the host variable based on the host variable; obtaining configuration contents of the target node and host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway; and sending the configuration content to a host in the target node.
Optionally, the converting the basic data model into a data structure corresponding to the host variable based on the host variable includes: converting the data of the target node and the host variables corresponding to the target node into global variables; the global variable is converted into a data structure corresponding to the host variable based on the host variable.
Optionally, the converting the basic data model into a data structure corresponding to the host variable based on the host variable further includes: and converting the special configuration of the target node and the host variables corresponding to the target node into custom variables.
Optionally, the obtaining, based on the data structure and a configuration template preset in the gateway, configuration contents of the target node and host variables corresponding to the target node includes: traversing each configuration template, and writing the data structure into the configuration templates through an application program interface of the configuration templates to obtain the configuration content.
Optionally, the sending the configuration content to the host in the target node includes: writing the configuration content into a message middleware; and acquiring and replacing the configuration content in the message middleware to the designated directory of the gateway through the configuration server in the target node.
According to a second aspect, an embodiment of the present invention further discloses a gateway configuration processing device, including: the acquisition module is used for acquiring the target node and host variables and basic data models of hosts in the target node; a data structure module for converting the base data model into a data structure corresponding to the host variable based on the host variable; the configuration content module is used for obtaining the configuration content of the target node and the host variables corresponding to the target node based on the data structure and a configuration template preset in the gateway; and the sending module is used for sending the configuration content to a host in the target node.
According to a third aspect, the embodiment of the invention also discloses a gateway configuration processing system, which comprises: the central control platform is used for obtaining a data structure based on host variables of hosts in the target node and the target node, and obtaining configuration contents of the nodes and the host variables corresponding to the nodes based on the data structure and a configuration template of the gateway; the database is used for storing host variables of the target node and hosts in the target node and a configuration template of the gateway; the node is internally provided with a configuration server, and the configuration server is used for acquiring configuration content of the center console, performing execution operation based on the configuration content and sending callback information based on the execution operation.
Optionally, the system further comprises: and the message middleware is used for storing the configuration content before the target node acquires the configuration content, acquiring callback information sent by the node and feeding back the callback information to the central console.
According to a fourth aspect, an embodiment of the present invention also discloses a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the gateway configuration processing method according to the first aspect or any alternative implementation of the first aspect.
According to a fifth aspect, the present invention further discloses a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the gateway configuration processing method according to the first aspect or any of the alternative embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
The invention provides a gateway configuration processing method, a device, a system and computer equipment, wherein the method comprises the following steps: acquiring a target node and a host variable and a basic data model of a host in the target node; converting the basic data model into a data structure corresponding to the host variable based on the host variable; obtaining configuration contents of the target node and host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway; and sending the configuration content to a host in the target node. The data structure obtained according to the host information of the target node can well solve the problems that the configuration files are difficult to maintain in the central console due to different specific contents of the configuration files of the host, the configuration updating efficiency is low, meanwhile, the configuration content is obtained based on the data structure, various information of the host in the target node can be well met, and flexible custom gateway configuration is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a specific example of a gateway configuration processing method in an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a specific example of a gateway configuration processing device in an embodiment of the present invention;
FIG. 3 is a functional block diagram of one specific example of a gateway configuration processing system in an embodiment of the present invention;
FIG. 4 is a diagram showing a computer device according to an embodiment of the present invention;
Fig. 5 is a schematic block diagram of a specific example of a gateway configuration processing system in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, or can be communicated inside the two components, or can be connected wirelessly or in a wired way. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In addition, the technical features of the different embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The embodiment of the invention discloses a gateway configuration processing method, as shown in fig. 1, which comprises the following steps:
Step 101: host variables and a basic data model of a target node and a host in the target node are acquired.
Illustratively, the target node is a specific node needing to perform resource configuration, wherein one node comprises a plurality of hosts; the host variable is description information of the corresponding host, for example, the IP address of the host, the level where the host is located, and the like. The basic data model is used for converting host variables into fixed templates, and the fixed templates can be written into corresponding gateway configurations. The embodiment of the invention does not limit the specific type and number of the host variables, and can be determined by a person skilled in the art according to actual needs.
As shown in table 1, the target node is shown in table 2, which is a host under the target node, wherein the target node is node 1, and two hosts are under node 1.
TABLE 1
Node id (id) | Node code (node_code) | Back source type (bs_type) |
1 | EJS2 | 2 (Edge node) |
TABLE 2
The node id of the node | Node ip (ipv 4) | Host type |
1 | 58.223.20.119 | 1 (Cache server) |
1 | 58.223.20.120 | 1 (Cache server) |
Step 102: the base data model is converted into a data structure corresponding to the host variable based on the host variable.
Illustratively, specific contents in the host variables are combined with the basic data model and converted into a data structure which can be identified by the gateway configuration template, so that the corresponding configuration template is written. The data structure obtained according to the host information of the target node can well solve the problem of low configuration change efficiency caused by different configuration file contents. If the gateway has the newly added configuration requirement, only the place where each host configuration depends on basic information is abstracted into a configuration template variable according to configuration content and configuration template grammar, and the template is written into the configuration template when the configuration is to be issued.
Step 103: and obtaining the configuration content of the target node and the host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway.
The configuration content of the host in the target node is obtained by writing the data structure converted according to the host information into a preset configuration template of the corresponding gateway, and the configuration content is obtained based on the data structure, so that various information of the host in the target node can be well satisfied, and flexible custom gateway configuration is realized.
The preset configuration template may be related to access rules, node information and hierarchy information, and the specific template configuration is as follows:
① Maintaining configuration of access rules (allow own node only)
② Maintaining configuration of nginx ATS SERVER
③ Identifying configuration of a nginx hierarchy
The specific implementation manner of writing the configuration template according to the configuration template and the information of the two hosts in the node 1 is as follows:
The configuration template in this embodiment does not refer to global template variables and custom variables of special configuration, so only the configuration template variables of the current host are taken as examples, and when traversing to the host 58.223.20.119, the pseudo code of the template variables in the process of program running is (flexible design, modification of the code layer, only the configuration template is matched).
These= { bsType (node back source type), nodeHosts (all host information of the node to which the host belongs, nodeHost array), nodeHost (host information) }
Wherein nodeHost = { Ipv4 (ip), type (cache server type) }
Therefore, corresponding to the configuration template, the configuration template generated by the final program is:
① Maintaining configuration of access rules (allow own node only)
allow 127.0.0.1;
allow 58.223.20.119;
allow 58.223.20.120;
deny all;
② Configuration of maintenance backend ats
③ Identifying configuration of a nginx hierarchy
local config={}
config.top_nginx="off"
config.nginx_level="on"
return config
The method is characterized in that configuration templates corresponding to different configurations are designed, and configuration variables are matched when the program runs.
Step 104: and sending the configuration content to a host in the target node. Illustratively, the host configured to the configuration content sending target node performs execution according to the configuration content to complete the corresponding configuration content.
The gateway configuration processing method provided by the invention comprises the following steps: acquiring a target node and a host variable and a basic data model of a host in the target node; converting the basic data model into a data structure corresponding to the host variable based on the host variable; obtaining configuration contents of the target node and host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway; and sending the configuration content to a host in the target node. The data structure obtained according to the host information of the target node can well solve the problems that the configuration files are difficult to maintain in the central console due to different specific contents of the configuration files of the host, the configuration updating efficiency is low, meanwhile, the configuration content is obtained based on the data structure, various information of the host in the target node can be well met, and flexible custom gateway configuration is realized.
As an optional embodiment of the present invention, the step 102 includes: converting the data of the target node and the host variables corresponding to the target node into global variables; the global variable is converted into a data structure corresponding to the host variable based on the host variable. And converting the special configuration of the target node and the host variables corresponding to the target node into custom variables.
Illustratively, in converting data information of a host into a data structure, the method includes: the general information (global variable) of all hosts is, for example, information such as an IP address or a level at which the host is located; meanwhile, the host information may also include some custom data, such as the disk size of the host, and when the data is converted, the general information is converted into global variables, some custom data is converted into special configuration, and the global variables and the special configuration are converted into a data structure together.
As an optional embodiment of the present invention, the step 103 includes: traversing each configuration template, and writing the data structure into the configuration templates through an application program interface of the configuration templates to obtain the configuration content.
Illustratively, when selecting the preset configuration template corresponding to the gateway, all the pre-stored templates need to be traversed, the corresponding preset templates are found, and the data structure obtained in step 102 is written into the configuration template. Since the configuration templates of different gateways are written according to different programming languages, when writing the data structures into the configuration templates, writing is required according to the program interfaces (APIs) corresponding to the configuration templates. Thereby realizing the automatic configuration of different gateway configurations.
As an optional embodiment of the present invention, the step 104 includes: and writing the configuration content into a message middleware, and acquiring and replacing the configuration content in the message middleware to a designated directory of the gateway through a configuration server in the target node.
The message middleware is a message queue, for example RabbitMQ, rocketMQ, activeMQ, kafka, zeroMQ, metaMQ, and the like, and the partial databases such as Redis, mySQL and phxsql can also realize the function of the message queue. The message middleware is used for temporarily storing the configuration content, waiting for the host in the target node to acquire the configuration content, and simultaneously, after the host executes the configuration content, the host can also return the feedback information to the message middleware. The embodiment of the invention does not limit the type of message middleware, and the person skilled in the art can determine the message middleware according to actual needs.
The embodiment of the invention also discloses a gateway configuration processing device, as shown in fig. 2, which comprises:
An obtaining module 201, configured to obtain host variables and a basic data model of a target node and a host in the target node. For example, the details of step 101 in the above method embodiment are described in detail, which is not repeated here.
A data structure module 202, configured to convert the basic data model into a data structure corresponding to the host variable based on the host variable. For example, the details of step 102 in the above method embodiment are not described herein.
And the configuration content module 203 is configured to obtain, based on the data structure and a configuration template preset in the gateway, configuration contents of the target node and host variables corresponding to the target node. For example, the details of step 103 in the above method embodiment are not described herein.
A sending module 204, configured to send the configuration content to a host in the target node. For example, the details of step 104 in the above method embodiment are not described herein.
The gateway configuration processing device provided by the invention comprises an acquisition module 201, a processing module and a processing module, wherein the acquisition module 201 is used for acquiring a target node and a host variable and a basic data model of a host in the target node; a data structure module 202 for converting the basic data model into a data structure corresponding to the host variable based on the host variable; a configuration content module 203, configured to obtain, based on the data structure and a configuration template preset in the gateway, configuration contents of the target node and host variables corresponding to the target node; a sending module 204, configured to send the configuration content to a host in the target node. The data structure obtained according to the host information of the target node can well solve the problems that the configuration files are difficult to maintain in the central console due to different specific contents of the configuration files of the host, the configuration updating efficiency is low, meanwhile, the configuration content is obtained based on the data structure, various information of the host in the target node can be well met, and flexible custom gateway configuration is realized.
As an alternative embodiment of the present invention, the data structure module 202 includes: the all-variable module is used for converting the target node and the data of the host variables corresponding to the target node into global variables; the conversion module is used for converting the global variable into a data structure corresponding to the host variable based on the host variable; and the special configuration module is used for converting the special configuration of the target node and the host variables corresponding to the target node into custom variables. For example, the details of step 102 in the above method embodiment are not described herein.
As an optional embodiment of the present invention, the configuration content module 203 includes: the traversing module is used for traversing each configuration template; and the writing module is used for writing the data structure into the configuration template through an application program interface of the configuration template to obtain the configuration content. For example, the details of step 103 in the above method embodiment are not described herein.
As an optional embodiment of the present invention, the sending module 204 includes: the writing module is used for writing the configuration content into the message middleware; and the configuration module is used for acquiring and executing the configuration content in the message middleware through the configuration server in the target node.
The embodiment of the invention also discloses a gateway configuration processing system, as shown in fig. 3, which comprises: a central console, a database and a node,
The central console 301 is configured to obtain a data structure based on the target node and host variables of hosts in the target node, and obtain configuration contents of the nodes and host variables corresponding to the nodes based on the data structure and a configuration template of the gateway;
Illustratively, the central console 301 is configured to execute the above method embodiment, write the configuration content into the configuration module according to the host information of the target node, and then send the configuration content to the corresponding host. The central console 301 may use Go language to write services to implement the functions of node and host management.
The database 302 is configured to store host variables of the target node and hosts in the target node, and a configuration template of the gateway. Illustratively, the database 302 is used to store host information corresponding to all node information and nodes and configuration templates of all gateways, and the specific database may be MySQL database or the like. The configuration template of the gateway is written according to the Go template grammar. The embodiment of the invention does not limit the type of database and the writing language of the configuration template, and can be determined by a person skilled in the art according to actual needs.
The node 303 is internally provided with a configuration server, and the configuration server is used for acquiring configuration content of the central console, performing an execution operation based on the configuration content, and sending callback information based on the execution operation. For example, a configuration server is built in each node, and is used for acquiring configuration content corresponding to the node, and when the configuration content is issued, the configuration server executes issuing of the configuration content and feeding back callback information.
The gateway configuration processing system provided by the invention comprises a central console 301, a database 302 and a node 303, wherein the central console 301 is used for obtaining a data structure based on host variables of hosts in the target node and the target node, and obtaining configuration contents of the nodes and the host variables corresponding to the nodes based on the data structure and a configuration template of the gateway; the database 302 is configured to store host variables of the target node and hosts in the target node, and a configuration module of the gateway; the node 303 is internally provided with a configuration server, and the configuration server is used for acquiring configuration content of the central console, performing an execution operation based on the configuration content, and sending callback information based on the execution operation. The central console 301 and the database 302 are arranged to realize the storage and configuration of the gateway template and the host information, so that the problems that the configuration files are difficult to maintain in the central console due to different specific contents of the configuration files of the hosts, the configuration updating efficiency is low, the configuration content is obtained based on the data structure, various information of the hosts in the target node can be well met, and the flexible custom gateway configuration is realized.
As an alternative embodiment of the present invention, the system further comprises: and the message middleware is used for storing the configuration content before the target node acquires the configuration content, acquiring callback information sent by the node and feeding back the callback information to the central console. Illustratively, after generating the configuration content, the central console 301 needs to send the configuration content to the message middleware, and the configuration server in the node may obtain the corresponding configuration content from the message middleware, as shown in fig. 5, which is a specific embodiment of the gateway configuration processing system, where the content in the dashed box is a schematic diagram of generating the configuration content, the kafka cluster is the message middleware, and the configuration agent is a configuration server built in the node.
The embodiment of the present invention further provides a computer device, as shown in fig. 4, which may include a processor 401 and a memory 402, where the processor 401 and the memory 402 may be connected by a bus or other means, and in fig. 3, the connection is exemplified by a bus.
The processor 401 may be a central processing unit (Central Processing Unit, CPU). The Processor 401 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory 402 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the gateway configuration processing method in the embodiment of the present invention. The processor 401 executes various functional applications of the processor and data processing by running non-transitory software programs, instructions and modules stored in the memory 402, i.e., implements the gateway configuration processing method in the above-described method embodiments.
Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the processor 401, or the like. In addition, memory 402 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, such remote memory being connectable to processor 401 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 402 and when executed by the processor 401 perform the gateway configuration processing method in the embodiment shown in fig. 1.
The details of the above computer device may be understood correspondingly with respect to the corresponding relevant descriptions and effects in the embodiment shown in fig. 1, which are not repeated here.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a hard disk (HARD DISK DRIVE, abbreviated as HDD), a Solid state disk (Solid-state-STATE DRIVE, SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.
Claims (7)
1. A gateway configuration processing method, comprising:
Acquiring a target node and a host variable and a basic data model of a host in the target node; the basic data model is used for converting a host variable into a fixed template, and writing the fixed template into a corresponding gateway configuration;
Converting the basic data model into a data structure corresponding to the host variable based on the host variable;
Obtaining configuration contents of the target node and host variables corresponding to the target node based on the data structure and a preset configuration template in the gateway;
sending the configuration content to a host in the target node;
The converting the basic data model into a data structure corresponding to the host variable based on the host variable includes:
Converting the data of the target node and the host variables corresponding to the target node into global variables;
converting the global variable into a data structure corresponding to the host variable based on the host variable;
converting the special configuration of the target node and the host variables corresponding to the target node into custom variables;
the obtaining the configuration content of the target node and the host variables corresponding to the target node based on the data structure and the configuration template preset in the gateway comprises the following steps:
traversing each configuration template, and writing the data structure into the configuration templates through an application program interface of the configuration templates to obtain the configuration content.
2. The method of claim 1, wherein the sending the configuration content to the host in the target node comprises:
writing the configuration content into a message middleware;
And acquiring and replacing the configuration content in the message middleware to the designated directory of the gateway through the configuration server in the target node.
3. A gateway configuration processing apparatus, comprising:
The acquisition module is used for acquiring the target node and host variables and basic data models of hosts in the target node;
A data structure module for converting the base data model into a data structure corresponding to the host variable based on the host variable; the basic data model is used for converting a host variable into a fixed template, and writing the fixed template into a corresponding gateway configuration;
The configuration content module is used for obtaining the configuration content of the target node and the host variables corresponding to the target node based on the data structure and a configuration template preset in the gateway;
A sending module, configured to send the configuration content to a host in the target node;
The data structure module comprises: the all-variable module is used for converting the target node and the data of the host variables corresponding to the target node into global variables; the conversion module is used for converting the global variable into a data structure corresponding to the host variable based on the host variable; the special configuration module is used for converting the special configuration of the target node and the host variables corresponding to the target node into custom variables;
the configuration content module comprises: the traversing module is used for traversing each configuration template; and the writing module is used for writing the data structure into the configuration template through an application program interface of the configuration template to obtain the configuration content.
4. A gateway configuration processing system, comprising: a central console, a database and a node,
The central console is used for obtaining a data structure based on host variables of a target node and a host in the target node, and obtaining configuration contents of the node and the host variables corresponding to the node based on the data structure and a configuration template of the gateway; wherein the obtaining the data structure based on the target node and the host variables of the hosts in the target node comprises: converting the data of the target node and the host variables corresponding to the target node into global variables; converting the global variable into a data structure corresponding to the host variable based on the host variable; converting the special configuration of the target node and the host variables corresponding to the target node into custom variables; the obtaining the configuration content of the node and the host variable corresponding to the node based on the data structure and the configuration template of the gateway comprises the following steps: traversing each configuration template, and writing the data structure into the configuration templates through an application program interface of the configuration templates to obtain the configuration content;
The database is used for storing host variables of the target node and hosts in the target node and a configuration template of the gateway;
The node is internally provided with a configuration server, and the configuration server is used for acquiring configuration content of the center console, performing execution operation based on the configuration content and sending callback information based on the execution operation.
5. The system of claim 4, wherein the system further comprises:
And the message middleware is used for storing the configuration content before the target node acquires the configuration content, acquiring callback information sent by the node and feeding back the callback information to the central console.
6. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the gateway configuration method of any of claims 1-2.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the gateway configuration method according to any of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111612388.7A CN114448786B (en) | 2021-12-27 | 2021-12-27 | Gateway configuration processing method, device, system and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111612388.7A CN114448786B (en) | 2021-12-27 | 2021-12-27 | Gateway configuration processing method, device, system and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114448786A CN114448786A (en) | 2022-05-06 |
CN114448786B true CN114448786B (en) | 2024-06-07 |
Family
ID=81363555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111612388.7A Active CN114448786B (en) | 2021-12-27 | 2021-12-27 | Gateway configuration processing method, device, system and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114448786B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7466710B1 (en) * | 2001-08-24 | 2008-12-16 | Cisco Technology, Inc. | Managing packet voice networks using a virtual entity approach |
CN104158692A (en) * | 2014-08-25 | 2014-11-19 | 烽火通信科技股份有限公司 | Method of implementing configuration and management of data of home gateway based on XML (Extensible Markup Language) |
CN110213381A (en) * | 2019-06-12 | 2019-09-06 | 中卓信(北京)科技有限公司 | Dynamic content distributing network constructs system and method |
CN110262872A (en) * | 2019-05-17 | 2019-09-20 | 平安科技(深圳)有限公司 | Load balancing application management method, device, computer equipment and storage medium |
CN111049695A (en) * | 2020-01-09 | 2020-04-21 | 深圳壹账通智能科技有限公司 | Cloud gateway configuration method and system |
CN111767095A (en) * | 2020-06-30 | 2020-10-13 | 平安国际智慧城市科技股份有限公司 | Micro-service generation method and device, terminal equipment and storage medium |
CN111835532A (en) * | 2019-04-11 | 2020-10-27 | 华为技术有限公司 | Network authentication method and device |
CN111865662A (en) * | 2020-06-16 | 2020-10-30 | 新浪网技术(中国)有限公司 | Network equipment configuration method and system |
CN112306464A (en) * | 2020-10-14 | 2021-02-02 | 中国科学院沈阳自动化研究所 | Method and system for realizing information physical fusion in industrial scene by using digital twin |
US11044118B1 (en) * | 2019-06-28 | 2021-06-22 | Amazon Technologies, Inc. | Data caching in provider network substrate extensions |
CN113381866A (en) * | 2020-02-25 | 2021-09-10 | 北京同邦卓益科技有限公司 | Service calling method, device, equipment and storage medium based on gateway |
CN113810463A (en) * | 2021-08-06 | 2021-12-17 | 新浪网技术(中国)有限公司 | Configuration method and system for issuing CDN server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10819767B2 (en) * | 2018-08-08 | 2020-10-27 | Intel Corporation | Information centric network for content data networks |
-
2021
- 2021-12-27 CN CN202111612388.7A patent/CN114448786B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7466710B1 (en) * | 2001-08-24 | 2008-12-16 | Cisco Technology, Inc. | Managing packet voice networks using a virtual entity approach |
CN104158692A (en) * | 2014-08-25 | 2014-11-19 | 烽火通信科技股份有限公司 | Method of implementing configuration and management of data of home gateway based on XML (Extensible Markup Language) |
CN111835532A (en) * | 2019-04-11 | 2020-10-27 | 华为技术有限公司 | Network authentication method and device |
CN110262872A (en) * | 2019-05-17 | 2019-09-20 | 平安科技(深圳)有限公司 | Load balancing application management method, device, computer equipment and storage medium |
CN110213381A (en) * | 2019-06-12 | 2019-09-06 | 中卓信(北京)科技有限公司 | Dynamic content distributing network constructs system and method |
US11044118B1 (en) * | 2019-06-28 | 2021-06-22 | Amazon Technologies, Inc. | Data caching in provider network substrate extensions |
CN111049695A (en) * | 2020-01-09 | 2020-04-21 | 深圳壹账通智能科技有限公司 | Cloud gateway configuration method and system |
CN113381866A (en) * | 2020-02-25 | 2021-09-10 | 北京同邦卓益科技有限公司 | Service calling method, device, equipment and storage medium based on gateway |
CN111865662A (en) * | 2020-06-16 | 2020-10-30 | 新浪网技术(中国)有限公司 | Network equipment configuration method and system |
CN111767095A (en) * | 2020-06-30 | 2020-10-13 | 平安国际智慧城市科技股份有限公司 | Micro-service generation method and device, terminal equipment and storage medium |
CN112306464A (en) * | 2020-10-14 | 2021-02-02 | 中国科学院沈阳自动化研究所 | Method and system for realizing information physical fusion in industrial scene by using digital twin |
CN113810463A (en) * | 2021-08-06 | 2021-12-17 | 新浪网技术(中国)有限公司 | Configuration method and system for issuing CDN server |
Non-Patent Citations (2)
Title |
---|
Integration of smart cards into automation networks;J.A.V. Segura等;Third International Workshop on Intelligent Solutions in Embedded Systems;20050613;全文 * |
梁超超 ; 陈伟 ; 魏峻 ; 许舒人 ; .基于模型的云应用动态配置框架.计算机科学.2017,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN114448786A (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110704518B (en) | Business data processing method and device based on Flink engine | |
WO2021253910A1 (en) | Voice scene update method and device, and terminal, server and system | |
US9405518B2 (en) | Leveraging legacy applications for use with modern applications | |
CN113448988B (en) | Training method and device of algorithm model, electronic equipment and storage medium | |
US20170351723A1 (en) | Managing data format of data received from devices in an internet of things network | |
CN114205230B (en) | Configuration method, system, medium and electronic equipment of cloud primary network element | |
CN110096541B (en) | Method and device for data exchange between databases | |
CN111722862A (en) | Voice scene updating method, device, terminal, server and system | |
CN116628111A (en) | Data processing and converting method and device | |
CN111193622B (en) | Asymmetric configuration management method, device and equipment and readable storage medium | |
CN114448786B (en) | Gateway configuration processing method, device, system and computer equipment | |
WO2013026178A1 (en) | Orthogonal layout generation | |
CN104750468A (en) | Server side topological data conversion method and device | |
CN111740851B (en) | Configuration message generation method, device and system | |
WO2023045743A1 (en) | Method for automatically generating json data from database data, readable medium and electronic device | |
CN113439418A (en) | Method, system, terminal and storage medium for changing resource state | |
CN116127217A (en) | Method and device for dynamically displaying real-time data of electric power, front end and storage medium | |
CN114219109A (en) | Conference room patrol record management method and device and electronic equipment | |
CN111209359A (en) | EMS transformer graph model access GIS platform icon self-adaption system and method | |
CN108256188B (en) | Communication line diagram generation method and system, terminal device and storage medium | |
CN113688603B (en) | Model file processing method and device, storage medium and electronic equipment | |
CN118413573B (en) | Resource management method, device, computer equipment, storage medium and product | |
CN114978903B (en) | Configuration issuing method, device, server and readable storage medium | |
CN106156339A (en) | Declaration form the management access method of system, Apparatus and system | |
CN110879860A (en) | Document management method, system, electronic device and medium |
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 |