[go: up one dir, main page]

CN110113218A - A kind of gateway configuration method, system, computer storage medium and electronic equipment - Google Patents

A kind of gateway configuration method, system, computer storage medium and electronic equipment Download PDF

Info

Publication number
CN110113218A
CN110113218A CN201910440399.8A CN201910440399A CN110113218A CN 110113218 A CN110113218 A CN 110113218A CN 201910440399 A CN201910440399 A CN 201910440399A CN 110113218 A CN110113218 A CN 110113218A
Authority
CN
China
Prior art keywords
gateway
parameter
address
gateways
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910440399.8A
Other languages
Chinese (zh)
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.)
Polytron Technologies Inc In Shenzhen
Original Assignee
Polytron Technologies Inc In Shenzhen
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 Polytron Technologies Inc In Shenzhen filed Critical Polytron Technologies Inc In Shenzhen
Priority to CN201910440399.8A priority Critical patent/CN110113218A/en
Publication of CN110113218A publication Critical patent/CN110113218A/en
Priority to PCT/CN2020/087146 priority patent/WO2020238523A1/en
Pending legal-status Critical Current

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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0253Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using browsers or web-pages for accessing management information
    • 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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • 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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

This application discloses a kind of gateway configuration method, the gateway configuration method includes the gateway information for obtaining all gateways in target ip address section;Wherein, the gateway information includes the MAC Address of the gateway and the mapping relations of IP address;Parameter acquisition instruction is sent to all gateways according to the mapping relations, to obtain the former gateway parameter of all gateways;When receiving modification instruction, new gateway parameter is obtained according to all former gateway parameters of the modification instruction modification;Each new gateway parameter is sent to corresponding gateway, so that the gateway completes parameter configuration operation according to the new gateway parameter.The application can batch configuration gateway parameter, improve gateway allocative efficiency.Disclosed herein as well is a kind of gateway configuration system, a kind of computer readable storage medium and a kind of electronic equipment, have the above beneficial effect.

Description

