CN111917575B - Gateway offline configuration method, system, terminal equipment and storage medium - Google Patents

Gateway offline configuration method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN111917575B
CN111917575B CN202010712848.2A CN202010712848A CN111917575B CN 111917575 B CN111917575 B CN 111917575B CN 202010712848 A CN202010712848 A CN 202010712848A CN 111917575 B CN111917575 B CN 111917575B
Authority
CN
China
Prior art keywords
configuration
gateway
script
information
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010712848.2A
Other languages
Chinese (zh)
Other versions
CN111917575A (en
Inventor
林英想
庄严
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Minew Technologies Co ltd
Original Assignee
Shenzhen Minew Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Minew Technologies Co ltd filed Critical Shenzhen Minew Technologies Co ltd
Priority to CN202010712848.2A priority Critical patent/CN111917575B/en
Publication of CN111917575A publication Critical patent/CN111917575A/en
Application granted granted Critical
Publication of CN111917575B publication Critical patent/CN111917575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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/0866Checking the configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Abstract

The application provides a gateway offline configuration method, a gateway offline configuration system, terminal equipment and a storage medium, wherein the method comprises the following steps: if a gateway configuration instruction is received, inquiring a network connection state between the gateway configuration instruction and a configuration server; if the network connection state with the configuration server is an offline state, inquiring a shared database of the configuration server, and establishing data communication with the shared database; performing script query on the shared database to obtain a configuration script, and performing data verification on the configuration script; if the data of the configuration script is checked to be qualified, decompressing the configuration script to obtain gateway configuration information, and configuring the gateway according to the gateway configuration information. According to the method and the device, the shared database of the configuration server is queried, so that after data communication is established with the shared database, query of the configuration script can be realized, and the configuration script is decompressed to obtain gateway configuration information, so that when the gateway and the configuration server are in an offline state, gateway configuration can still be carried out, and the gateway configuration efficiency is improved.

Description

Gateway offline configuration method, system, terminal equipment and storage medium
Technical Field
The application belongs to the technical field of database management, and particularly relates to a gateway offline configuration method, a gateway offline configuration system, terminal equipment and a storage medium.
Background
A Gateway (Gateway), also known as an intersystem connector, a protocol converter, is a computer system or device that provides data conversion services between multiple networks. A gateway can be said to be a connector between different networks, i.e. a device that "negotiates" when data is to be transferred from one network to another. The configuration of the gateway is performed by configuring network parameters and network protocols so as to ensure the data conversion function of the gateway among a plurality of networks, so that the configuration problem of the gateway is more and more emphasized for improving the stability of data conversion among a plurality of networks.
In the existing gateway configuration process, after the gateway to be configured needs to be connected with the configuration server through a network, gateway configuration information is acquired through a network transmission mode, parameter configuration of the gateway is carried out based on the acquired gateway configuration information, when the gateway to be configured and the configuration server are in an offline state, the gateway configuration information cannot be acquired, and further parameter configuration of the gateway cannot be carried out, so that the gateway configuration efficiency is reduced.
Disclosure of Invention
The embodiment of the application provides a gateway offline configuration method, a gateway offline configuration system, terminal equipment and a storage medium, and aims to solve the problem that parameter configuration of a gateway cannot be performed when a gateway to be configured and a configuration server are in an offline state in the existing gateway configuration process.
In a first aspect, an embodiment of the present application provides a gateway offline configuration method, which is applied to any gateway, and the method includes:
if a gateway configuration instruction is received, inquiring a network connection state between the gateway configuration instruction and a configuration server;
if the network connection state with the configuration server is an offline state, querying a shared database of the configuration server, and establishing data communication with the shared database, wherein shared data of the configuration server are stored in the shared database, and the shared data comprise configuration scripts corresponding to different gateways;
script inquiry is carried out on the shared database according to the configuration identification in the gateway configuration instruction to obtain a configuration script, and data verification is carried out on the configuration script;
and if the data of the configuration script is checked to be qualified, decompressing the configuration script to obtain gateway configuration information, and configuring the gateway according to the gateway configuration information.
Compared with the prior art, the embodiment of the application has the beneficial effects that: if the network connection state with the configuration server is an offline state, the shared database of the configuration server is queried, shared data of the configuration server is stored in the shared database, the shared data comprises configuration scripts corresponding to different gateways, so that the query of the configuration scripts of the corresponding gateways can be realized after the data communication is established with the shared database, the configuration scripts are decompressed, the corresponding gateway configuration information can be effectively obtained, the gateway configuration is carried out based on the obtained gateway configuration information, and the gateway configuration can still be carried out when the gateway and the configuration server are in the offline state, and the gateway configuration efficiency is improved.
Further, the querying the shared database of the configuration server and establishing data communication with the shared database includes:
obtaining a server identifier of the configuration server, and matching the server identifier with a database list to obtain the shared database, wherein the database list stores corresponding relations between different configuration servers and corresponding shared databases;
Acquiring a database address of the shared database, and sending a database access request to the database address according to a local gateway identifier;
and if a confirmation instruction aiming at the database access request is received, establishing data communication with the shared database.
Further, the configuring the gateway according to the gateway configuration information includes:
detecting whether a designated character exists in the character string of the gateway configuration information;
if the appointed character exists in the character string of the gateway configuration information, replacing the appointed character in the gateway configuration information according to the local gateway information, and carrying out gateway configuration according to the replaced character string in the gateway configuration information.
Further, the replacing the designated character in the gateway configuration information according to local gateway information includes:
inquiring a parameter type corresponding to the appointed character, and inquiring the local gateway information according to the parameter type to obtain a difference configuration parameter, wherein the parameter type comprises a gateway MAC address, a Wifi access parameter or a broadband access protocol parameter;
and converting the difference configuration parameters into difference characters, and replacing the designated characters according to the difference characters.
Further, after decompressing the configuration script, the method further includes:
if the configuration script is decompressed to obtain a log collection instruction, collecting local log information, and sending a network connection request to the configuration server, wherein the local log information comprises a gateway software log, a gateway hardware log or a gateway fault log;
and if the network connection with the configuration server is successful, the local gateway identification and the local log information are sent to the configuration server.
Further, after the network connection request is sent to the configuration server, the method further includes:
and if the network connection with the configuration server fails, encrypting the local log information, and sending the encrypted local log information and the local gateway identification to the shared database.
Further, the data verification on the configuration script includes:
obtaining a check value in the configuration script, and calculating the check value according to a preset check algorithm to obtain an output key;
if the output key is equal to the preset key, the data verification of the configuration script is successful;
If the output key is not equal to the preset key, the data verification of the configuration script is unsuccessful, and the configuration script is deleted.
In a second aspect, an embodiment of the present application provides a gateway offline configuration system, applied to any gateway, including:
the network connection inquiry module is used for inquiring the network connection state between the network connection inquiry module and the configuration server if a gateway configuration instruction is received;
the shared database query module is used for querying a shared database of the configuration server and establishing data communication with the shared database if the network connection state between the shared database and the configuration server is an offline state, wherein the shared database stores shared data of the configuration server, and the shared data comprises configuration scripts corresponding to different gateways;
the script inquiry module is used for carrying out script inquiry on the shared database according to the configuration identifier in the gateway configuration instruction to obtain a configuration script, and carrying out data verification on the configuration script;
and the gateway configuration module is used for decompressing the configuration script to obtain gateway configuration information if the data of the configuration script is checked to be qualified, and carrying out gateway configuration according to the gateway configuration information.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a method as described above when executing the computer program.
In a fourth aspect, embodiments of the present application provide a storage medium storing a computer program that when executed by a processor implements a method as described above.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a terminal device, causes the terminal device to perform the gateway offline configuration method according to any one of the first aspects above.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a gateway offline configuration method provided in a first embodiment of the present application;
Fig. 2 is a flowchart of a gateway offline configuration method according to a second embodiment of the present application;
fig. 3 is a flowchart of a gateway offline configuration method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a gateway offline configuration system according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to a fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Example 1
Referring to fig. 1, a flowchart of a gateway offline configuration method according to a first embodiment of the present application is provided, where the gateway offline configuration method is applied to any gateway, and includes the steps of:
step S10, if a gateway configuration instruction is received, the network connection state between the gateway configuration instruction and the configuration server is inquired.
The gateway configuration instruction may be transmitted in a voice instruction, a touch instruction or a wireless signal instruction, and when the gateway receives the gateway configuration instruction, a query for a network connection state with the configuration server is triggered.
In the step, the gateway queries the network connection state between the gateway and the configuration server by sending a configuration information allocation request to the configuration server, where the configuration information allocation request is used to obtain the gateway configuration information corresponding to the gateway in the configuration server.
Specifically, if a response to the configuration information allocation request is not received within a preset time, it is determined that the network connection state between the gateway and the configuration server is in an offline state, that is, the gateway cannot acquire the corresponding gateway configuration information on the configuration server.
If the response to the configuration information distribution request is received within the preset time, the configuration information stored in the response to the configuration information distribution request is directly acquired to perform gateway configuration.
Step S20, if the network connection state with the configuration server is an offline state, querying a shared database of the configuration server, and establishing data communication with the shared database.
The shared database stores shared data of the configuration server, the shared data comprises configuration scripts corresponding to different gateways, the configuration scripts are generated by corresponding gateway configuration information, the gateway configuration information corresponding to the different gateways can be the same or different, namely, the configuration scripts corresponding to the different gateways can be the same or different.
Optionally, the network communication addresses between the shared database and the configuration server are different, in the use process of the configuration server, the configuration scripts are generated by gateway configuration information corresponding to different gateways, the configuration scripts are stored in the shared database, and data which can be shared for all users are stored in the shared database, but in order to ensure the privacy of the gateway configuration information, encryption can be performed when the configuration scripts are generated, so that the encrypted configuration scripts are stored in the shared database.
In the step, because the shared data of the configuration server is stored in the shared database, the shared data comprises configuration scripts corresponding to different gateways, so that the configuration scripts of the corresponding gateways can be inquired after the gateways establish data communication with the shared database.
And step S30, carrying out script inquiry on the shared database according to the configuration identifier in the gateway configuration instruction to obtain a configuration script, and carrying out data verification on the configuration script.
The configuration allocation table is stored in the shared database, and corresponding relations between different configuration identifications and corresponding configuration scripts are stored in the configuration allocation table, so that a script inquiry instruction is generated according to the configuration identifications in the gateway configuration instruction, the script inquiry instruction is sent to the shared database, the shared database performs script inquiry based on the configuration identifications in the gateway configuration instruction, and the inquired configuration scripts are sent to the gateway, so that the gateway receives the configuration scripts corresponding to the configuration identifications in the gateway configuration instruction.
In the step, the gateway performs data verification on the received configuration script, so as to further judge whether the configuration script is a configuration script corresponding to the configuration identifier in the gateway configuration instruction, thereby improving the accuracy of gateway configuration.
Optionally, the configuration script stores configuration identifiers corresponding to the gateway configuration information, and the configuration identifiers in the configuration script are compared with the configuration identifiers in the gateway configuration instructions to judge whether the data verification of the configuration script is qualified.
Optionally, in this step, the performing data verification on the configuration script includes:
obtaining a check value in the configuration script, and calculating the check value according to a preset check algorithm to obtain an output key;
if the output key is equal to the preset key, the data verification of the configuration script is successful;
if the output key is not equal to the preset key, the data verification of the configuration script is unsuccessful, and the configuration script is deleted.
And step S40, if the data of the configuration script is checked to be qualified, decompressing the configuration script to obtain gateway configuration information, and configuring the gateway according to the gateway configuration information.
And if the configuration script is successfully decompressed, judging that the configuration script is the same as the configuration script corresponding to the configuration identifier in the gateway configuration instruction, and carrying out gateway configuration on the gateway according to the gateway configuration information obtained by decompression.
Optionally, in the step, if the decompression of the configuration script is wrong, it is determined that the configuration script is different from the configuration script corresponding to the configuration identifier in the gateway configuration instruction, that is, the gateway configuration information in the configuration script is not the configuration information for the gateway, and the script query error prompt is sent by sending the script query error prompt for the configuration identifier in the gateway configuration instruction, so as to prompt the user to manually query the configuration script.
Optionally, in this step, after decompressing the configuration script, the method further includes:
if the configuration script is decompressed to obtain a log collection instruction, collecting local log information and sending a network connection request to the configuration server, wherein the local log information comprises a gateway software log, a gateway hardware log or a gateway fault log;
if the network connection with the configuration server is successful, the local gateway identification and the local log information are sent to the configuration server, so that the configuration server is effectively convenient for collecting and inquiring the log information in the gateway.
Optionally, in this embodiment, after sending the network connection request to the configuration server, the method further includes:
if the network connection with the configuration server fails, encrypting the local log information, and sending the encrypted local log information and the local gateway identifier to the shared database, wherein the local log information is encrypted, so that leakage of private information in the local log information is effectively prevented, the security of log information transmission is improved, and it is required to say that decryption passwords aiming at different gateways are stored in the configuration server, and the decryption passwords are used for decrypting the corresponding encrypted local log information, thereby guaranteeing the collection of the local log information by the configuration server.
Optionally, in this embodiment, if the data verification of the configuration script is not qualified, it is determined that the configuration script received by the gateway is different from the configuration script corresponding to the configuration identifier in the gateway configuration instruction, then script query is performed on the shared database again according to the configuration identifier in the gateway configuration instruction, and it is determined whether the re-queried configuration script is identical to the first queried configuration script, if the re-queried configuration script is identical to the first queried configuration script, it is determined that the configuration script corresponding to the configuration identifier in the gateway configuration instruction stores an error in the shared database, and a script query error prompt is sent for the configuration identifier in the gateway configuration instruction, so as to prompt a user to manually query the configuration script.
In this embodiment, if the network connection state with the configuration server is an offline state, a shared database of the configuration server is queried, shared data of the configuration server is stored in the shared database, the shared data includes configuration scripts corresponding to different gateways, so that after data communication is established with the shared database, the query of the configuration scripts of the corresponding gateways can be implemented, and by decompressing the configuration scripts, corresponding gateway configuration information can be effectively obtained, and gateway configuration can be performed based on the obtained gateway configuration information, so that when the gateway and the configuration server are in the offline state, gateway configuration can still be performed, and the gateway configuration efficiency is improved.
Example two
Referring to fig. 2, a flowchart of a gateway offline configuration method according to a second embodiment of the present application is provided, where the second embodiment is used for refining step S20 in the first embodiment to refine a step of describing how to query a shared database of the configuration server and establish data communication with the shared database, and the method includes the steps of:
step S21, obtaining the server identification of the configuration server, and matching the server identification with a database list to obtain the shared database.
The database list stores the corresponding relations between different configuration servers and corresponding shared databases, so that the shared databases corresponding to the configuration servers in an off-line state between the gateways can be effectively obtained by matching the server identifiers with the database list.
Optionally, in this step, if the server identifier is not successfully matched with the database list, a default database preset in the gateway is obtained, where the default database is used to provide preset default data information when a shared database corresponding to a configuration server in an offline state between gateways is not queried.
Step S22, a database address of the shared database is obtained, and a database access request is sent to the database address according to the local gateway identification.
And sending a database access request to a database address according to the local gateway identification to request to connect the shared database corresponding to the database address, wherein the database access request can be a wired network connection request, a Bluetooth connection request, a Zibee (Zibee) connection request or the like.
Optionally, in this step, if the server identifier is not successfully matched with the database list, a database address of the default database is obtained, and a database access request is sent to the database address of the default database according to the local gateway identifier, so as to request to connect to the default database.
Step S23, if a confirmation instruction for the database access request is received, data communication is established with the shared database.
If a confirmation instruction aiming at the database access request is received, the gateway is judged to have the access authority of the shared database, so that the gateway can effectively establish data communication with the shared database, and the inquiry of a subsequent configuration script is ensured.
In this embodiment, by obtaining the server identifier of the configuration server and matching the server identifier with the database list, a shared database corresponding to the configuration server in an offline state between gateways can be effectively obtained, by obtaining the database address of the shared database and sending a design of a database access request to the database address according to the local gateway identifier, whether the gateway has the access right of the shared database is detected, and when a confirmation instruction for the database access request is received, data communication is established with the shared database, so that the inquiry of a subsequent configuration script is ensured, and the accuracy of offline configuration of the gateway is improved.
Example III
Referring to fig. 3, a flowchart of a gateway offline configuration method according to a third embodiment of the present application is provided, where the third embodiment is used for refining step S40 in the first embodiment to refine the steps describing how to perform gateway configuration according to the gateway configuration information, and the steps include:
step S41, detecting whether a designated character exists in the character string of the gateway configuration information.
The designated character may be set according to the requirement, for example, the designated character may be set as a character "XXX", and when the character "XXX" is detected in the character string of the gateway configuration information, it is determined that the designated character exists in the character string of the gateway configuration information.
In this step, the designated character ensures the difference of gateway configuration parameters when the same gateway configuration information configures different gateways, and because parameter conflicts will be caused if the configuration parameters configured by the same gateway configuration information in different gateways are the same, by setting the designated character, the difference of gateway configuration parameters when the same gateway configuration parameters configure different gateways can be understood, and meanwhile, the difference of gateway configuration parameters when the same configuration script configures different gateways can be prevented.
Step S42, if the specified character does not exist in the character string of the gateway configuration information, the gateway configuration is directly carried out according to the character string of the gateway configuration information.
If the designated character does not exist in the character string of the gateway configuration information, it is determined that the gateway configuration information is configured for only one gateway, and the gateway configuration parameters do not need to be differently set for different gateways, and the gateway configuration is directly performed according to the character string of the gateway configuration information, so as to complete the offline configuration step of the gateway.
Step S43, if the appointed character exists in the character string of the gateway configuration information, replacing the appointed character in the gateway configuration information according to the local gateway information.
The local gateway information of each gateway stores different configuration parameters corresponding to different designated characters, and the corresponding designated characters can be replaced according to the different configuration parameters to complete information correction of the gateway configuration information.
Optionally, in this step, the replacing the designated character in the gateway configuration information according to local gateway information includes:
Inquiring a parameter type corresponding to the appointed character, and inquiring the local gateway information according to the parameter type to obtain a difference configuration parameter, wherein the parameter type comprises a gateway MAC address, a Wifi access parameter or a broadband access protocol parameter;
converting the difference configuration parameters into difference characters, and replacing the appointed characters according to the difference characters;
for example, the parameter type MAC address (Media Access Control Address) corresponding to the specified character replaces the specified character with the MAC address corresponding to the gateway in the differential configuration parameter, thereby ensuring the accuracy of the gateway configuration information.
And S44, carrying out gateway configuration according to the character string replaced in the gateway configuration information.
In this embodiment, whether the designated character is designed in the character string of the gateway configuration information is detected to determine whether the gateway configuration information is differently set for the gateway configuration parameters, that is, whether the gateway configuration information is the configuration information set for a plurality of different networks is determined, if the designated character is in the character string of the gateway configuration information, the designated character in the gateway configuration information is replaced according to the local gateway information, so that the gateway configuration information is effectively modified, and the parameter conflict phenomenon caused by identical configuration parameters of the same gateway configuration information in different gateways is prevented, thereby improving the accuracy of off-line configuration of the gateway.
Example IV
Corresponding to the gateway offline configuration method described in the above embodiments, fig. 4 shows a schematic structural diagram of the gateway offline configuration system 100 provided in the fourth embodiment of the present application, and for convenience of explanation, only the portions relevant to the embodiments of the present application are shown.
Referring to fig. 4, the system is applied to any gateway, including: a network connection query module 10, a shared database query module 11, a script query module 12, and a gateway configuration module 13, wherein:
and the network connection inquiry module 10 is used for inquiring the network connection state between the network connection inquiry module and the configuration server if the gateway configuration instruction is received.
And the shared database query module 11 is configured to query a shared database of the configuration server and establish data communication with the shared database if the network connection state with the configuration server is an offline state, where shared data of the configuration server is stored in the shared database, and the shared data includes configuration scripts corresponding to different gateways.
Wherein, the shared database query module 11 is further configured to: obtaining a server identifier of the configuration server, and matching the server identifier with a database list to obtain the shared database, wherein the database list stores corresponding relations between different configuration servers and corresponding shared databases;
Acquiring a database address of the shared database, and sending a database access request to the database address according to a local gateway identifier;
and if a confirmation instruction aiming at the database access request is received, establishing data communication with the shared database.
And the script query module 12 is used for performing script query on the shared database according to the configuration identifier in the gateway configuration instruction to obtain a configuration script, and performing data verification on the configuration script.
Wherein, the script inquiry module 12 is further used for: obtaining a check value in the configuration script, and calculating the check value according to a preset check algorithm to obtain an output key;
if the output key is equal to the preset key, the data verification of the configuration script is successful;
if the output key is not equal to the preset key, the data verification of the configuration script is unsuccessful, and the configuration script is deleted.
And the gateway configuration module 13 is configured to decompress the configuration script to obtain gateway configuration information if the data of the configuration script is checked to be qualified, and perform gateway configuration according to the gateway configuration information.
Wherein, the gateway configuration module 13 is further configured to: detecting whether a designated character exists in the character string of the gateway configuration information;
If the appointed character exists in the character string of the gateway configuration information, replacing the appointed character in the gateway configuration information according to the local gateway information, and carrying out gateway configuration according to the replaced character string in the gateway configuration information.
Optionally, the gateway configuration module 13 is further configured to: inquiring a parameter type corresponding to the appointed character, and inquiring the local gateway information according to the parameter type to obtain a difference configuration parameter, wherein the parameter type comprises a gateway MAC address, a Wifi access parameter or a broadband access protocol parameter;
and converting the difference configuration parameters into difference characters, and replacing the designated characters according to the difference characters.
Optionally, the gateway configuration system 100 further includes:
the log collecting module 14 is configured to collect local log information if the configuration script is decompressed to obtain a log collecting instruction, and send a network connection request to the configuration server, where the local log information includes a gateway software log, a gateway hardware log, or a gateway fault log;
and if the network connection with the configuration server is successful, the local gateway identification and the local log information are sent to the configuration server.
Optionally, the log collection module 14 is further configured to: and if the network connection with the configuration server fails, encrypting the local log information, and sending the encrypted local log information and the local gateway identification to the shared database.
In this embodiment, if the network connection state with the configuration server is an offline state, a shared database of the configuration server is queried, shared data of the configuration server is stored in the shared database, the shared data includes configuration scripts corresponding to different gateways, so that after data communication is established with the shared database, the query of the configuration scripts of the corresponding gateways can be implemented, and by decompressing the configuration scripts, corresponding gateway configuration information can be effectively obtained, and gateway configuration can be performed based on the obtained gateway configuration information, so that when the gateway and the configuration server are in the offline state, gateway configuration can still be performed, and the gateway configuration efficiency is improved.
It should be noted that, because the content of information interaction and execution process between the above devices/modules is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
Fig. 5 is a schematic structural diagram of a terminal device 2 according to a fifth embodiment of the present application. As shown in fig. 5, the terminal device 2 of this embodiment includes: at least one processor 20 (only one processor is shown in fig. 5), a memory 21 and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, the processor 20 implementing the steps in any of the various method embodiments described above when executing the computer program 22.
The terminal device 2 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 20, a memory 21. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the terminal device 2 and does not constitute a limitation of the terminal device 2, and may include more or less components than illustrated, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), and the processor 20 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may in some embodiments be an internal storage unit of the terminal device 2, such as a hard disk or a memory of the terminal device 2. The memory 21 may in other embodiments also be an external storage device of the terminal device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal device 2. The memory 21 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 21 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. A gateway offline configuration method applied to any gateway, the method comprising:
if a gateway configuration instruction is received, inquiring a network connection state between the gateway configuration instruction and a configuration server;
If the network connection state with the configuration server is an offline state, querying a shared database of the configuration server, and establishing data communication with the shared database, wherein shared data of the configuration server are stored in the shared database, and the shared data comprise configuration scripts corresponding to different gateways;
script inquiry is carried out on the shared database according to the configuration identification in the gateway configuration instruction to obtain a configuration script, and data verification is carried out on the configuration script;
if the data of the configuration script is checked to be qualified, decompressing the configuration script to obtain gateway configuration information, and configuring a gateway according to the gateway configuration information;
the gateway configuration according to the gateway configuration information comprises:
detecting whether a designated character exists in the character string of the gateway configuration information;
if the appointed character exists in the character string of the gateway configuration information, replacing the appointed character in the gateway configuration information according to the local gateway information, and carrying out gateway configuration according to the replaced character string in the gateway configuration information.
2. The gateway offline configuration method of claim 1, wherein said querying and establishing data communication with a shared database of said configuration server comprises:
Obtaining a server identifier of the configuration server, and matching the server identifier with a database list to obtain the shared database, wherein the database list stores corresponding relations between different configuration servers and corresponding shared databases;
acquiring a database address of the shared database, and sending a database access request to the database address according to a local gateway identifier;
and if a confirmation instruction aiming at the database access request is received, establishing data communication with the shared database.
3. The gateway offline configuration method of claim 1, wherein said replacing the designated character in the gateway configuration information according to local gateway information comprises:
inquiring a parameter type corresponding to the appointed character, and inquiring the local gateway information according to the parameter type to obtain a difference configuration parameter, wherein the parameter type comprises a gateway MAC address, a Wifi access parameter or a broadband access protocol parameter;
and converting the difference configuration parameters into difference characters, and replacing the designated characters according to the difference characters.
4. The gateway offline configuration method of claim 1, wherein after decompressing the configuration script, further comprising:
If the configuration script is decompressed to obtain a log collection instruction, collecting local log information, and sending a network connection request to the configuration server, wherein the local log information comprises a gateway software log, a gateway hardware log or a gateway fault log;
and if the network connection with the configuration server is successful, the local gateway identification and the local log information are sent to the configuration server.
5. The gateway offline configuration method of claim 4, wherein after said sending a network connection request to said configuration server, further comprising:
and if the network connection with the configuration server fails, encrypting the local log information, and sending the encrypted local log information and the local gateway identification to the shared database.
6. The gateway offline configuration method of claim 1, wherein the performing data verification on the configuration script comprises:
obtaining a check value in the configuration script, and calculating the check value according to a preset check algorithm to obtain an output key;
if the output key is equal to the preset key, the data verification of the configuration script is successful;
If the output key is not equal to the preset key, the data verification of the configuration script is unsuccessful, and the configuration script is deleted.
7. A gateway offline configuration system, applied to any gateway, comprising:
the network connection inquiry module is used for inquiring the network connection state between the network connection inquiry module and the configuration server if a gateway configuration instruction is received;
the shared database query module is used for querying a shared database of the configuration server and establishing data communication with the shared database if the network connection state between the shared database and the configuration server is an offline state, wherein the shared database stores shared data of the configuration server, and the shared data comprises configuration scripts corresponding to different gateways;
the script inquiry module is used for carrying out script inquiry on the shared database according to the configuration identifier in the gateway configuration instruction to obtain a configuration script, and carrying out data verification on the configuration script;
the gateway configuration module is used for decompressing the configuration script to obtain gateway configuration information if the data of the configuration script is checked to be qualified, and carrying out gateway configuration according to the gateway configuration information;
The gateway configuration module is further configured to:
detecting whether a designated character exists in the character string of the gateway configuration information;
if the appointed character exists in the character string of the gateway configuration information, replacing the appointed character in the gateway configuration information according to the local gateway information, and carrying out gateway configuration according to the replaced character string in the gateway configuration information.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
9. A storage medium storing a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
CN202010712848.2A 2020-07-22 2020-07-22 Gateway offline configuration method, system, terminal equipment and storage medium Active CN111917575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010712848.2A CN111917575B (en) 2020-07-22 2020-07-22 Gateway offline configuration method, system, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010712848.2A CN111917575B (en) 2020-07-22 2020-07-22 Gateway offline configuration method, system, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111917575A CN111917575A (en) 2020-11-10
CN111917575B true CN111917575B (en) 2023-07-11

