CN106713004B - Router adaptation method and system - Google Patents

Router adaptation method and system Download PDF

Info

Publication number
CN106713004B
CN106713004B CN201610545957.3A CN201610545957A CN106713004B CN 106713004 B CN106713004 B CN 106713004B CN 201610545957 A CN201610545957 A CN 201610545957A CN 106713004 B CN106713004 B CN 106713004B
Authority
CN
China
Prior art keywords
adaptation
template
router
identification information
routers
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
CN201610545957.3A
Other languages
Chinese (zh)
Other versions
CN106713004A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610545957.3A priority Critical patent/CN106713004B/en
Publication of CN106713004A publication Critical patent/CN106713004A/en
Application granted granted Critical
Publication of CN106713004B publication Critical patent/CN106713004B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • 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/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play

Abstract

The invention discloses a router adaptation method, which comprises the following steps: acquiring identification information of a router to be adapted; the identification information includes model information; generating an adaptive template of the router; acquiring an adaptive template corresponding to the identification information according to the identification information; the adaptation template is an execution script common to routers of different models; and adapting the router to be adapted according to the adaptation template. As the execution script common to the routers of different models is obtained as the adaptation template, batch adaptation to the routers of different models can be realized through the adaptation template. The router adaptation mode based on the adaptation template can complete the compatibility and adaptation of most router models by only using less template development, thereby greatly improving the development efficiency, saving the development cost and shortening the development period.

Description