A kind of gateway configuration method, system, computer storage medium and electronic equipment
Technical field
The present invention relates to field of computer technology, in particular to a kind of gateway configuration method, system, one kind are computer-readable Storage medium and a kind of electronic equipment.
Background technique
Gateway (Gateway) equipment is also known as gateway, protocol converter, is offer data conversion clothes between multiple networks The computer system or equipment of business.It may be said that gateway is exactly the connector between different nets, it is exactly that data will be from a net It will equipment Jing Guo " negotiation " when to another net.
In the related technology, configuration gateway is needed by following steps: connecting the net using mobile phone or portable notebook The Wi-Fi hotspot for closing transmitting just can be carried out after inputting after its IP address the webpage configuration page for accessing the gateway in a browser Configuration.But when the quantity of gateway is very more, when to be repeated continuously step described above be very irritated and time-consuming It waits.
Therefore, how batch configuration gateway parameter, improve gateway allocative efficiency be that those skilled in the art need to solve at present Certainly the technical issues of.
Summary of the invention
The purpose of the application is to provide a kind of gateway configuration method, system, a kind of computer readable storage medium and one kind Electronic equipment, can batch configuration gateway parameter, improve gateway allocative efficiency.
In order to solve the above technical problems, the application provides a kind of gateway configuration method, which includes:
Obtain the gateway information of all gateways in target ip address section;Wherein, the gateway information includes the net Close the MAC Address of equipment and the mapping relations of IP address;
Parameter acquisition instruction is sent to all gateways according to the mapping relations, to obtain all nets Close the former gateway parameter of equipment;
When receiving modification instruction, new gateway ginseng is obtained according to all former gateway parameters of the modification instruction modification Number;
Each new gateway parameter is sent to corresponding gateway, so that the gateway is according to the new net It closes parameter and completes parameter configuration operation.
Optionally, the gateway information for obtaining all gateways in target ip address section includes:
Each IP address into the target ip address section sends corresponding HTTP scan request;
Receive the gateway information that all gateways are returned according to the HTTP scan request.
Optionally, the gateway information for obtaining all gateways in target ip address section includes:
Each IP address into the target ip address section sends corresponding ARP scan request;
Receive the host information that All hosts are returned according to the ARP scan request;
The host information is filtered to obtain the gateway information according to the MAC Address feature of the gateway.
Optionally, the gateway information further include: gateway model and gateway firmware version;
Correspondingly, each new gateway parameter be sent to corresponding gateway including:
Corresponding target HTTP request format is created according to the gateway model and the gateway firmware version;
For the parameter modification of each target HTTP request format of the gateway building comprising the new gateway parameter Request;
Each parameter modification request is sent to corresponding gateway.
Optionally, after the former gateway parameter for obtaining all gateways, further includes:
Judge in all former gateway parameters with the presence or absence of identical target class parameter;
If so, being class parameter to be modified by the identical target class parameter tags;
Correspondingly, before each new gateway parameter is sent to corresponding gateway, further includes:
Modification operation is executed to all class parameters to be modified and obtains new target class parameter, so that all new nets The target class parameter or new target class parameter closed in parameter are all different.
Optionally, the target class parameter includes static ip address, ssid parameter, clientID parameter and topic parameter In any sort parameter or appoint a few class parameters combination.
Optionally, after the former gateway parameter for obtaining all gateways, further includes:
The modification authority of the MAC Address of each gateway is set, to forbid user to modify the MAC Address.
Present invention also provides a kind of gateways to configure system, and gateway configuration system includes:
Scan module, for obtaining the gateway information of all gateways in target ip address section;Wherein, the gateway letter Breath includes the MAC Address of the gateway and the mapping relations of IP address;
Parameter acquisition module, for sending parameter acquisition instruction to all gateways according to the mapping relations, To obtain the former gateway parameter of all gateways;
Batch configuration module, for when receive modification instruction when, according to the modification instruction modification it is all it is described original nets It closes parameter and obtains new gateway parameter;It is also used to each new gateway parameter being sent to corresponding gateway, so as to described Gateway completes parameter configuration operation according to the new gateway parameter.
Present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer Program realizes the step of above-mentioned gateway configuration method executes when executing.
Present invention also provides a kind of electronic equipment, including memory and processor, calculating is stored in the memory Machine program, the processor realize the step that above-mentioned gateway configuration method executes when calling the computer program in the memory Suddenly.
This application provides a kind of gateway configuration methods, the gateway including obtaining all gateways in target ip address section Information;Wherein, the gateway information includes the MAC Address of the gateway and the mapping relations of IP address;It is reflected according to described It penetrates relationship and sends parameter acquisition instruction to all gateways, to obtain the former gateway ginseng of all gateways Number;When receiving modification instruction, new gateway parameter is obtained according to all former gateway parameters of the modification instruction modification;It will Each new gateway parameter is sent to corresponding gateway, so that the gateway is completed according to the new gateway parameter Parameter configuration operation.
The application obtains the mapping relations of the MAC Address of all gateways and IP address in target ip address section first, The former gateway parameter that each gateway is obtained based on the mapping relations is carried out batch modification to former gateway pipe parameter and obtains new net Close parameter.By the way that new gateway parameter is sent to corresponding gateway parameter, each gateway can be complete according to new gateway parameter It is operated at parameter configuration.It may be implemented that the concentration of batch gateway parameter is obtained and modified in above-mentioned gateway configuration process, Can batch configuration gateway parameter, improve gateway allocative efficiency.The application additionally provides a kind of gateway configuration system, one kind simultaneously Computer readable storage medium and a kind of electronic equipment have above-mentioned beneficial effect, and details are not described herein.
Detailed description of the invention
In ord to more clearly illustrate embodiments of the present application, attached drawing needed in the embodiment will be done simply below It introduces, it should be apparent that, the drawings in the following description are only some examples of the present application, for ordinary skill people For member, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of gateway configuration method provided by the embodiment of the present application;
Fig. 2 is the flow chart of gateway information acquisition modes provided in this embodiment;
Fig. 3 is the flow chart of the method provided by the embodiments of the present application for obtaining former gateway parameter;
Fig. 4 is the flow chart of gateway parameter batch configuration method provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of gateway configuration system provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Below referring to Figure 1, Fig. 1 is a kind of flow chart of gateway configuration method provided by the embodiment of the present application.
Specific steps may include:
S101: the gateway information of all gateways in target ip address section is obtained;
Wherein, the gateway configuration method of the present embodiment can be realized based on computer, and the present embodiment can be realized batch and match The prerequisite for setting gateway may include the following: (1) executing the computer of gateway configuration method described in the present embodiment With the local area network for needing the gateway being configured to be in the same network segment;(2) each gateway has built-in HTTP clothes Business device, can handle the HTTP request that batch configuration PROGRAMMED REQUESTS comes;Specifically, HTTP request may include scan request, original Beginning parameter acquisition request and configuration parameter request.
The purpose of this step is to scan the gateway information of all gateways in target ip address section, as one The feasible embodiment of kind, can scan all gateways in same local area network.The gateway letter that this step is mentioned Breath may include the MAC Address of the gateway and the mapping relations of IP address.
The present embodiment can obtain the MAC Address of gateway by way of sending HTTP request or sending ARP request With the mapping relations of IP address, the other modes of gateway information can also be obtained according to practical application scene flexible choice certainly, Herein without specifically limiting.
S102: sending parameter acquisition instruction to all gateways according to the mapping relations, all to obtain The former gateway parameter of the gateway;
Wherein, this step establish obtained gateway MAC Address and IP address mapping relations on the basis of, root Already present former gateway parameter in the available gateway of parameter acquisition instruction is sent to gateway according to the mapping relations, it is former Gateway parameter may include the information such as static ip address, ssid parameter, clientID parameter, MAC Address and topic parameter.
Pass can be constructed after returning to former gateway parameter there are multiple gateways as a kind of feasible embodiment In the former gateway parameter list of all gateways.There are specific parameters to need and other all gateways not phase for gateway Together, therefore the phenomenon that certain types of parameter is with the presence or absence of repeating can be judged in former gateway parameter list, it if it exists can be with It is adjusted.Further, cannot be the same in each gateway due to MAC Address, it, can after obtaining MAC Address To execute permission modification operation to MAC Address, the information located except MAC Address can only be modified to limit user.
Specifically, gateway can be according to JSON data format return parameters list, here for description is facilitated, only Several parameters are enumerated, but are not limited to this several parameter, the format following content of former gateway parameter:
S103: it when receiving modification instruction, is obtained newly according to all former gateway parameters of the modification instruction modification Gateway parameter;
Wherein, after obtaining the former gateway parameter of multiple gateways, it can receive what upper layer application or user sent Modification instruction, modification instruction may include the target value of specific type parameter in the corresponding former gateway parameter of each gateway, The initial value in former gateway parameter is revised as target value, finally obtains new gateway parameter.
It can detecte during according to modification instruction modification original gateway parameter as a kind of feasible embodiment Certain types of parameter, such as static ip address, if the phenomenon that there are repetitions, it if it exists can be based on specifically rule will be related Parameter configuration is different parameter, such as when the static ip address of gateway A and B are 192.168.0.0, can be by it In the static ip address of a gateway add 1 to get to the static IP for being respectively 192.168.0.0 and 192.168.0.1 Location.Parameter conflict bring negative effect can be prevented by aforesaid operations.
S104: each new gateway parameter is sent to corresponding gateway, so that the gateway is according to institute It states new gateway parameter and completes parameter configuration operation.
Wherein, after obtaining new gateway parameter, each new gateway parameter is sent to corresponding gateway by this step, So that gateway carries out corresponding parameter modification operation according to new gateway parameter, the batch of multiple gateways is matched in completion It sets.
The mapping that the present embodiment obtains the MAC Address of all gateways and IP address in target ip address section first is closed System, the former gateway parameter of each gateway is obtained based on the mapping relations, is carried out batch modification to former gateway pipe parameter and is obtained New gateway parameter.By the way that new gateway parameter is sent to corresponding gateway parameter, each gateway can join according to new gateway Parameter configuration is counted up into operate.It may be implemented that the concentration of batch gateway parameter is obtained and repaired in above-mentioned gateway configuration process Change, can batch configuration gateway parameter, improve gateway allocative efficiency.
All gateways in target ip address section are obtained as the further supplement of embodiment corresponding for Fig. 1,101 The operation of gateway information can specifically include HTTP scanning mode and ARP scanning mode.As realize HTTP scanning mode or The prerequisite of ARP scanning mode, when gateway deployed environment be made of multi-stage router or multiple VLAN it is more When the Ethernet local area network of network segment, can support to scan in a manner of HTTP mutually to access between network segment, but ARP mode do not support across Network segment scanning.HTTP server built in each gateway can handle HTTP scan request, that is, when batch configuration program is sent URL is http: after // { IP }: { Port }/checknetwork HTTP GET request, gateway will return to the current MAC of gateway Address, IP address, gateway model and firmware version number.HTTP server built in each gateway can handle HTTP and obtain original ginseng Several requests, that is, when batch configuration program transmission URL is http: // { IP }: { Port }/checkparam HTTP GET After request, the HTTP server built in gateway will return to the initial parameter of gateway.HTTP server built in each gateway can be located Manage HTTP configuration parameter request, that is, when batch configuration program send URL be http: // { IP }: { Port }/ Setparam? after the HTTP GET request of Parameter1=Value1&&Parameter2=Value2, built in gateway HTTP server will configure the parameter of gateway and return to configuration result.
The detailed process of HTTP scanning can be with are as follows: each IP address first into the target ip address section, which is sent, to be corresponded to HTTP scan request, then receive the gateway information that all gateways are returned according to the HTTP scan request.
The detailed process of ARP scanning can be with are as follows: each IP address first into the target ip address section, which is sent, to be corresponded to ARP scan request, the host information that returns according to the ARP scan request of All hosts is secondly received, then according to The MAC Address feature of gateway is filtered the host information to obtain the gateway information.
In above two scanning mode, HTTP scanning mode can send HTTP scan request to each gateway, And ARP scanning mode only can not send ARP scan request to gateway, but All hosts are sent into target ip address section ARP scan request.Therefore ARP scanning mode can obtain the information of All hosts, then execute filter operation again and obtain gateway The gateway information of equipment.As a kind of feasible embodiment, the MAC of the MAC Address of gateway relative to general host Location has a specific address feature, such as the top N of MAC Address of gateway is specific number.
Fig. 2 is referred to, Fig. 2 is the flow chart of gateway information acquisition modes provided in this embodiment;
The IP address section range that S201, input need to scan;
S202, selection ARP scanning mode or HTTP scanning mode;
If selection HTTP scanning mode enters S20211, if selection ARP scanning mode enters 20221:
S20211, input HTTP request Basic Auth password;
S20212, the scanning of customized HTTP request;
Wherein, customized HTTP request scanning process can be with are as follows: according to the IP address section range of input, for the IP address section All IP in range generate the HTTP request of a scanning respectively.For example, its URL be http: // { IP }: { Port }/ The HTTP GET request of checknetwork.
Returned after HTTP server authentication secret success built in S20213, gateway the model of gateway, firmware version number, MAC Address and IP address.
Wherein, if the gateway of IP address exists, after HTTP server receives HTTP scan request, the type of gateway will be returned Number, firmware version number, MAC Address, IP address, if batch configuration program does not receive the reply of gateway, with just illustrating the IP The gateway of location is not present.
S20214, the mapping table for obtaining gateway corresponding MAC Address and IP address in IP address section, and terminate process.
S20221, the suitable network card adapter of selection;
S20222, the IP address section range according to input send ARP request scanning to each IP address;
The mapping table of S20223, the MAC Address for scanning all hosts in local area network and IP address;
Wherein, which may include gateway, it is also possible to the other equipment such as computer, mobile phone.
S20224, the intended gateway to be configured is filtered out according to the MAC Address feature of gateway;
S20225, the mapping table for obtaining the corresponding MAC Address and IP address of gateway in IP address section, and terminate process.
As the further supplement of embodiment corresponding for Fig. 1, gateway information can also include gateway model and Gateway firmware version.It further, will be each in S104 when gateway information includes gateway model and gateway firmware version The operation that the new gateway parameter is sent to corresponding gateway may comprise steps of:
Step 1: corresponding target HTTP request lattice are created according to the gateway model and the gateway firmware version Formula;
Step 2: for the ginseng of each target HTTP request format of the gateway building comprising the new gateway parameter Number modification request;
Step 3: each parameter modification request is sent to corresponding gateway.
Gateway is often since it is desired that the reason of upgrading (such as the setting for needing to increase parameter), leads to different model The HTTP request format supported with the gateway of different firmware versions is different, for example is given with the HTTP request format of highest version firmware When parameter is arranged in lowest version firmware requests, the firmware of lowest version is possible to not identify the HTTP request format of highest version.It is above-mentioned Process provides the construction method of HTTP request format, after knowing gateway model and the gateway firmware version, creation The request format of gateway current version of firmware is adapted to, realizes the upgrading iteration between gateway firmware version.
As the further supplement of embodiment corresponding for Fig. 1, in the former gateway ginseng for obtaining all gateways Further include following operation after number: judging in all former gateway parameters with the presence or absence of identical target class parameter;If so, It is then class parameter to be modified by the identical target class parameter tags.It further, can also be by each new gateway Parameter is sent to before corresponding gateway, is executed modification operation to all class parameters to be modified and is obtained new target class Parameter, so that the target class parameter or new target class parameter in all new gateway parameters are all different.Above-mentioned target class Parameter includes any sort parameter or a few class parameters in static ip address, ssid parameter, clientID parameter and topic parameter Combination.
Most parameter is the same in each gateway in gateway parameter, such as URL parameter, and URL parameter indicates Be server address, be the same in the parameter value of all gateways, because of only one server of ordinary circumstance Location.But parameter relevant to gateway be cannot be the same, parameter can be divided into two major classes herein, one kind for because of IP address not With and different parameters, it is another kind of for different parameter due to MAC Address difference, for example, static ip address, ssid parameter, ClientID parameter and topic parameter.
Wherein, static ip address, i.e. static_IP parameter, when the static ip address of gateway is arranged, if each net The static ip address of pass is just as will can not normal communication.Ssid parameter, expression is that the wifi that gateway emits is warm Point title, if cannot equally distinguish which gateway is this wifi hotspot be.ClientID parameter, expression is gateway Client unique identifier, in MQTT communication protocol, clientID is also cannot be the same, if there is identical The gateway of clientID is connected into the same server, another identical clientID gateway can be kicked from server offline. Topic parameter, the theme that the gateway of expression gives out information equally are for if theme is the same, taking in MQTT communication protocol Being engaged in, just which gateway is indistinguishable message be to device.That is, target class parameter mentioned above is any two Parameter that cannot be completely the same in the parameter of gateway.
Illustrate the acquisition original gateway parameter and gateway of above-described embodiment description below by embodiment in practical applications The process of parameter batch configuration.
Fig. 3 is referred to, Fig. 3 is the flow chart of the method provided by the embodiments of the present application for obtaining former gateway parameter, is obtained former The method of gateway parameter may comprise steps of
S301, input HTTP request Basic Auth (Basic Authentication) password;
S302, the HTTP request for obtaining initial parameter is sent to gateway;
Wherein, the former gateway parameter of initial parameter, that is, mentioned above.For example, it is http that HTTP request, which can be URL: // { IP }: the request that the HTTP of { Port }/checkparam is generated;
HTTP server built in S303, gateway will return to the initial parameter list of gateway after receiving HTTP request;
S304, judge whether parameter cannot be identical inside each gateway;If then entering S3041, if it is not, then entering S3042;
S3041, directly parameter is presented to the user;
S3042, judge that the parameter is different different according further to static ip address according to MAC Address;
S30421, according to static ip address when different (the reason is that the IP address in the same local area network is cannot phase With, distinguishing in this way is IP address conflict in order to prevent), directly include by the static ip address using brace, in this way Do is to remind user, such as { 192.168.0.2 }.
S30422, it is different according to MAC Address when, MAC Address is captured out, is presented to the user with spcial character, with User is reminded not modify the spcial character, the parameter character for capitalizing MAC Address shows that small letter mac address character is used with { MAC } { mac } is shown to user.This kind of parameter of MAC Address is in each gateway cannot be the same, and parameter value is the word comprising MAC Address Symbol, i.e., MAC Address is all unique in the world, so can distinguish the parameter of each gateway, example using MAC Address Such as, the title for the WiFi that gateway emits is cannot be the same, and name format is " GW-XXXXXXXXX ", wherein XXXXXXXXX Character is the MAC Address of gateway.For example " GW-XXXXXXXXX " parameter can be changed into " GW- { MAC } ", limiting user with this can only Modify the character except " { MAC } " spcial character.
Fig. 4 is referred to below, and Fig. 4 is the flow chart of gateway parameter batch configuration method provided by the embodiments of the present application, should Gateway parameter batch configuration method may comprise steps of:
S401, target component is modified on the basis of initial parameter;
Wherein, which is former gateway parameter.
S402, the selection gateway to be configured;
S403, input HTTP request Basic Auth password;
S404, the gateway to have chosen create HTTP request;
S4041, different HTTP request formats is created according to the gateway model of acquisition, firmware version, to realize gateway Upgrading iteration between firmware version.
S4042, successively judge whether every a kind of parameter cannot be identical inside each gateway;If the parameter can phase Together, it just directly generates, does not have to processing;If parameter cannot be identical, into S40422;
Wherein, this step is successively judged one kind parameter every in gateway parameter, successively judges that every a kind of parameter is It is no cannot be identical inside each gateway.
S40422, judge such parameter for MAC Address or static ip address;
S404221, if static ip address, the IP address for including by brace (class parameter i.e. to be modified) is extracted Come, add up 1 on the basis of the IP address, guarantee the static ip address of different gateway settings be it is different, otherwise can cause IP address conflict.
S404222, if MAC Address, the parameter containing { mac } or { MAC } spcial character is captured out, by these Spcial character is substituted for the actual MAC Address of corresponding gateway, such as: it is true that the parameter of { MAC } spcial character is substituted for corresponding gateway The MAC Address character of capitalization, { mac } spcial character are converted into the address mac of the true small letter of corresponding gateway.
S405, create HTTP configuration parameter request (for example, its URL be http: // { IP }: { Port }/ Setparam? the HTTP GET request of Parameter1=Value1&&Parameter2=Value2) after, it will be created HTTP request is put into thread pool, and the quantity that limitation is at most requested simultaneously prevents network congestion;
HTTP server built in S406, gateway receives the result for configuring return parameters after request.
Fig. 5 is referred to, Fig. 5 is a kind of structural schematic diagram of gateway configuration system provided by the embodiment of the present application;
The system may include:
Scan module 100, for obtaining the gateway information of all gateways in target ip address section;Wherein, the net Closing information includes the MAC Address of the gateway and the mapping relations of IP address;
Parameter acquisition module 200 refers to for sending parameter acquisition to all gateways according to the mapping relations It enables, to obtain the former gateway parameter of all gateways;
Batch configuration module 300, for when receive modification instruction when, according to all originals of modification instruction modification Gateway parameter obtains new gateway parameter;It is also used to each new gateway parameter being sent to corresponding gateway, with toilet It states gateway and parameter configuration operation is completed according to the new gateway parameter.
Wherein, gateway is deployed under the same local area network by the present embodiment premise, the electricity of operation gateway configuration system For the terminal devices such as brain, mobile phone also under the same local area network, batch configuration program passes through ARP (Address Resolution Protocol address resolution protocol) or HTTP (Hypertext Transfer Protocol hypertext transfer protocol) scanning Then the mapping relations of the IP address of gateway under entire local area network and MAC Address out are sent by IP address to some gateway HTTP request is to obtain the initial parameter of gateway, after user modifies parameter, then by modified parameter by definitely rule to The HTTP request of the gateway distribution configuration needed to configure, the HTTP server of gateway will return configuring as a result, so far just completing Batch configuration.
The mapping that the present embodiment obtains the MAC Address of all gateways and IP address in target ip address section first is closed System, the former gateway parameter of each gateway is obtained based on the mapping relations, is carried out batch modification to former gateway pipe parameter and is obtained New gateway parameter.By the way that new gateway parameter is sent to corresponding gateway parameter, each gateway can join according to new gateway Parameter configuration is counted up into operate.It may be implemented that the concentration of batch gateway parameter is obtained and repaired in above-mentioned gateway configuration process Change, can batch configuration gateway parameter, improve gateway allocative efficiency.
Further, scan module 100 includes:
First request transmitting unit sends corresponding HTTP for each IP address into the target ip address section and sweeps Retouch request;
First information receiving unit, the net returned for receiving all gateways according to the HTTP scan request Close information.
Further, scan module 100 includes:
Second request transmitting unit sends corresponding ARP for each IP address into the target ip address section and sweeps Retouch request;
Second information receiving unit, the host information returned for receiving All hosts according to the ARP scan request;
Filter element is filtered the host information to obtain the net according to the MAC Address feature of the gateway Close information.
Further, the gateway information further include: gateway model and gateway firmware version;
Correspondingly, batch configuration module 300 includes:
Format creating unit, for creating corresponding target according to the gateway model and the gateway firmware version HTTP request format;
Construction unit is requested, for asking for each gateway building comprising the target HTTP of the new gateway parameter The parameter of format is asked to modify request;
Request transmitting unit, for each parameter modification request to be sent to corresponding gateway.
Further, further includes:
Judgment module, for judging in all former gateway parameters with the presence or absence of identical target class parameter;If so, It is class parameter to be modified by the identical target class parameter tags;
Correspondingly, further include:
Parameter adapting module obtains new target class ginseng for executing modification operation to all class parameters to be modified Number, so that the target class parameter or new target class parameter in all new gateway parameters are all different.
Further, the target class parameter includes static ip address, ssid parameter, clientID parameter and topic ginseng The combination of any sort parameter or a few class parameters in number.
Further, further includes:
Priority assignation module, the modification authority of the MAC Address for each gateway to be arranged, to forbid user Modify the MAC Address.
Above-described embodiment can distinguish the relevant parameter of gateway in batches, will not be the relevant parameter configuration of gateway at same Parameter, it is therefore prevented that parameter conflict bring negative effect.The HTTP scanning mode of user-defined format, HTTP scanning result return The update iteration between version may be implemented in gateway model, version number.Scanning result is directly our intended gateway, without It is other incoherent hosts, saves the trouble of filtering.According to HTTP scanning mode, HTTP scanning result returns to gateway type Number, the update iteration between version may be implemented in version number.Scanning result is directly gateway, rather than other incoherent masters Machine saves the trouble of filtering.
Since the embodiment of components of system as directed is corresponded to each other with the embodiment of method part, the embodiment of components of system as directed is asked Referring to the description of the embodiment of method part, wouldn't repeat here.
Present invention also provides a kind of computer readable storage mediums, have computer program thereon, the computer program It is performed and step provided by above-described embodiment may be implemented.The storage medium may include: USB flash disk, mobile hard disk, read-only deposit Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or The various media that can store program code such as CD.
Present invention also provides a kind of electronic equipment, may include memory and processor, have meter in the memory Calculation machine program may be implemented provided by above-described embodiment when the processor calls the computer program in the memory Step.Certain electronic equipment can also include various network interfaces, the components such as power supply.The above-mentioned implementation in the electronic equipment The treatment process of example can exist in the form of batch configuration, and batch configuration program module can be completed in three steps, sweep Retouching module will be responsible for scanning the gateway in same local area network, and the MAC Address and IP address of gateway are returned to subscriber interface module Mapping table.Subscriber interface module obtains the initial parameter of gateway by obtaining initial parameter module.User passes through user circle After the initial parameter that face mould block amendment step two obtains, the parameter after modification is passed through batch configuration module by subscriber interface module The HTTP request that configuration parameter is sent to the gateway needed to configure, so far will complete batch configuration.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For system disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.It should be pointed out that for those skilled in the art, under the premise of not departing from the application principle, also Can to the application, some improvement and modification can also be carried out, these improvement and modification also fall into the protection scope of the claim of this application It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.Under the situation not limited more, the element limited by sentence "including a ..." is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (10)

1. a kind of gateway configuration method characterized by comprising
Obtain the gateway information of all gateways in target ip address section;Wherein, the gateway information includes that the gateway is set The mapping relations of standby MAC Address and IP address;
Parameter acquisition instruction is sent to all gateways according to the mapping relations, is set to obtain all gateways Standby former gateway parameter;
When receiving modification instruction, new gateway parameter is obtained according to all former gateway parameters of the modification instruction modification;
Each new gateway parameter is sent to corresponding gateway, so that the gateway is joined according to the new gateway Parameter configuration is counted up into operate.
2. gateway configuration method according to claim 1, which is characterized in that all gateways in the acquisition target ip address section The gateway information of equipment includes:
Each IP address into the target ip address section sends corresponding HTTP scan request;
Receive the gateway information that all gateways are returned according to the HTTP scan request.
3. gateway configuration method according to claim 1, which is characterized in that all gateways in the acquisition target ip address section The gateway information of equipment includes:
Each IP address into the target ip address section sends corresponding ARP scan request;
Receive the host information that All hosts are returned according to the ARP scan request;
The host information is filtered to obtain the gateway information according to the MAC Address feature of the gateway.
4. gateway configuration method according to claim 1, which is characterized in that the gateway information further include: gateway type Number and gateway firmware version;
Correspondingly, each new gateway parameter be sent to corresponding gateway including:
Corresponding target HTTP request format is created according to the gateway model and the gateway firmware version;
Parameter for each target HTTP request format of the gateway building comprising the new gateway parameter modifies request;
Each parameter modification request is sent to corresponding gateway.
5. according to claim 1 to any one of 4 gateway configuration methods, which is characterized in that set obtaining all gateways After standby former gateway parameter, further includes:
Judge in all former gateway parameters with the presence or absence of identical target class parameter;
If so, being class parameter to be modified by the identical target class parameter tags;
Correspondingly, before each new gateway parameter is sent to corresponding gateway, further includes:
Modification operation is executed to all class parameters to be modified and obtains new target class parameter, so that all new gateway ginsengs Target class parameter or new target class parameter in number are all different.
6. gateway configuration method according to claim 5, which is characterized in that the target class parameter include static ip address, The combination of any sort parameter or a few class parameters in ssid parameter, clientID parameter and topic parameter.
7. gateway configuration method according to claim 1, which is characterized in that in the former gateway for obtaining all gateways After parameter, further includes:
The modification authority of the MAC Address of each gateway is set, to forbid user to modify the MAC Address.
8. a kind of gateway configures system characterized by comprising
Scan module, for obtaining the gateway information of all gateways in target ip address section;Wherein, the gateway information packet Include the MAC Address of the gateway and the mapping relations of IP address;
Parameter acquisition module, for sending parameter acquisition instruction to all gateways according to the mapping relations, so as to Obtain the former gateway parameter of all gateways;
Batch configuration module, for being joined according to all former gateways of the modification instruction modification when receiving modification instruction Number obtains new gateway parameter;It is also used to each new gateway parameter being sent to corresponding gateway, so as to the gateway Equipment completes parameter configuration operation according to the new gateway parameter.
9. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the step of the gateway configuration method as described in any one of claim 1 to 7 when the computer program is executed by processor Suddenly.
10. a kind of electronic equipment characterized by comprising
Memory, for storing computer program;
Processor, realizing the gateway configuration method as described in any one of claim 1 to 7 when for executing the computer program Step.
CN201910440399.8A 2019-05-24 2019-05-24 A kind of gateway configuration method, system, computer storage medium and electronic equipment Pending CN110113218A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910440399.8A CN110113218A (en) 2019-05-24 2019-05-24 A kind of gateway configuration method, system, computer storage medium and electronic equipment
PCT/CN2020/087146 WO2020238523A1 (en) 2019-05-24 2020-04-27 Gateway configuration method, system, computer storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910440399.8A CN110113218A (en) 2019-05-24 2019-05-24 A kind of gateway configuration method, system, computer storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN110113218A true CN110113218A (en) 2019-08-09

Family

ID=67492189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910440399.8A Pending CN110113218A (en) 2019-05-24 2019-05-24 A kind of gateway configuration method, system, computer storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN110113218A (en)
WO (1) WO2020238523A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736877A (en) * 2020-03-31 2020-10-02 紫光云技术有限公司 Method for upgrading Agent of cloud database
WO2020238523A1 (en) * 2019-05-24 2020-12-03 深圳云里物里科技股份有限公司 Gateway configuration method, system, computer storage medium and electronic device
CN114422481A (en) * 2021-12-13 2022-04-29 科华数据股份有限公司 Network equipment management method and related device
CN116723174A (en) * 2023-07-21 2023-09-08 中瑞恒(北京)科技有限公司 A dynamic IP modification method and system based on intelligent gateway
CN116760706A (en) * 2023-07-07 2023-09-15 中国电信股份有限公司技术创新中心 Configuration file update methods, devices, equipment, storage media and products
CN118804017A (en) * 2023-11-13 2024-10-18 中移(杭州)信息技术有限公司 Indoor connection situation analysis method, device, equipment and storage medium
CN119892635A (en) * 2024-12-06 2025-04-25 天翼云科技有限公司 Gateway configuration re-pushing method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521658A (en) * 2008-02-29 2009-09-02 上海博达数据通信有限公司 Realizing method for Ethernet ARP scanning which is applied in broadband router
CN102082685A (en) * 2009-11-30 2011-06-01 三星电子(中国)研发中心 Network configured method and system of embedded device
CN102710439A (en) * 2012-05-29 2012-10-03 南京邮电大学 Obtaining method of user terminal parameter information
CN104506567A (en) * 2014-11-19 2015-04-08 北京天地互连信息技术有限公司 Data exchange method for gateway and server of Internet of things
US20190149402A1 (en) * 2017-11-10 2019-05-16 International Business Machines Corporation Accessing gateway management console

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621406B (en) * 2009-07-28 2012-12-26 中兴通讯股份有限公司 Method for configuring domestic gateways in batch, configuring equipment and domestic gateways
CN106375129A (en) * 2016-09-21 2017-02-01 深圳市欧瑞博电子有限公司 Method and device for upgrading home gateway
CN106301959B (en) * 2016-10-10 2019-04-30 烽火通信科技股份有限公司 Gateway batch upgrading method and system based on WINDOWS and LINUX platform
CN107979497B (en) * 2017-12-26 2021-08-13 北京搜狐新媒体信息技术有限公司 Automatic configuration method and device
CN109218103A (en) * 2018-09-26 2019-01-15 京信通信系统(中国)有限公司 Gateway upgrade method, gateway and Network Management Equipment
CN110113218A (en) * 2019-05-24 2019-08-09 深圳云里物里科技股份有限公司 A kind of gateway configuration method, system, computer storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521658A (en) * 2008-02-29 2009-09-02 上海博达数据通信有限公司 Realizing method for Ethernet ARP scanning which is applied in broadband router
CN102082685A (en) * 2009-11-30 2011-06-01 三星电子(中国)研发中心 Network configured method and system of embedded device
CN102710439A (en) * 2012-05-29 2012-10-03 南京邮电大学 Obtaining method of user terminal parameter information
CN104506567A (en) * 2014-11-19 2015-04-08 北京天地互连信息技术有限公司 Data exchange method for gateway and server of Internet of things
US20190149402A1 (en) * 2017-11-10 2019-05-16 International Business Machines Corporation Accessing gateway management console

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
企鹅号-冰尘无极: "物联网网关协议选择:HTTP VS MQTT", 《HTTPS://CLOUD.TENCENT.COM/DEVELOPER/NEWS/110954》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020238523A1 (en) * 2019-05-24 2020-12-03 深圳云里物里科技股份有限公司 Gateway configuration method, system, computer storage medium and electronic device
CN111736877A (en) * 2020-03-31 2020-10-02 紫光云技术有限公司 Method for upgrading Agent of cloud database
CN114422481A (en) * 2021-12-13 2022-04-29 科华数据股份有限公司 Network equipment management method and related device
CN114422481B (en) * 2021-12-13 2024-03-15 科华数据股份有限公司 Network equipment management method and related device
CN116760706A (en) * 2023-07-07 2023-09-15 中国电信股份有限公司技术创新中心 Configuration file update methods, devices, equipment, storage media and products
CN116723174A (en) * 2023-07-21 2023-09-08 中瑞恒(北京)科技有限公司 A dynamic IP modification method and system based on intelligent gateway
CN118804017A (en) * 2023-11-13 2024-10-18 中移(杭州)信息技术有限公司 Indoor connection situation analysis method, device, equipment and storage medium
CN119892635A (en) * 2024-12-06 2025-04-25 天翼云科技有限公司 Gateway configuration re-pushing method, device, equipment and medium

Also Published As

Publication number Publication date
WO2020238523A1 (en) 2020-12-03

Similar Documents

Publication Publication Date Title
CN110113218A (en) A kind of gateway configuration method, system, computer storage medium and electronic equipment
CN103248525A (en) Method and device of configuring network resources
CN102067517A (en) System and method for identifying and calling a function of a service
CN103188107A (en) Automatic finding and configured deployment system and method of terminal devices
CN113678406B (en) Multi-fabric deployment and management platform
CN110138579B (en) Configuration method of user side equipment and related device
CN103929746A (en) Internet-surfing configuration method for equipment of Internet of things, equipment of Internet of things and user equipment
CN108401037A (en) User terminal and the binding method of equipment, device and system
CN116132294B (en) A method, device, equipment and storage medium for configuring business network requirements
CN106713039A (en) Method and device for identifying Ethernet ports and router
CN115942331A (en) Method and system for network distribution of Matter equipment
CN107294755A (en) Binding method, the apparatus and system of user profile and equipment
US10666812B2 (en) Charging control apparatus, method, and system
CN113904939B (en) A method, device and storage medium for managing target terminals
CN108897581A (en) A kind of service arrangement method, apparatus and electronic equipment
CN114785534B (en) Communication method and device
CN114268656B (en) Communication protocol conversion method, device, equipment and system and storage medium
CN105578498B (en) A kind of method and apparatus of terminal network management
CN106326646A (en) Equipment configuration method and device
CN117580037A (en) Method and device for realizing secondary authentication of 5G CPE down-hanging terminal
CN110650071B (en) Access management method and device of user equipment and management server
CN118301787B (en) 5GLAN adaptive networking method, device, terminal equipment and storage medium
CN107241412B (en) Method and system for storing MAC address of wireless access equipment
CN102045702B (en) Method and device for configuring terminal
TWI496440B (en) Cable modem and method of selecting communication protocols thereof

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190809