Family

ID=73281117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010712848.2A Active CN111917575B (en) 2020-07-22 2020-07-22 Gateway offline configuration method, system, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111917575B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594635A (en) * 2012-02-15 2012-07-18 中国联合网络通信集团有限公司 Home-gateway-based terminal access method and system, and home gateway
WO2014176832A1 (en) * 2013-04-28 2014-11-06 烽火通信科技股份有限公司 System and method for intelligent terminal to manage home gateway
CN105446305A (en) * 2015-12-30 2016-03-30 深圳众乐智府科技有限公司 Intelligent household gateway network configuration method and intelligent household system
CN106789279A (en) * 2016-12-26 2017-05-31 新奥科技发展有限公司 A kind of control method of gateway, the control method and device of remote control terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594635A (en) * 2012-02-15 2012-07-18 中国联合网络通信集团有限公司 Home-gateway-based terminal access method and system, and home gateway
WO2014176832A1 (en) * 2013-04-28 2014-11-06 烽火通信科技股份有限公司 System and method for intelligent terminal to manage home gateway
CN105446305A (en) * 2015-12-30 2016-03-30 深圳众乐智府科技有限公司 Intelligent household gateway network configuration method and intelligent household system
CN106789279A (en) * 2016-12-26 2017-05-31 新奥科技发展有限公司 A kind of control method of gateway, the control method and device of remote control terminal