Router adaptation method and system
Technical Field
The invention relates to the technical field of internet, in particular to a router adaptation method and a router adaptation system.
Background
Many technical solutions exist in the field of routing management solutions, a typical technical solution is, for example, 360-degree-of-charge WiFi, and a routing management implementation manner of the routing management solution adapts a single router one by one in a manner of adapting to a single model, so that currently, supported brands and models are few, development cost and equipment cost for adding an adapted model are high, and a development cycle is long.
The mobile phone platform APP capable of realizing the routing management function has the following two types: the first category only fits the router device model under this brand. It is not possible to adapt to other brands of routing equipment models. The second category may implement cross-brand router adaptation support, but only compatibly adapt a small number of models under a small number of brands, and the implementation is to adapt one by one in a single model adaptation manner.
The technical scheme of adopting a model-by-model adaptation mode is shown in fig. 1, and comprises the following steps:
starting a single model adaptation router management function;
acquiring an execution script of relevant operations of the router management function page under the model;
packaging the execution script to the terminal equipment for execution;
a user triggers and executes a relevant script by using a router management function at a terminal device;
executing the script to control the router equipment to complete the operation of the router;
the terminal equipment realizes the routing management function.
Obviously, the technical scheme of adopting a model-by-model adaptation mode has high development cost and equipment cost and long development period.
Disclosure of Invention
In order to solve the technical problem, the invention provides a router adaptation method and a system, which can acquire the common execution script of routers of different models as an adaptation template, and can realize batch adaptation of routers of different models through the adaptation template.
The invention is realized by the following steps:
a router adaptation method, comprising:
acquiring identification information of a router to be adapted; the identification information includes model information;
generating an adaptive template of the router;
acquiring an adaptive template corresponding to the identification information according to the identification information;
adapting the router to be adapted according to the adaptation template;
the generating of the adaptive template of the router comprises:
acquiring adaptation scripts of a plurality of routers of different models;
acquiring a common execution script of routers of different types according to the adaptation script;
and generating a common adaptation template of the routers of different models according to the common execution script.
The invention also provides a router adaptation system, comprising:
the identification information acquisition module is used for acquiring the identification information of the router to be adapted; the identification information includes model information;
the adaptive template generating module is used for generating an adaptive template of the router;
the adaptive template generation module comprises:
the multi-script acquisition unit is used for acquiring the adaptation scripts of a plurality of routers with different models;
the common script obtaining unit is used for obtaining common execution scripts of routers of different types according to the adaptive scripts;
the adaptation template generating unit is used for generating the common adaptation templates of the routers with different models according to the common execution script;
the adaptive template acquisition module is used for acquiring an adaptive template corresponding to the identification information according to the identification information;
and the adaptation module is used for adapting the router to be adapted according to the adaptation template.
The implementation of the invention has the following beneficial effects:
the method of the invention obtains the identification information of the router to be adapted; the identification information includes model information; generating an adaptive template of the router; then obtaining an adaptive template corresponding to the identification information according to the identification information; the adaptation template is an execution script common to routers of different models; and finally, adapting the router to be adapted according to the adaptation template. The invention provides a terminal solution compatible with different brands of router models, and due to the fact that the execution script common to the routers of different models is obtained as the adaptation template, batch adaptation of the routers of different models can be achieved through the adaptation template. Compared with the adaptation mode according to the model of other similar products, the adaptation mode of the router based on the adaptation template can complete the compatibility and adaptation of most router models by only using less template development, thereby greatly improving the development efficiency, saving the development cost and shortening the development period.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flow chart of an adaptation method of a router in the prior art;
fig. 2 is a block diagram of a hardware structure of a computer terminal of a router adaptation method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a router adaptation method according to an embodiment of the invention;
FIG. 4 is a flowchart of the steps of generating an adaptation template for a router, according to an embodiment of the invention;
FIG. 5 is a flowchart of steps for obtaining an execution script common to routers of different models, according to embodiment 2 of the present invention;
fig. 6 is a schematic diagram of a router adaptation system provided according to embodiment 2 of the present invention;
fig. 7 is a schematic diagram of a common script acquisition unit provided according to embodiment 2 of the present invention;
fig. 8 is a block diagram of a structure of a computer terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1:
according to an embodiment of the present invention, there is provided an embodiment of a router adaptation method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the example of running on a computer terminal, fig. 2 is a hardware structure block diagram of the computer terminal of the router adaptation method according to the embodiment of the present invention. As shown in fig. 2, the computer terminal 100 may include one or more (only one shown) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration and is not intended to limit the structure of the electronic device. For example, computer terminal 100 may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the router adaptation method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the router adaptation method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 100. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Under the above operating environment, the present application provides a router adaptation method as shown in fig. 3. The method can be applied to intelligent terminal equipment, and is executed by a processor in the intelligent terminal equipment, and the intelligent terminal equipment can be an intelligent mobile phone, a tablet personal computer and the like. The intelligent terminal device is provided with at least one application program, and the embodiment of the invention does not limit the types of the application programs, and can be a system application program or a software application program.
Fig. 3 is a flowchart of a router adaptation method according to an embodiment of the present invention. As shown in fig. 3, an alternative solution of the router adaptation method includes the following steps:
step S101, obtaining the identification information of the router to be adapted; the identification information includes model information.
The routers currently in use come from different manufacturers, such as 360, TP-link, Tenda, hua ye, etc., and the versions of devices produced by the same manufacturer are different, so that each router has its own unique identification information, including brand and version number, for distinguishing it from other routers.
When the information of the router function page is specifically acquired, the model information of the router is firstly determined, and then the router to be adapted is specifically determined to be which manufacturer and version of the router according to the model information, so that the adaptation templates can be generated for the routers of multiple models. It is the basis for implementing embodiments of the present invention to automatically identify routers and obtain model number information.
Specifically, step S101 may obtain the brand and model of the router through the intelligent terminal device accessing the router.
In order to facilitate matching of all routers in a batch, the embodiment of the present invention may maintain attribute information of all known routers, where the attribute information includes model information, feature code information, and the like of the routers. The feature code information is information that is unique to the router and uniquely identifies the router. The attribute information of the router is stored in a local terminal device or a cloud server in a form of a feature code table. The generation of the feature code table can be realized by adopting the following modes, including: obtaining model information of routers of different models and feature codes of the routers; and binding and storing the model information and the feature codes in a data table to form a router feature code table. The method for acquiring the model information of the router of different models and the feature code of the corresponding router may be acquired automatically or manually, which is not limited in the specific embodiment of the present invention, and any method capable of acquiring the model information and the feature code of the router in the prior art may be used in the embodiment of the present invention.
After the characteristic code table of the router is set and maintained in the local terminal device or the cloud server, the local terminal device or the cloud server can store an adaptation script, and the adaptation script has the function of accurately identifying specific router type number information according to the page information of the router.
And step S102, generating an adaptive template of the router.
It should be noted that step S102, i.e. the step of generating the adaptation template of the router, does not necessarily need to be after step S101, and the invention is applicable as long as the adaptation template of the router is generated before step S103.
It should be noted that although there are many types of routers, the same execution script may exist among a plurality of different types of routers, and batch adaptation to the routers of the various types can be realized by generating an adaptation template through the common execution script.
As shown in fig. 4, step S102 includes:
step S201, obtaining adaptation scripts of a plurality of routers with different models.
The adaptation scripts for acquiring the routers of different models may be acquired by any method in the prior art, may be automatically acquired according to a predetermined algorithm, or may be manually acquired according to experience accumulation, which is not limited in the specific embodiment of the present invention.
And S202, acquiring a common execution script of the routers of different models according to the adaptation script.
And step S203, generating common adaptive templates of routers of different models according to the common execution script.
In an alternative embodiment, as shown in FIG. 5, step 202 comprises:
s301, pages of all functions of each type of router are analyzed respectively, and page elements of each page are obtained;
s301, extracting common page features from the acquired page elements of different models;
and step S303, generating a common template page feature according to the page feature.
In an alternative embodiment, step S203 includes:
and (3) encapsulating the template page features according to each function into corresponding functional interfaces to obtain adaptation templates of routers of various different models, abstracting the template page features of the same function of the routers of different adaptation templates and encapsulating the template page features into uniform functional interfaces.
The steps of generating an adapted template for a router are further described below, taking a router of the TP-LINK brand as an example. As shown in Table one, there are only three adaptation templates for routers of 12 models under the TP-LINK brand. Therefore, only three templates need to be developed, the 12 models do not need to be developed and adapted one by one, and development efficiency is efficiently improved and development cost is low.
The acquisition process of the specific adaptation template is to acquire the common result of feasibility of template adaptation through script analysis of a single router. Taking the adaptation template of the TP-LINK brand template one as an example, when analyzing the router scripts of the models TL-WR842N, TL-WR740N, TL-WR742N, TL-WR845N and the like in the early stage, it is found that the scripts are completely consistent, so that it is confirmed that the adaptation of the routers of multiple models can be completed through the same model script.
Watch 1
Figure BDA0001047310550000071
Further, as an optional implementation manner, after step S203, the method further includes:
step S204, the adaptive template is associated with the identification information of the router corresponding to the adaptive template.
Specifically, associating the adapted template with the identification information of the router corresponding to the adapted template includes: and associating each adaptation template with the identification information of the plurality of routers corresponding to the adaptation template and storing the association in a data table to form an adaptation template corresponding table. After the identification information of the router to be adapted is obtained, the adaptation template of the router to be adapted can be obtained by searching the adaptation template corresponding table.
After the adaptive template of the router is generated based on the method, when the adaptive template is stored, the adaptive template may be stored locally in the terminal device or may be stored in the cloud server. Regardless of where it is stored, it maintains a table of adaptation templates of routers, which includes at least model information of routers and adaptation templates of routers. After the model information of the router to be adapted is obtained, the adaptation template corresponding to the model can be obtained in the following manner according to the different storage positions of the adaptation template of the router. The method specifically comprises the following steps:
when the adaptation template of the router is only stored locally in the terminal device, the adaptation template of the router to be adapted can be obtained from the adaptation template locally stored in the terminal device according to the model information.
When the adaptation template of the router is only stored in the cloud server, the adaptation template of the router to be adapted can be obtained from the adaptation template stored in the cloud server according to the model information.
When the adaptation templates of the router are stored in both a local terminal device side and a cloud server, and the script contents stored at the two ends are consistent, inquiring whether an adaptation template corresponding to the model information exists in the adaptation templates locally stored in the terminal device according to the model information, and if the adaptation template does not exist locally, acquiring the adaptation template of the router to be adapted from the adaptation templates stored in the cloud server according to the model information; and if the local router exists, acquiring the adaptation template of the router to be adapted from the adaptation templates locally stored in the terminal equipment according to the model information.
When the adaptation template of the router to be adapted is obtained from the adaptation templates locally stored in the terminal device according to the model information, the method specifically comprises the following steps: and inquiring an adaptation pin of a router locally stored in the terminal equipment according to the model information, and acquiring an adaptation template of the router corresponding to the router to be adapted.
When the adaptation template of the router to be adapted is acquired from the adaptation template stored in the cloud server according to the model information, the method specifically comprises the following steps: the method comprises the steps that terminal equipment sends a request message for acquiring an adaptive template of a router to a cloud server, wherein the request message carries model information of the router; after receiving the request message, the cloud server queries the adaptation template of the router stored in the cloud server according to the model information contained in the request message, acquires the adaptation script of the router corresponding to the router to be adapted, and sends the acquired adaptation template of the router to the requesting terminal device.
Step S103, obtaining the adaptive template corresponding to the identification information according to the identification information.
Because the model of the router corresponds to the identification information, after the adaptation templates of the routers of different models are generated, the corresponding adaptation templates can be found as long as the model information of the router is obtained.
And step S104, adapting the router to be adapted according to the adaptation template.
After the adaptation template is obtained, the router to be adapted can be adapted according to the adaptation template. Specifically, the adaptation process of step S104 includes:
packaging the adaptive template to the terminal equipment;
a user triggers an adaptive template at terminal equipment; the user can trigger the adaptation template by using a route management function in the terminal device;
the adaptive template controls the router device to control the router, thereby realizing the management function of the terminal device to the router.
The functions of route management of the terminal device include:
1. trusted device list: the device name, device MAC address, device network speed, etc. of each router connection device are displayed in the list.
2. Black list: a forbidden access device list function in the router. Including operations of adding and deleting blacklists.
3. Hiding WiFi: the broadcast function of cancellation in the router can be realized hiding wiFi through this setting, and then realizes that other users can't discover, realizes the function of the purpose of avoiding being rubbed with the net.
4. Restarting the router: restarting the router device is achieved by a router control script.
5. And modifying the WiFi name: and the function of modifying the name of the WiFi is realized through the router control script.
6. And modifying the WiFi password: and the function of modifying the connection password of the WiFi is realized through the router control script.
Wherein, the process of packaging the adaptive template to the terminal device comprises the following steps: when the relevant information of the preset function of the router needs to be acquired, the appointed function can be realized only by calling the corresponding interface, and the specific data related to the corresponding function is transmitted and transmitted by interactively realizing the parameters and the return values in the interface. The specific implementation is that the application program calls a corresponding page of a corresponding functional interface request router in the adaptive template, analyzes the page information of the corresponding page and analyzes corresponding related information, and returns the analyzed related information serving as a return value to a calling layer in a fixed format; the preset function page is analyzed by using the logic in the script to obtain data, and the analyzed data is returned to the caller. For example, the wireless information, whose corresponding functional interface is get _ wan _ info, can obtain the related information such as the wireless name, password, and wireless password encryption mode by calling the interface get _ wan _ info during implementation.
In addition, in order to ensure that the generated adaptive template of the router is not plagiarized, the adaptive template of the router is encrypted after the adaptive template of the router is written. The embodiment of the present invention is not limited to the algorithm for encrypting the adaptation script of the router, and a user may set the algorithm according to a requirement when the embodiment of the present invention is implemented specifically.
After the adaptation template of the router is encrypted, the terminal device acquires the encrypted adaptation template and needs to decrypt the encrypted adaptation template first. The specific decryption may be performed according to an encryption algorithm, and for this, the embodiment of the present invention is also not limited.
The implementation of the invention has the following beneficial effects:
the method of the invention obtains the identification information of the router to be adapted; the identification information includes model information; generating an adaptive template of the router; then obtaining an adaptive template corresponding to the identification information according to the identification information; the adaptation template is an execution script common to routers of different models; and finally, adapting the router to be adapted according to the adaptation template. The invention provides a terminal solution compatible with different brands of router models, and due to the fact that the execution script common to the routers of different models is obtained as the adaptation template, batch adaptation of the routers of different models can be achieved through the adaptation template. Compared with the adaptation mode according to the model of other similar products, the adaptation mode of the router based on the adaptation template can complete the compatibility and adaptation of most router models by only using less template development, thereby greatly improving the development efficiency, saving the development cost and shortening the development period.
Example 2
According to the embodiment of the invention, the invention also provides a system for implementing the router adaptation method. Fig. 6 is a schematic diagram of a router adaptation system according to a first embodiment of the present invention, as shown in fig. 6, the system including: the device comprises an identification information acquisition module, an adaptive template generation module, an adaptive template acquisition module and an adaptive module;
the identification information acquisition module is used for acquiring the identification information of the router to be adapted; the identification information includes model information;
the adaptive template generation module comprises:
the multi-script acquisition unit is used for acquiring the adaptation scripts of a plurality of routers with different models;
the common script obtaining unit is used for obtaining common execution scripts of routers of different types according to the adaptive scripts;
the adaptation template generating unit is used for generating the common adaptation templates of the routers with different models according to the common execution script;
the adaptive template acquisition module is used for acquiring an adaptive template corresponding to the identification information according to the identification information; the adaptation template is an execution script common to routers of different models;
and the adaptation module is used for adapting the router to be adapted according to the adaptation template.
In the system for adapting a router of this embodiment, the identification information obtaining module may be configured to execute step S101 in the embodiment of the present invention, the adaptation template generating module may be configured to execute step S102 in the embodiment of the present invention, the adaptation template obtaining module may be configured to execute step S103 in the embodiment of the present invention, and the adaptation module may be configured to execute step S104 in the embodiment of the present invention.
As an optional embodiment, the system further includes an association module, configured to associate the adaptation template with the identification information of the router corresponding to the adaptation template.
As an alternative embodiment, as shown in fig. 7, the common scenario obtaining unit includes:
the page element acquisition subunit is used for respectively analyzing the pages of all the functions of the router of each type and acquiring the page elements of each page;
the page feature extraction subunit is used for extracting common page features from the acquired page elements of different models;
and the template page feature generation subunit is used for generating a common template page feature according to the page feature.
As an optional embodiment, the adapted template generating unit is further configured to:
and (3) encapsulating the template page features according to each function into corresponding functional interfaces to obtain adaptation templates of routers of various different models, abstracting the template page features of the same function of the routers of different adaptation templates and encapsulating the template page features into uniform functional interfaces.
As an optional embodiment, the adaptive template obtaining module is further configured to:
acquiring an adaptation template of the router to be adapted according to the identification information from an adaptation template locally stored in the terminal equipment;
or acquiring an adaptation template of the router to be adapted according to the identification information from the adaptation template stored in the cloud server;
or inquiring whether an adaptation template corresponding to the identification information exists in adaptation templates stored locally in the terminal equipment or not according to the identification information, if not, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored in the cloud server, and if so, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored locally in the terminal equipment.
As an optional embodiment, the system further includes an encryption module, configured to encrypt the generated adaptation template of the router, so as to obtain an encrypted adaptation template of the router.
Example 3
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be configured to store a program code executed by the router adaptation method according to the above embodiment.
Optionally, in this embodiment, the storage medium may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
firstly, acquiring identification information of a router to be adapted; the identification information includes model information;
secondly, generating an adaptive template of the router;
the generating of the adaptive template of the router comprises:
acquiring adaptation scripts of a plurality of routers of different models;
acquiring a common execution script of routers of different types according to the adaptation script;
generating a common adaptive template of routers of different models according to the common execution script;
thirdly, acquiring an adaptive template corresponding to the identification information according to the identification information;
and fourthly, adapting the router to be adapted according to the adaptation template.
Optionally, the obtaining, according to the adaptation script, a common execution script for routers of different models includes:
respectively analyzing all functional pages of the router of each type to obtain page elements of each page;
extracting common page features from the acquired page elements of different models;
and generating a common template page feature according to the page feature.
Optionally, the obtaining, according to the adaptation script, a common execution script for routers of different models includes:
and (3) encapsulating the template page features according to each function into corresponding functional interfaces to obtain adaptation templates of routers of various different models, abstracting the template page features of the same function of the routers of different adaptation templates and encapsulating the template page features into uniform functional interfaces.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and associating the adaptive template with the identification information of the router corresponding to the adaptive template.
Optionally, the storage medium is further arranged to store program code for performing the steps of: acquiring an adaptation template of the router to be adapted according to the identification information from an adaptation template locally stored in the terminal equipment;
or acquiring an adaptation template of the router to be adapted according to the identification information from the adaptation template stored in the cloud server;
or inquiring whether an adaptation template corresponding to the identification information exists in adaptation templates stored locally in the terminal equipment or not according to the identification information, if not, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored in the cloud server, and if so, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored locally in the terminal equipment.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and encrypting the generated adaptation template of the router to obtain the encrypted adaptation template of the router.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Example 4
The embodiment of the invention also provides a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.
Alternatively, fig. 8 is a block diagram of a structure of a computer terminal according to an embodiment of the present invention. As shown in fig. 8, the computer terminal a may include: one or more processors 101 (only one shown), a memory 103, and a transmission device 105.
The memory 103 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for short text classification in the embodiments of the present invention, and the processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 103, that is, the short text classification is implemented. The memory 103 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 103 may further include memory located remotely from the processor 101, which may be connected to the computer terminal a via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 105 is used to receive or transmit data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 105 includes a network adapter that can be connected to a router via a network cable to communicate with the internet or a local area network. In one example, the transmission device 105 is a radio frequency module that is used to communicate with the internet by wireless means.
Specifically, the memory 103 is used for storing preset action conditions, information of preset authorized users, and application programs.
The processor 101 may call the information and application stored in the memory 103 through the transmission device to perform the following steps:
optionally, the processor 101 may further execute program codes of the following steps:
acquiring identification information of a router to be adapted; the identification information includes model information;
generating an adaptive template of the router;
acquiring an adaptive template corresponding to the identification information according to the identification information;
adapting the router to be adapted according to the adaptation template;
the generating of the adaptive template of the router comprises:
acquiring adaptation scripts of a plurality of routers of different models;
acquiring a common execution script of routers of different types according to the adaptation script;
and generating a common adaptation template of the routers of different models according to the common execution script.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiments 1 to 3 above, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (12)

