CN104301139B - Router adaptation method, device and terminal device - Google Patents

Router adaptation method, device and terminal device Download PDF

Info

Publication number
CN104301139B
CN104301139B CN201410509326.7A CN201410509326A CN104301139B CN 104301139 B CN104301139 B CN 104301139B CN 201410509326 A CN201410509326 A CN 201410509326A CN 104301139 B CN104301139 B CN 104301139B
Authority
CN
China
Prior art keywords
router
script
adaptation
type information
adaptation script
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
CN201410509326.7A
Other languages
Chinese (zh)
Other versions
CN104301139A (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.)
Chengdu Panorama Intelligent Technology Co ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410509326.7A priority Critical patent/CN104301139B/en
Publication of CN104301139A publication Critical patent/CN104301139A/en
Priority to PCT/CN2015/090473 priority patent/WO2016045595A2/en
Application granted granted Critical
Publication of CN104301139B publication Critical patent/CN104301139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of router adaptation method, device and terminal device, is related to communication technical field, and main purpose is relevant information that is automatic, fast and accurately obtaining router feature page.The main method of the present invention includes:Router to be adapted to is identified, the type information of router to be adapted to described in acquisition;The adaptation script of router to be adapted to according to obtaining the type information, the adaptation script include the functional interface of each function of router, and the functional interface is formed by the page elements abstract package of each function pages;Using the relevant information that corresponding function interface acquisition router corresponding function in script is adapted to described in application call, the relevant information is returned into calling layer as return value.During being obtained present invention is mainly used for router related functional information.

Description