Also Published As

Publication number Publication date
CN111917575A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN109309657B (en) Unauthorized access point detection system and method, user terminal used for same, and computer program
CN110856126B (en) Information reporting and receiving method, terminal equipment and storage medium
US20070066280A1 (en) Connection management system, method and program
CN111526159B (en) Method and device for establishing data connection, terminal equipment and storage medium
CN111510326B (en) Master-slave device configuration information synchronization method, system, terminal device and storage medium
CN109246078B (en) Data interaction method and server
CN108429739B (en) Method, system and terminal equipment for identifying honeypots
WO2023000967A1 (en) Device management method, system and apparatus
CN111756716A (en) Flow detection method and device and computer readable storage medium
CN112272169B (en) User identity determining method and device
CN112819454B (en) Payment method, gateway device, server and storage medium
CN112738019B (en) Method and device for displaying device information, storage medium and electronic device
CN106685914B (en) Information verification method, server and client
CN111917575B (en) Gateway offline configuration method, system, terminal equipment and storage medium
CN112398786B (en) Method and device for identifying penetration attack, system, storage medium and electronic device
CN107172082B (en) File sharing method and system
CN112395586A (en) File access control method, device, system, storage medium and electronic device
CN114285890B (en) Cloud platform connection method, device, equipment and storage medium
CN114125812A (en) Data synchronization method, device, server and storage medium
CN113055254B (en) Address configuration method, device, access server and storage medium
CN114338630A (en) Domain name access method, device, electronic equipment, storage medium and program product
CN114501441A (en) User authentication method and device
CN112492598A (en) WIFI network setting method and system, mobile terminal and storage medium
CN111459899A (en) Log sharing method and device and terminal equipment
CN113360868A (en) Application program login method and device, computer equipment and storage 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
GR01 Patent grant