1. A method for router adaptation, comprising:
acquiring identification information of a router to be adapted; the identification information includes model information;
generating an adaptive template of the router, which can realize batch adaptation of routers of different models, according to a plurality of routers of different models which can be adapted through the same template script;
acquiring an adaptive template corresponding to the identification information according to the identification information;
adapting the router to be adapted according to the adaptation template, wherein the adaptation template is packaged to the terminal equipment, the adaptation template is triggered at the terminal equipment, the router management function in the terminal equipment is used for triggering the adaptation template, and the adaptation template controls the router equipment to control the router, so that the management function of the terminal equipment on the router is realized;
the generating of the adaptation template of the router capable of realizing batch adaptation to routers of different models comprises:
acquiring adaptation scripts of a plurality of routers of different models, which can be adapted through the same template script;
acquiring a common execution script of routers of different types according to the adaptation script;
and generating a common adaptation template of the routers of different models according to the common execution script, and associating the adaptation template with the identification information of the router of different models corresponding to the adaptation template.
2. The router adaptation method according to claim 1, wherein the obtaining of the execution script common to the routers of different models according to the adaptation script comprises:
respectively analyzing all functional pages of the router of each type to obtain page elements of each page;
extracting common page features from the acquired page elements of different models;
and generating a common template page feature according to the page feature.
3. The router adaptation method according to claim 2, wherein the generating of the common adaptation template for the routers of different models according to the common execution script comprises:
and (3) encapsulating the template page features according to each function into corresponding functional interfaces to obtain adaptation templates of routers of various different models, abstracting the template page features of the same function of the routers of different adaptation templates and encapsulating the template page features into uniform functional interfaces.
4. The router adaptation method according to claim 1, wherein the obtaining an adaptation template corresponding to the identification information according to the identification information includes:
acquiring an adaptation template of the router to be adapted according to the identification information from an adaptation template locally stored in the terminal equipment;
or inquiring whether an adaptation template corresponding to the identification information exists in adaptation templates stored locally in the terminal equipment or not according to the identification information, if not, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored in the cloud server, and if so, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored locally in the terminal equipment.
5. The router adaptation method according to claim 1, further comprising, after generating the adaptation template for the router: and encrypting the generated adaptation template of the router to obtain the encrypted adaptation template of the router.
6. A router adaptation system, comprising:
the identification information acquisition module is used for acquiring the identification information of the router to be adapted; the identification information includes model information;
the adaptive template generating module is used for generating adaptive templates of routers, which can realize batch adaptation to routers of different models, according to a plurality of routers of different models which can complete adaptation through the same template script;
the adaptive template generation module comprises:
the multi-script acquisition unit is used for acquiring the adaptation scripts of a plurality of routers of different models, which can be adapted through the same template script;
the common script obtaining unit is used for obtaining common execution scripts of routers of different types according to the adaptive scripts;
the adaptation template generating unit is used for generating the common adaptation templates of the routers with different models according to the common execution script;
the adaptive template acquisition module is used for acquiring an adaptive template corresponding to the identification information according to the identification information;
the adaptation module is used for adapting the router to be adapted according to the adaptation template, and comprises the steps of packaging the adaptation template to the terminal equipment, triggering the adaptation template at the terminal equipment, triggering the adaptation template by using a routing management function in the terminal equipment, and controlling the router by using the routing equipment by using the adaptation template so as to realize the management function of the terminal equipment on the router;
and the association module is used for associating the adaptation template with the identification information of the router corresponding to the adaptation template.
7. The router adaptation system according to claim 6, wherein the common script obtaining unit comprises:
the page element acquisition subunit is used for respectively analyzing the pages of all the functions of the router of each type and acquiring the page elements of each page;
the page feature extraction subunit is used for extracting common page features from the acquired page elements of different models;
and the template page feature generation subunit is used for generating a common template page feature according to the page feature.
8. The router adaptation system of claim 7, wherein the adaptation template generation unit is further configured to:
and (3) encapsulating the template page features according to each function into corresponding functional interfaces to obtain adaptation templates of routers of various different models, abstracting the template page features of the same function of the routers of different adaptation templates and encapsulating the template page features into uniform functional interfaces.
9. The router adaptation system of claim 6, wherein the adaptation template acquisition module is further configured to:
acquiring an adaptation template of the router to be adapted according to the identification information from an adaptation template locally stored in the terminal equipment;
or inquiring whether an adaptation template corresponding to the identification information exists in adaptation templates stored locally in the terminal equipment or not according to the identification information, if not, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored in the cloud server, and if so, acquiring the adaptation template of the router to be adapted according to the identification information from the adaptation templates stored locally in the terminal equipment.
10. The router adaptation system according to claim 6, further comprising an encryption module for encrypting the generated adaptation template of the router to obtain an encrypted adaptation template of the router.
11. A storage medium storing program code for execution by a router adaptation method according to any one of claims 1-5.
12. A computer terminal, characterized in that the computer terminal comprises: one or more processors, memory, and transmission means, the processors invoking information and applications stored by the memory through the transmission means to perform a router adaptation method according to any one of claims 1-5.
CN201610545957.3A 2016-07-12 2016-07-12 Router adaptation method and system Active CN106713004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610545957.3A CN106713004B (en) 2016-07-12 2016-07-12 Router adaptation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610545957.3A CN106713004B (en) 2016-07-12 2016-07-12 Router adaptation method and system