Router adaptation method, device and terminal device
Technical field
The present invention relates to communication technical field, more particularly to a kind of router adaptation method, device and terminal device.
Background technology
Router (Router, also known as path device) is a kind of computer network facility, and it can be by data by packing one Individual network is sent to destination, and this process is referred to as routeing.Router is exactly the equipment for connecting two or more separate network, is to connect The equipment for connecing each LAN, wide area network in internet, it can automatically select and set route according to the situation of channel, with optimal road Footpath, the equipment that signal is sent by tandem.Router has been widely used for all trades and professions, the production of various different class at present Product have turned into realizes connection, key internetworking and backbone network and the main force of internet interconnection business inside various backbone networks Army.
Special role based on router, the function that its own needs is completed is many, such as online, setting WIFI, setting Password etc..And these functions are showed by the form of the page, when needing to use the relevant information on the page, only Router can be first opened, finds the page of corresponding function, then the information on the page is artificially obtained, causes router feature page The acquisition of face information is comparatively laborious.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of router adaptation method, device and terminal device, and main purpose exists In relevant information that is automatic, fast and accurately obtaining router feature page.
According to one aspect of the invention, there is provided a kind of router adaptation method, including:
Router to be adapted to is identified, the type information of router to be adapted to described in acquisition;
The adaptation script of router to be adapted to according to obtaining the type information, the adaptation script include router The functional interface of each function, the functional interface are formed by the page elements abstract package of each function pages;
Utilize related the believing that corresponding function interface acquisition router corresponding function in script is adapted to described in application call Breath, calling layer is returned to using the relevant information as return value.
According to another aspect of the invention, there is provided router adaptive device, including:
Type information acquiring unit, for identifying router to be adapted to, the type information of router to be adapted to described in acquisition;
Adaptation script acquisition unit, for according to the type information obtain described in router to be adapted to adaptation script, The adaptation script includes the functional interface of each function of router, and the functional interface is abstracted envelope by the page elements of each function pages Dress forms;
Relevant information acquiring unit, for obtaining road using corresponding function interface in adaptation script described in application call By the relevant information of device corresponding function, the relevant information is returned into calling layer as return value.
According to another aspect of the invention, there is provided terminal device, including router adaptive device as described above.
By above-mentioned technical proposal, technical scheme provided in an embodiment of the present invention at least has following advantages:
Router adaptation method, device and terminal device provided in an embodiment of the present invention, by the page of router feature page Surface element is abstracted and is encapsulated as being adapted to script.When needing to obtain the relevant information of a model router predetermined function, certainly On the premise of dynamic identification router model, adaptation script corresponding to the model router is obtained, by calling the adaptation script The corresponding interface of middle correlation function realizes the acquisition of function pages relevant information, compared with prior art, energy of the embodiment of the present invention Page info that is enough automatic and accurately and conveniently obtaining router feature page.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of router recognition methods provided in an embodiment of the present invention;
Fig. 2 shows a kind of method flow diagram of type information for obtaining router provided in an embodiment of the present invention;
Fig. 3 shows a kind of method flow diagram of adaptation script for generating router provided in an embodiment of the present invention;
Fig. 4 shows a kind of composition frame chart of router adaptive device provided in an embodiment of the present invention;
Fig. 5 shows a kind of composition frame chart of router adaptive device provided in an embodiment of the present invention;
Fig. 6 shows a kind of composition frame chart of router adaptive device provided in an embodiment of the present invention;
Fig. 7 shows a kind of composition frame chart of router adaptive device provided in an embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
The embodiment of the present invention provides a kind of router adaptation method, as shown in figure 1, this method includes:
101st, router to be adapted to is identified, the type information of router to be adapted to described in acquisition.
Router currently in use from different production firms, such as 360, TP-link, Tenda, Huawei etc., And the version of the equipment of same manufacturer's production is also different, therefore each router has the type information of oneself, model letter Cease the unique identification information for router, including manufacturer and version number;For being different from other routers.
When specifically obtaining the information of router feature page, the type information of router must be determined first, afterwards could Determine that router to be adapted to is specifically the router of which version of which manufacturer according to the type information, and then just can determine that Function pages corresponding to the router.So simultaneously getter type information realizes the embodiment of the present invention to automatic identification router Basis.
102nd, according to the type information obtain described in router to be adapted to adaptation script.
It should be noted that in order to relevant information that is automatic, fast and accurately obtaining router feature page, keep away The drawbacks of exempting from the prior art by the relevant information that manually obtains router feature page, the present invention implement the embodiment it Before, it has been respectively created corresponding adaptation script for the router of different model, the script is a txt file, a script File includes the functional interface of each function involved by a model router, and One function interface corresponds to a kind of function, each function Interface is formed by the page elements abstract package of each function pages, and it can be employed program and directly invoke.
103rd, the phase that corresponding function interface acquisition router corresponding function in script is adapted to described in application call is utilized Information is closed, the relevant information is returned into calling layer as return value.
When needing to obtain the relevant information of router predetermined function, it is only necessary to interface corresponding to calling, it is possible to realize The function of specifying, the specific incoming outflow of data involved by corresponding function is to interact reality by the parameter in interface and return value Existing.Specific implementation is exactly that the respective page of corresponding function interface requests router in script is adapted to described in application call, The page info for analyzing the respective page parses corresponding relevant information, using the relevant information parsed as returning Return value and calling layer is returned to set form;Parsing is carried out to the predetermined function page using the logic inside script and obtains number According to, and the data parsed are returned into caller.Such as wireless messages, its corresponding function interface are get_wan_info, Interface get_wan_info is called to obtain the correlations such as wireless title, password and wireless cipher cipher mode during implementation Information.
Further, can be in one institute of terminal device local maintenance in order to facilitate the identification of router, the embodiment of the present invention There is the attribute information of known routers, the attribute information includes the type information of router, condition code information etc..This feature code is believed Cease for router is peculiar and the information of unique mark router.The attribute information of the router is deposited by the form of feature code table Storage is local in terminal device.The generation of this feature code table can use such a way to realize, including:Obtain different model route The type information of device and the condition code of the router;The type information and described document information binding are stored in tables of data, Form router feature code table.Wherein, the type information and the condition code of corresponding router for obtaining different model router can be with Obtained by the form of automatic or manual, the specific embodiment of the present invention is not limited to this, any in the prior art The method that router model information and condition code can be obtained, may be incorporated in the embodiment of the present invention.
When after terminal device is locally located and maintains the feature code table of the router, terminal device can locally be preserved One adaptation script, the function of the adaptation script is the page info according to router, accurately the specific route type of identification Number information.Specifically when needing to obtain the type information of a router, it may be employed without limitation of following method real It is existing, as shown in Fig. 2 this method includes:
201st, the page info of router to be adapted to is obtained.
It should be noted that when first time is by router solicitation gateway, certain router can be carried in requests for page Attribute information, therefore, if wanting to obtain the type information of a router, need first to obtain the page letter of router to be adapted to Breath.
202nd, according to the page info obtain described in router to be adapted to condition code, described document information is unique mark The information of different model router.
The condition code of the router to be adapted to according to obtaining the page info is specially to the page info Parsed, obtain the attribute information for the router that page info includes, the feature of router is obtained from the attribute information Code.
203rd, according to described document information querying router feature code table, the type information of router to be adapted to described in acquisition, The router feature code table includes condition code and type information, and condition code corresponds with type information.
After the type information of router to be adapted to is obtained, if thinking the phase of the acquisition router corresponding function of automation Information is closed, then needs to obtain the adaptation script of router, and then by calling corresponding function interface realization in adaptation script related The acquisition of information.Before the adaptation script for obtaining corresponding model router is performed, the embodiment of the present invention is always according to different model Router generation corresponding to adaptation script, and adaptation script is preserved, it is convenient when subsequently to use to obtain.Specifically , the adaptation script of generation router of the embodiment of the present invention may be employed without limitation of following method to realize, such as Fig. 3 institutes Show, this method includes:
301st, the router of different model is obtained.
Wherein, obtaining the router of different model can be obtained using any mode of the prior art, can basis Pre-defined algorithm is obtained automatically, can also rule of thumb accumulate artificial acquisition, and the specific embodiment of the present invention is not limited to this.
302nd, the router for every kind of model analyzes the router institute functional page respectively, obtains the page of each page Surface element.
In the step, a variety of functions of router are classified, One function is one kind, by each function The page is analyzed, and obtains page elements corresponding to the function pages.The router of the various models obtained is according to this kind of side Formula is carried out.
303rd, corresponding functional interface is abstracted and encapsulated into according to the page elements of every kind of function, obtains a kind of model The adaptation script of router, the page elements of the router identical function of different model are abstracted and encapsulated into unified function and connect Mouthful.
When page elements are abstracted and encapsulated into corresponding functional interface, it may be employed without limitation of Lua language real It is existing.The Lua is succinct, light weight, an expansible script, and it is a kind of light weight language, and its official version only includes One core simplified and most basic storehouse.This make it that Lua small volumes, toggle speed are fast.It is write with standard C language and with source Code form opens, and only more than 100 K after compiling, very easily can be embedded in other formula.For using C language or class C language, such as the program that C++ writes, when it calls the script that this is write using Lua, it can accomplish to be seamlessly connected, utilization is very square Just.Certainly writing for router adaptation script is carried out using Lua, is only a kind of specific embodiment in the embodiment of the present invention, When it is implemented, the embodiment of the present invention is to this and is not limited, any script can carry out the suitable of router Writing with script.
The adaptation script information of the different model router of above-mentioned generation can according to the renewal of corresponding router function and more Newly.
After the adaptation script based on above-mentioned method generation router, when being preserved to it, it can be preserved It is local in terminal device, cloud server can also be saved it in, the specific embodiment of the present invention is not limited to this.No By save it in where, it can safeguard the adaptation script table of a router when storing, road is comprised at least in the form By the type information of device and the adaptation script of router.When obtaining after the type information of router is adapted to, the router is fitted The difference of storage location with script, it can be obtained by following mode corresponding to the model and be adapted to script.Specifically include:
, can be from the adaptation that terminal device is locally stored when the adaptation script of router is merely stored in terminal device local In script according to the type information obtain described in router to be adapted to adaptation script.
, can be from the adaptation script of cloud server storage when the adaptation script of router is merely stored in cloud server The adaptation script of the middle router to be adapted to according to obtaining the type information.
When router adaptation script i.e. be stored in local terminal side, be stored in cloud server, and both ends again When the content for script of storage is consistent, then whether deposited in the adaptation script being locally stored according to type information inquiry terminal device Script is being adapted to corresponding to the type information, if local do not exist, according to institute from the adaptation script of cloud server storage State the adaptation script of router to be adapted to described in type information acquisition;If local be present, it is locally stored from terminal device suitable With in script according to the type information obtain described in router to be adapted to adaptation script.
Wherein, when in the adaptation script being locally stored from terminal device according to the type information obtain described in road to be adapted to By device adaptation script when, be specially:The adaptation pin for the router that terminal device is locally stored is inquired about according to the type information, Obtain the adaptation script of router corresponding to router to be adapted to.
Wherein, when in the adaptation script stored from cloud server according to the type information obtain described in treat adaptation route During the adaptation script of device, it is specially:Terminal device sends the request message for the adaptation script for obtaining router to cloud server, The type information of router is carried in the request message;After cloud server receives the request message, disappeared according to the request The adaptation script of the router of the type information inquiry cloud server storage included in breath, is obtained corresponding to router to be adapted to The adaptation script of router, and the adaptation script of the router of acquisition is sent to the terminal device of request.
In addition, in order to ensure that the adaptation script of the router of generation not by counteroffensive, is writing the adaptation script of good router Afterwards, the adaptation script of router is encrypted.Wherein, the algorithm present invention reality being encrypted in the adaptation script to router Apply example to be not limited this, user can be set according to demand when the embodiment of the present invention is embodied.
After the adaptation script to router is encrypted, terminal device obtains the adaptation script of encryption, it is necessary to first right The adaptation script of encryption is decrypted.Wherein, specific decryption can be carried out according to the algorithm of encryption, and pin is on the other hand, the present invention is real Example is applied also to be not limited.
Based on above method embodiment, the embodiment of the present invention provides a kind of router adaptive device, as shown in figure 4, including:
Type information acquiring unit 41, for identifying router to be adapted to, the model letter of router to be adapted to described in acquisition Breath;The type information is the unique identification information of router, including manufacturer and version number;For being different from other routers.
Adaptation script acquisition unit 42, the adaptation pin for the router to be adapted to according to type information acquisition This, the adaptation script includes the functional interface of each function of router, and the functional interface is taken out by the page elements of each function pages As encapsulation forms;The script is a txt file, and a script file includes the work(of each function involved by a model router Energy interface, One function interface correspond to a kind of function, and each functional interface is formed by the page elements abstract package of each function pages, It can be employed program and directly invoke.
Relevant information acquiring unit 43, for being obtained using corresponding function interface in adaptation script described in application call The relevant information of router corresponding function, the relevant information is returned into calling layer as return value.Wherein, the relevant information Acquiring unit 43 obtains the correlation of router corresponding function using corresponding function interface in script is adapted to described in application call Information, the relevant information is returned into calling layer specific implementation as return value is exactly, using the logic inside script to pre- Determine function pages and carry out parsing acquisition data, and the data parsed are returned into caller.Such as wireless messages are obtained, its is right It is get_wan_info to answer functional interface, calls interface get_wan_info to obtain wireless title, close when implementing The relevant information such as code and wireless cipher cipher mode.
Further, the type information acquiring unit 41 is identifying router to be adapted to, and adaptation route is treated described in acquisition During the type information of device, it can be implemented by following functional module, including:
Page info acquisition module block, for obtaining the page info of router to be adapted to.
Condition code acquisition module, it is described for the condition code of the router to be adapted to according to page info acquisition Condition code is the information of unique mark different model router.
Type information acquisition module block, for according to described document information querying router feature code table, waiting to be adapted to described in acquisition The type information of router, the router feature code table include condition code and type information, condition code and type information one One correspondence.
Further, can be in one institute of terminal device local maintenance in order to facilitate the identification of router, the embodiment of the present invention There is the attribute information of known routers, the attribute information includes the type information of router, condition code information etc..This feature code is believed Cease for router is peculiar and the information of unique mark router.The attribute information of the router is deposited by the form of feature code table Storage is local in terminal device.The embodiment of the present invention provides a kind of condition code systematic function, as shown in figure 5, the router is adapted to Device also includes:
Feature code table signal generating unit 44, for identifying router to be adapted in the type information acquiring unit 41, obtain Before the type information of the router to be adapted to, the router feature code table is generated.
Further, described document information table generation unit 44 generate the router feature code table can be by following work( Energy module is realized, is specifically included:
Acquisition module, for obtaining the type information of different model router and the condition code of the router.
Memory module, for the type information and described document information binding to be stored in tables of data, form router Feature code table.
Further, after the type information of router to be adapted to is obtained, if thinking the acquisition router pair of automation The relevant information of function is answered, then needs to obtain the adaptation script of router, and then by calling corresponding function in adaptation script to connect The acquisition of the existing relevant information of cause for gossip.Before the adaptation script for obtaining corresponding model router is performed, also root of the embodiment of the present invention Preserved according to adaptation script corresponding to the router generation of different model, and by adaptation script, it is convenient when subsequently to use Obtain.When the adaptation script acquisition unit 42 obtains router script according to type information, based on adaptation script storage location Difference, can be specially by following Implement of Function Module:
When the adaptation script of router is merely stored in terminal device local, the adaptation script acquisition unit 42 includes the One adaptation script acquisition module, in the adaptation script that is locally stored from terminal device according to obtaining the type information The adaptation script of router to be adapted to;
When the adaptation script of router is merely stored in cloud server, the adaptation script acquisition unit 42 includes second Script acquisition module is adapted to, for waiting to fit according to obtaining the type information in the adaptation script that stores from cloud server Adaptation script with router;
When router adaptation script i.e. be stored in local terminal side, be stored in cloud server, and both ends again When the content for script of storage is consistent, the adaptation script acquisition unit 42 include detection module, the 3rd adaptation script acquisition module, With the 4th adaptation script acquisition module.The detection module, it is locally stored for inquiring about terminal device according to the type information Adaptation script in the presence or absence of adaptation script corresponding to the type information;The 3rd adaptation script acquisition module, is used for When existing in detecting the adaptation script that terminal device is locally stored corresponding to the type information on adaptation script, from high in the clouds The adaptation script for being adapted to the router to be adapted to according to obtaining the type information in script of server storage;Described 4th Script acquisition module is adapted to, for the type information pair to be not present in the adaptation script that terminal device is locally stored is detected During the adaptation script answered, in the adaptation script being locally stored from terminal device according to the type information obtain described in road to be adapted to By the adaptation script of device.
Further, as shown in fig. 6, the router adaptive device also includes:
Be adapted to script generation unit 45, in the adaptation script acquisition unit according to obtaining the type information Before the adaptation script of router to be adapted to, the adaptation script of router is generated.
Wherein, the adaptation script generation unit 45 can pass through following function when generating the adaptation script of router Module is realized, is specifically included:
Acquisition module, for obtaining the router of different model;
Analysis module, the router institute functional page is analyzed respectively for the router for every kind of model, obtain The page elements of each page;
Abstract package modul, connect for being abstracted and encapsulated into corresponding function according to the page elements of every kind of function Mouthful, a kind of adaptation script of model router is obtained, the page elements of the router identical function of different model are abstracted and encapsulated Into unified functional interface.Wherein, corresponding to page elements are abstracted and encapsulated into during functional interface, can use but not office It is limited to the realization of Lua language.Certainly writing for router adaptation script is carried out using Lua, is only one kind in the embodiment of the present invention Specific embodiment, in the specific implementation, the embodiment of the present invention is to this and is not limited, and any script can enter Row router adaptation script is write.
Further, in order to ensure generation router adaptation script not by counteroffensive, writing the adaptation of good router After script, the adaptation script of router need to be encrypted.After the adaptation script to router is encrypted, work as terminal device The adaptation script of encryption is obtained, then, it is necessary to first be solved to the adaptation script of encryption when using the adaptation script of the encryption It is close.Specifically.As shown in fig. 7, the router adaptive device also includes:
Adaptation script encryption unit 46, for generated in the adaptation script generation unit 45 router adaptation script it Afterwards, the adaptation script of the router of generation is encrypted, the adaptation script for the router encrypted.
Adaptation script decryption unit 47, for being fitted in the relevant information acquiring unit 43 using described in application call Before the relevant information that router corresponding function is obtained with corresponding function interface in script, to the adaptation of the router of the encryption Script is decrypted, the adaptation script for the router decrypted.
Further, the relevant information acquiring unit 43 corresponds to work(in using adaptation script described in application call Energy interface obtains the relevant information of router corresponding function, can when the relevant information is returned into calling layer as return value By following Implement of Function Module, to specifically include:
Calling module, for being adapted to the corresponding page of corresponding function interface requests router in script described in application call Face.
Parsing module, the page info for analyzing the respective page parse corresponding relevant information.
Information return module, for returning to calling using the relevant information parsed as return value with set form Layer.
It should be noted that the correlation for each functional module that router adaptive device provided in an embodiment of the present invention is included Description, may be referred to the corresponding description in embodiment of the method, and the embodiment of the present invention will not be described in great detail herein.
Based on said apparatus embodiment, the embodiment of the present invention also provides a kind of terminal device, and the terminal device includes above-mentioned Router adaptive device.On the associated description of the router adaptive device, the description of above-mentioned corresponding part is may be referred to, The embodiment of the present invention will not be described in great detail herein.
In the embodiment of the present invention, the page elements of router feature page are abstracted and are encapsulated as being adapted to script.Work as needs When obtaining the relevant information of a model router predetermined function, on the premise of the automatic identification router model, obtaining should Adaptation script corresponding to model router, by calling the corresponding interface of correlation function in the adaptation script to realize function pages phase The acquisition of information is closed, compared with prior art, the embodiment of the present invention can automatically and accurately and conveniently obtain router feature The page info of the page.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be to be used to distinguish each embodiment, and do not represent the quality of each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital model processor (DSP) come realize router adaptation method according to embodiments of the present invention, device and The some or all functions of some or all parts in terminal device.The present invention is also implemented as being used to perform here The some or all equipment or program of device of described method are (for example, computer program and computer program production Product).Such program for realizing the present invention can store on a computer-readable medium, or can have one or more The form of model.Such model can be downloaded from internet website and obtained, and either be provided or in carrier model to appoint What other forms provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.

Claims (23)

  1. A kind of 1. router adaptation method, it is characterised in that including:
    Router to be adapted to is identified, the type information of router to be adapted to described in acquisition;
    The adaptation script of router to be adapted to according to obtaining the type information, the adaptation script include each work(of router The functional interface of energy, the functional interface are formed by the page elements abstract package of each function pages;
    , will using the relevant information that corresponding function interface acquisition router corresponding function in script is adapted to described in application call The relevant information returns to calling layer as return value.
  2. 2. according to the method for claim 1, it is characterised in that identify router to be adapted to, adaptation route is treated described in acquisition The type information of device includes:
    Obtain the page info of router to be adapted to;
    The condition code of router to be adapted to according to obtaining the page info, described document information is unique mark different model The information of router;
    According to described document information querying router feature code table, the type information of router to be adapted to, the route described in acquisition Device feature code table includes condition code and type information, and condition code corresponds with type information.
  3. 3. according to the method for claim 2, it is characterised in that identifying router to be adapted to, road to be adapted to described in acquisition Before the type information of device, in addition to:
    Generate the router feature code table.
  4. 4. according to the method for claim 3, it is characterised in that generating the router feature code table includes:
    Obtain the type information of different model router and the condition code of the router;
    The type information and described document information are bound and be stored in tables of data, forms router feature code table.
  5. 5. according to the method for claim 1, it is characterised in that the router to be adapted to according to obtaining the type information Adaptation script include:
    The adaptation for being adapted to the router to be adapted to according to obtaining the type information in script being locally stored from terminal device Script;
    Or from cloud server storage adaptation script according to the type information obtain described in router be adapted to fit With script;
    Or it whether there is the type information in the adaptation script being locally stored according to type information inquiry terminal device Corresponding adaptation script, if not existing, from the adaptation script of cloud server storage according to obtaining the type information The adaptation script of router to be adapted to, if in the adaptation script being locally stored in the presence of if from terminal device according to the type information The adaptation script of router to be adapted to described in acquisition.
  6. 6. according to the method for claim 5, it is characterised in that the router to be adapted to according to obtaining the type information Adaptation script before, in addition to:
    Generate the adaptation script of router.
  7. 7. according to the method for claim 6, it is characterised in that the adaptation script of the generation router includes:
    Obtain the router of different model;
    The router institute functional page is analyzed respectively for the router of every kind of model, obtains the page elements of each page;
    The page elements are abstracted and encapsulated into corresponding functional interface according to function, obtain a kind of adaptation of model router Script, the functional interface that the page elements of the router identical function of different model are abstracted and encapsulated into are identical.
  8. 8. according to the method for claim 7, it is characterised in that after the adaptation script of generation router, in addition to:
    The adaptation script of the router of generation is encrypted, the adaptation script for the router encrypted.
  9. 9. according to the method for claim 8, it is characterised in that corresponding in script using being adapted to described in application call Before functional interface obtains the relevant information of router corresponding function, in addition to:
    The adaptation script of the router of the encryption is decrypted, the adaptation script for the router decrypted.
  10. 10. method according to claim 1, it is characterised in that correspond to work(using being adapted to described in application call in script Energy interface obtains the relevant information of router corresponding function, and the relevant information is returned into calling layer as return value includes:
    The respective page of corresponding function interface requests router in script is adapted to described in application call;
    The page info for analyzing the respective page parses corresponding relevant information;
    Calling layer is returned to set form using the relevant information parsed as return value.
  11. 11. according to method any one of claim 1-10, it is characterised in that the adaptation script is to be write by Lua 's.
  12. A kind of 12. router adaptive device, it is characterised in that including:
    Type information acquiring unit, for identifying router to be adapted to, the type information of router to be adapted to described in acquisition;
    Adaptation script acquisition unit, it is described for the adaptation script of the router to be adapted to according to type information acquisition Adaptation script includes the functional interface of each function of router, the functional interface by the page elements abstract package of each function pages and Into;
    Relevant information acquiring unit, for obtaining router using corresponding function interface in adaptation script described in application call The relevant information of corresponding function, the relevant information is returned into calling layer as return value.
  13. 13. device according to claim 12, it is characterised in that the type information acquiring unit includes:
    Page info acquisition module block, for obtaining the page info of router to be adapted to;
    Condition code acquisition module, for the condition code of the router to be adapted to according to page info acquisition, the feature Code is the information of unique mark different model router;
    Type information acquisition module block, for according to described document information querying router feature code table, treating adaptation route described in acquisition The type information of device, the router feature code table include condition code and type information, a pair of condition code and type information 1 Should.
  14. 14. device according to claim 13, it is characterised in that also include:
    Feature code table signal generating unit, for identifying router to be adapted in the type information acquiring unit, wait to fit described in acquisition Before type information with router, the router feature code table is generated.
  15. 15. device according to claim 14, it is characterised in that described document information table generation unit includes:
    Acquisition module, for obtaining the type information of different model router and the condition code of the router;
    Memory module, for binding and being stored in tables of data the type information and described document information, it is special to form router Levy code table.
  16. 16. device according to claim 12, it is characterised in that the adaptation script acquisition unit includes:
    First adaptation script acquisition module, for being obtained in the adaptation script that is locally stored from terminal device according to the type information Take the adaptation script of the router to be adapted to;
    And/or the second adaptation script acquisition module, for being believed in the adaptation script that is stored from cloud server according to the model The adaptation script of router to be adapted to described in breath acquisition;
    And/or detection module, the 3rd adaptation script acquisition module and the 4th adaptation script acquisition module;
    The detection module, it whether there is for being inquired about according to the type information in the adaptation script that is locally stored of terminal device Adaptation script corresponding to the type information;
    The 3rd adaptation script acquisition module, it is described for existing in the adaptation script that terminal device is locally stored is detected When corresponding to type information on adaptation script, institute is obtained according to the type information from the adaptation script of cloud server storage State the adaptation script of router to be adapted to;
    The 4th adaptation script acquisition module, for institute to be not present in the adaptation script that terminal device is locally stored is detected When stating adaptation script corresponding to type information, obtained in the adaptation script being locally stored from terminal device according to the type information The adaptation script of the router to be adapted to.
  17. 17. device according to claim 16, it is characterised in that also include:
    Script generation unit is adapted to, for waiting to be adapted to according to obtaining the type information in the adaptation script acquisition unit Before the adaptation script of router, the adaptation script of router is generated.
  18. 18. device according to claim 17, it is characterised in that the adaptation script generation unit includes:
    Acquisition module, for obtaining the router of different model;
    Analysis module, the router institute functional page is analyzed respectively for the router for every kind of model, obtains each page The page elements in face;
    Abstract package modul, for the page elements to be abstracted and encapsulated into corresponding functional interface according to function, obtain one The adaptation script of kind model router, the function that the page elements of the router identical function of different model are abstracted and encapsulated into connect Mouth is identical.
  19. 19. device according to claim 18, it is characterised in that also include:
    Adaptation script encryption unit, after generating the adaptation script of router in the adaptation script generation unit, to life Into the adaptation script of router the adaptation script of the router encrypted is encrypted.
  20. 20. device according to claim 19, it is characterised in that also include:
    Adaptation script decryption unit, for being adapted in the page info acquiring unit using described in application call in script Before corresponding function interface obtains the relevant information of router corresponding function, the adaptation script of the router of the encryption is carried out Decryption, the adaptation script for the router decrypted.
  21. 21. device according to claim 12, it is characterised in that the relevant information acquiring unit includes:
    Calling module, for being adapted to the respective page of corresponding function interface requests router in script described in application call;
    Parsing module, the page info for analyzing the respective page parse corresponding relevant information;
    Information return module, for returning to calling layer using the relevant information parsed as return value with set form.
  22. 22. according to the device any one of claim 12-21, it is characterised in that the adaptation script is to be compiled by Lua Write.
  23. 23. a kind of terminal device, it is characterised in that be adapted to dress including the router as any one of claim 12 to 22 Put.
CN201410509326.7A 2014-09-28 2014-09-28 Router adaptation method, device and terminal device Active CN104301139B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410509326.7A CN104301139B (en) 2014-09-28 2014-09-28 Router adaptation method, device and terminal device
PCT/CN2015/090473 WO2016045595A2 (en) 2014-09-28 2015-09-23 Router adaptation method and device, and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410509326.7A CN104301139B (en) 2014-09-28 2014-09-28 Router adaptation method, device and terminal device

Publications (2)

Publication Number Publication Date
CN104301139A CN104301139A (en) 2015-01-21
CN104301139B true CN104301139B (en) 2017-12-01

Family

ID=52320718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410509326.7A Active CN104301139B (en) 2014-09-28 2014-09-28 Router adaptation method, device and terminal device

Country Status (2)

Country Link
CN (1) CN104301139B (en)
WO (1) WO2016045595A2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301139B (en) * 2014-09-28 2017-12-01 北京奇虎科技有限公司 Router adaptation method, device and terminal device
CN106714161B (en) * 2016-06-29 2019-02-05 腾讯科技(深圳)有限公司 Cut off method, equipment and the system of unauthorized mobile terminal network connection
CN106713004B (en) * 2016-07-12 2022-02-18 腾讯科技(深圳)有限公司 Router adaptation method and system
CN107094089B (en) * 2016-12-20 2020-06-16 腾讯科技(深圳)有限公司 Network management method, related equipment and system
CN110392375B (en) * 2018-04-18 2022-02-22 腾讯科技(深圳)有限公司 WiFi network channel modification method, terminal, server and storage medium
CN111585804A (en) * 2020-04-29 2020-08-25 杭州涂鸦信息技术有限公司 Router automatic configuration system, router automatic configuration method and automatic test system
CN111884938B (en) * 2020-06-30 2022-12-30 海尔优家智能科技(北京)有限公司 Router information acquisition method and device
CN112887362B (en) * 2021-01-08 2023-03-10 重庆锐明信息技术有限公司 Equipment access method, equipment access device and server
CN115766429A (en) * 2022-11-04 2023-03-07 珠海格力电器股份有限公司 Matching method and device of system and edge computing gateway

Citations (3)

* 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
CN203151525U (en) * 2013-01-24 2013-08-21 李东 WEB-based network management equipment
CN103873359A (en) * 2012-12-14 2014-06-18 上海斐讯数据通信技术有限公司 Mobile device, wireless router, route configuration method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102226A1 (en) * 2010-10-20 2012-04-26 Microsoft Corporation Application specific web request routing
CN104301139B (en) * 2014-09-28 2017-12-01 北京奇虎科技有限公司 Router adaptation method, device and terminal device

Patent Citations (3)

* 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
CN103873359A (en) * 2012-12-14 2014-06-18 上海斐讯数据通信技术有限公司 Mobile device, wireless router, route configuration method and system
CN203151525U (en) * 2013-01-24 2013-08-21 李东 WEB-based network management equipment

Also Published As

Publication number Publication date
WO2016045595A3 (en) 2016-05-19
WO2016045595A2 (en) 2016-03-31
CN104301139A (en) 2015-01-21

Similar Documents

Publication Publication Date Title
CN104301139B (en) Router adaptation method, device and terminal device
US10284390B2 (en) Techniques for efficient service chain analytics
US9472192B2 (en) Management of voice commands for devices in a cloud computing environment
CN104718723B (en) For the networking in virtual network and the frame of security service
CN104111944B (en) Page processing method and device and page generation method and device
CN107038354A (en) Code obfuscation method, code operation method and device
US10761887B2 (en) Allocating tasks in a computing environment
CN104407856B (en) Software tool develops the packaging method and device of APMB package
CN111783124A (en) Data processing method and device based on privacy protection and server
CN105939284B (en) The matching process and device of message control strategy
CN106921716B (en) Method and device for debugging network communication process of embedded equipment
CN106713004B (en) Router adaptation method and system
US9838359B2 (en) Separation of IoT network thing identification data at a network edge device
CN105022832A (en) Method for safely downloading APP (application), mobile terminal and download server
CN111338631B (en) Method and device for generating universal interface frame and computing equipment
CN108985756A (en) SE application processing method, user terminal and server
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN107644322A (en) The multiple terminals measures and procedures for the examination and approval and system based on OnlineBox systems
US20180063199A1 (en) Isolating a source of an attack that originates from a shared computing environment
CN113922972B (en) Data forwarding method and device based on MD5 identification code
CN110401925A (en) A kind of generation method and device of communication message
CN108134709A (en) A kind of test method and device applied to protenchyma networking transport
CN107508805B (en) A kind of data package processing method and system
CN109298869A (en) A kind of generation method and relevant apparatus of target channel packet
CN105550050A (en) Hardware communication method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: No. 1201, 12 / F, building 6, No. 599, shijicheng South Road, Chengdu hi tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan 610094

Patentee after: Chengdu panorama Intelligent Technology Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right