Publications (2)

Publication Number Publication Date
CN106713004A CN106713004A (en) 2017-05-24
CN106713004B true CN106713004B (en) 2022-02-18

Family

ID=58940327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610545957.3A Active CN106713004B (en) 2016-07-12 2016-07-12 Router adaptation method and system

Country Status (1)

Country Link
CN (1) CN106713004B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864152B (en) * 2017-12-08 2020-04-28 武汉虹信技术服务有限责任公司 Method for rapidly completing intelligent building multi-protocol adaptation engineering template by using VBA
CN110392375B (en) * 2018-04-18 2022-02-22 腾讯科技(深圳)有限公司 WiFi network channel modification method, terminal, server and storage medium
CN109396117B (en) * 2018-09-18 2022-03-08 镇江长悦光电科技有限公司 Control method of laser cleaning equipment, cleaning equipment and storage medium
CN113434215B (en) * 2021-06-28 2023-06-16 青岛海尔科技有限公司 Information loading method and device, storage medium and processor
CN114827001A (en) * 2022-03-29 2022-07-29 惠州高盛达科技有限公司 Compatible method and system for router management and application
CN114866469B (en) * 2022-07-11 2022-09-30 佛山赛思禅科技有限公司 Method and system for realizing multi-identification router architecture supporting parallel forwarding

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904970A (en) * 2012-11-21 2013-01-30 成都市迅电网络技术有限公司 Method and system for automatically controlling router
CN104301139A (en) * 2014-09-28 2015-01-21 北京奇虎科技有限公司 Router adaptation method and device and terminal device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2547448A1 (en) * 2006-05-23 2007-11-23 Net-Conex Developments, Inc. System and method for configuring a router
US20090310512A1 (en) * 2008-06-16 2009-12-17 Subhabrata Sen Method and apparatus for creating router configuration
US8514854B2 (en) * 2009-06-11 2013-08-20 Brocade Communications Systems, Inc. Virtual router redundancy for server virtualization
US20120102226A1 (en) * 2010-10-20 2012-04-26 Microsoft Corporation Application specific web request routing
US8605732B2 (en) * 2011-02-15 2013-12-10 Extreme Networks, Inc. Method of providing virtual router functionality
US8989367B2 (en) * 2012-09-12 2015-03-24 Genesys Telecommunications Laboratories, Inc. System and method for monitoring health of deployment states for a contact center
CN103532751B (en) * 2013-10-09 2016-10-19 北京奇虎科技有限公司 Network access equipment management method and device
CN105357289B (en) * 2015-10-23 2019-10-22 上海斐讯数据通信技术有限公司 The configuration method of router, the generation method of software image file and system
CN105515848A (en) * 2015-12-01 2016-04-20 上海斐讯数据通信技术有限公司 Router configuration method and router configuration device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904970A (en) * 2012-11-21 2013-01-30 成都市迅电网络技术有限公司 Method and system for automatically controlling router
CN104301139A (en) * 2014-09-28 2015-01-21 北京奇虎科技有限公司 Router adaptation method and device and terminal device

Also Published As

Publication number Publication date
CN106713004A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106713004B (en) Router adaptation method and system
US20210112402A1 (en) Method enabling migration of a subscription
CN114124930B (en) Configuration file transmission method, terminal, server and storage medium
WO2017147873A1 (en) Profile download method, and related devices and system
CN113132973B (en) Equipment network distribution method and system and computer readable storage medium
CN107786601B (en) Information processing method, terminal and server
WO2015143794A1 (en) Creating and upgrading methods, server, terminal, upgrading system, and storage media
CN106649446B (en) Information pushing method and device
US20170102934A1 (en) Device Management Session Triggering Method, Device, System and Computer Storage Medium
CN108376078A (en) Upgrade method, device and the household appliance of equipment
CN109995876B (en) File transmission method, device, system and computer storage medium
WO2014008864A1 (en) Method, apparatus, and system for sharing software among terminals
US20140019957A1 (en) Method, apparatus, and system for sharing software among terminals
US20210208861A1 (en) Method, User Equipment, and Application Server for Downloading Application
CN110198229B (en) Network configuration method and device, storage medium and electronic device
CN111241559A (en) Training model protection method, device, system, equipment and computer storage medium
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN107168765A (en) A kind of method and system of remote compilation software
CN113647113A (en) Network-based media processing security
CN109842515B (en) Method for multi-device network distribution, server and computer storage medium
CN106605231B (en) Account's control
CN108989365B (en) Information processing method, server, terminal equipment and storage medium
CN107526584B (en) Data access method and device
CN112423322A (en) Model information sending method, device, storage medium and electronic device
CN113312083A (en) Application generation method, device and equipment

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