[go: up one dir, main page]

CN104301139A - Router adaptation method, device and terminal equipment - Google Patents

Router adaptation method, device and terminal equipment Download PDF

Info

Publication number
CN104301139A
CN104301139A CN201410509326.7A CN201410509326A CN104301139A CN 104301139 A CN104301139 A CN 104301139A CN 201410509326 A CN201410509326 A CN 201410509326A CN 104301139 A CN104301139 A CN 104301139A
Authority
CN
China
Prior art keywords
router
adaptive
script
type information
adaptive 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.)
Granted
Application number
CN201410509326.7A
Other languages
Chinese (zh)
Other versions
CN104301139B (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 Quanjing 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 relates to the technical field of communication and discloses a router adaptation method and device and a terminal device to be used for acquiring the relevant information of functional pages of a router automatically, quickly and accurately. The method comprises the steps of identifying a router to be adapted and acquiring the model information of the router to be adapted; acquiring the adaptation script of the router to be adapted according to the model information, wherein the adaptation script comprises functional interfaces corresponding to all the functions of the router, and the functional interfaces are formed by abstract encapsulation of page elements of all functional pages. The relevant information of a certain function of the router is acquired by calling the corresponding functional interface in the adaptation script by means of an application program, and relevant information is fed back to a calling layer as a returned value. The router adaptation method and device and the terminal device are mainly used for acquiring relevant function information of the router.

Description

Router adaptation method, device and terminal equipment
Technical field
The present invention relates to communication technical field, particularly relate to a kind of router adaptation method, device and terminal equipment.
Background technology
Router (Router, also known as path device) is a kind of computer network facility, and data can be sent to destination by network one by one of packing by it, and this process is called route.Router is exactly the equipment connecting two or more separate network, and be the equipment connecting each local area network (LAN), wide area network in internet, it can automatically be selected according to the situation of channel and set route, with optimal path, sends the equipment of signal by tandem.Current router is widely used in all trades and professions, and the product of various different class has become and realizes that various backbone network inside connects, the main force of key internetworking and backbone network and internet interconnection business.
Based on the special role of router, the function himself needed is many, such as, surf the Net, arrange WIFI, arrange password etc.And these functions are all showed by the form of the page, when needing to use the relevant information on this page, first can only open router, finding the page of corresponding function, again the information on this page is artificially obtained, cause the acquisition of router feature page info more loaded down with trivial details.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of router adaptation method, device and terminal equipment, and main purpose is automatically, obtain the relevant information of the router feature page fast and accurately.
According to one aspect of the invention, provide a kind of router adaptation method, comprising:
Adaptive router is treated in identification, treats the type information of adaptive router described in acquisition;
Treat the adaptive script of adaptive router described in obtaining according to described type information, described adaptive script comprises the functional interface of each function of router, and this functional interface is formed by the page elements abstract package of each function pages;
Utilize corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, described relevant information is returned to calling layer as return value.
According to another aspect of the present invention, provide router adaptive device, comprising:
Type information acquiring unit, treating adaptive router for identifying, treating the type information of adaptive router described in acquisition;
Adaptive script acquiring unit, for treating the adaptive script of adaptive router according to described type information acquisition, described adaptive script comprises the functional interface of each function of router, and this functional interface is formed by the page elements abstract package of each function pages;
Relevant information acquiring unit, for utilizing corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, returns to calling layer using described relevant information as return value.
According to another aspect of the present invention, provide terminal equipment, comprise router adaptive device as above.
By technique scheme, the technical scheme that the embodiment of the present invention provides at least has following advantages:
Router adaptation method, device and terminal equipment that the embodiment of the present invention provides, by abstract for the page elements of the router feature page and be encapsulated as adaptive script.When needing the relevant information obtaining a model router predetermined function, under the prerequisite automatically identifying this router model, obtain the adaptive script that this model router is corresponding, by calling the acquisition of the corresponding interface practical function page relevant information of correlation function in this adaptive script, compared with prior art, the embodiment of the present invention can obtain automatically and accurately and conveniently the page info of the router feature page.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of specification, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the flow chart of a kind of router recognition methods that the embodiment of the present invention provides;
Fig. 2 shows a kind of method flow diagram obtaining the type information of router that the embodiment of the present invention provides;
Fig. 3 shows a kind of method flow diagram generating the adaptive script of router that the embodiment of the present invention provides;
Fig. 4 shows the composition frame chart of a kind of router adaptive device that the embodiment of the present invention provides;
Fig. 5 shows the composition frame chart of a kind of router adaptive device that the embodiment of the present invention provides;
Fig. 6 shows the composition frame chart of a kind of router adaptive device that the embodiment of the present invention provides;
Fig. 7 shows the composition frame chart of a kind of router adaptive device that the embodiment of the present invention provides.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
The embodiment of the present invention provides a kind of router adaptation method, and as shown in Figure 1, the method comprises:
101, adaptive router is treated in identification, treats the type information of adaptive router described in acquisition.
The router used at present is from different production firms, such as 360, TP-link, Tenda, Huawei etc., and the version of the equipment of same manufacturers produce is also different, therefore each router has the type information of oneself, this type information is the unique identification information of router, comprises manufacturer and version number; For being different from other routers.
When the information of the concrete acquisition router feature page, first the type information of router must be determined, could determine to treat according to this type information the router of adaptive router specifically which version of which manufacturer afterwards, and then the function pages that this router is corresponding could be determined.So automatically identify router and getter type information is the basis realizing the embodiment of the present invention.
102, according to described type information acquisition, treat the adaptive script of adaptive router.
It should be noted that, in order to can be automatic, fast, obtain the relevant information of the router feature page accurately, avoid in prior art by the artificial drawback obtaining the relevant information of the router feature page, the present invention is before this embodiment of enforcement, router for different model creates corresponding adaptive script respectively, this script is a txt file, a script file comprises the functional interface of each function involved by a model router, a corresponding a kind of function of functional interface, each functional interface is formed by the page elements abstract package of each function pages, it can be employed program and directly call.
103, utilize corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, described relevant information is returned to calling layer as return value.
When needing the relevant information obtaining router predetermined function, only needing to call corresponding interface, just can realize the function of specifying, the involved concrete data of corresponding function import that to spread out of be carry out mutual realization by the parameter in interface and return value into.Specific implementation is exactly the respective page of corresponding function interface requests router in adaptive script described in application call, the relevant information of correspondence parses by the page info analyzing described respective page, and the relevant information parsed is returned to calling layer as return value with set form; Namely utilize the logic inside script to carry out parsing to the predetermined function page and obtain data, and the data parsed are returned to caller.Such as wireless messages, its corresponding function interface is get_wan_info, calls this interface get_wan_info just can obtain the relevant informations such as wireless title, password and wireless cipher cipher mode when implementing.
Further, the conveniently identification of router, the invention process regular meeting is at the attribute information of terminal equipment local maintenance all known routers, and this attribute information comprises the type information, condition code information etc. of router.This condition code information is the peculiar and information of unique identification router of router.The attribute information of this router is stored in terminal equipment this locality by the form of feature code table.The generation of this feature code table can adopt following mode to realize, and comprising: obtain the type information of different model router and the condition code of this router; Described type information and the binding of described condition code are stored in tables of data, form router feature code table.Wherein, the condition code of the type information and corresponding router that obtain different model router can be obtained by the form of automatic or manual, the concrete embodiment of the present invention does not limit this, in prior art, any one can obtain the method for router model information and condition code, all may be used in the embodiment of the present invention.
After arranging in terminal equipment this locality and maintain the feature code table of this router, an adaptive script can be preserved in terminal equipment this locality, and the function of this adaptive script is the page info according to router, identifies concrete router model information accurately.Concrete when needing the type information obtaining a router, can adopt but be not limited to following method realization, as shown in Figure 2, the method comprises:
201, the page info treating adaptive router is obtained.
It should be noted that, when first time is by router solicitation gateway, the attribute information of certain router can be carried in requests for page, therefore, if think the type information of an acquisition router, then need first to obtain the page info treating adaptive router.
202, according to described page info acquisition, treat the condition code of adaptive router, described condition code is the information of unique identification different model router.
Described obtain according to described page info described in treat that the condition code of adaptive router is specially described page info resolved, obtain the attribute information of the router that page info comprises, from described attribute information, obtain the condition code of router.
203, according to described condition code querying router feature code table, treat the type information of adaptive router described in acquisition, described router feature code table comprises condition code and type information, condition code and type information one_to_one corresponding.
After obtaining the type information treating adaptive router, if think the relevant information of the acquisition router corresponding function of automation, then need the adaptive script obtaining router, and then by calling the acquisition of corresponding function Interface realization relevant information in adaptive script.Before performing the adaptive script obtaining corresponding model router, the embodiment of the present invention also generates corresponding adaptive script according to the router of different model, and is preserved by adaptive script, obtains so that convenient when follow-up use.Concrete, the adaptive script that the embodiment of the present invention generates router can adopt but be not limited to following method realization, and as shown in Figure 3, the method comprises:
301, the router of different model is obtained.
Wherein, the router obtaining different model can adopt any one mode of the prior art to obtain, can according to pre-defined algorithm automatic acquisition, and also can rule of thumb accumulate artificial acquisition, the concrete embodiment of the present invention does not limit this.
302, analyze the page of these router all functions for the router of often kind of model respectively, obtain the page elements of each page.
In this step, the various different function of router classified, a function is a class, is analyzed by each function pages, obtains the page elements that this function pages is corresponding.The router of the various models obtained all carries out according to this kind of mode.
303, abstract according to the described page elements of often kind of function and be packaged into corresponding functional interface, obtain a kind of adaptive script of model router, the page elements of the router identical function of different model is abstract and be packaged into unified functional interface.
Page elements is abstract and when being packaged into corresponding functional interface, can adopt but be not limited to Lua language and realize.This Lua is succinct, light weight, an extendible script, and it is a kind of light weight language, and its official version only includes a core and the most basic storehouse of simplifying.This makes, and Lua volume is little, toggle speed is fast.It is write by standard C language and open with source code form, and only more than 100 K after compiling, can embed in other formula very easily.For use C language or class C language, as the program that C++ writes, when it calls the script that this use Lua writes, can seamless link be accomplished, use very convenient.Certain use Lua carries out writing of the adaptive script of router, it is only a kind of specific embodiment in the embodiment of the present invention, in the specific implementation, the embodiment of the present invention does not limit this, and any one script all can carry out writing of the adaptive script of router.
The adaptive script information of the different model router of above-mentioned generation can upgrade according to the renewal of corresponding router function.
After the adaptive script generating router based on above-mentioned method, when preserving it, can be kept at terminal equipment this locality, also can be kept at cloud server, the concrete embodiment of the present invention does not limit this.No matter where be kept at, all can safeguard the adaptive script table of a router when it stores, in this form, at least comprise the type information of router and the adaptive script of router.When obtaining after the type information of adaptive router, the difference of the memory location of the adaptive script of this router, can obtain adaptive script corresponding to this model by following mode.Specifically comprise:
When the adaptive script of router is only stored in terminal equipment this locality, described in can obtaining according to described type information from the adaptive script that terminal equipment this locality stores, treat the adaptive script of adaptive router.
When the adaptive script of router is only stored in cloud server, described in obtaining according to described type information the adaptive script that can store from cloud server, treat the adaptive script of adaptive router.
When namely the adaptive script of router is stored in local terminal side, be stored in cloud server again, and when the content for script that two ends store is consistent, then whether there is adaptive script corresponding to described type information according in the adaptive script of described type information inquiry terminal equipment this locality storage, if this locality does not exist, then treat the adaptive script of adaptive router described in obtaining according to described type information from the adaptive script that cloud server stores; Exist if local, then treat the adaptive script of adaptive router described in obtaining according to described type information from the adaptive script that terminal equipment this locality stores.
Wherein, described in obtain according to described type information in the adaptive script stored from terminal equipment this locality when the adaptive script of adaptive router, be specially: according to the adaptive pin of the router that described type information inquiry terminal equipment this locality stores, obtain the adaptive script treating the router that adaptive router is corresponding.
Wherein, described in obtain according to described type information in the adaptive script stored from cloud server when the adaptive script of adaptive router, be specially: terminal equipment sends the request message of the adaptive script obtaining router to cloud server, carry the type information of router in described request message; After cloud server receives this request message, according to the adaptive script of the router that the type information inquiry cloud server comprised in this request message stores, obtain the adaptive script treating the router that adaptive router is corresponding, and the adaptive script of the router of acquisition is sent to the terminal equipment of request.
In addition, in order to ensure that the adaptive script of the router generated is not by counteroffensive, after writing the adaptive script of router, the adaptive script of routers is encrypted.Wherein, the algorithm embodiment of the present invention be encrypted at the adaptive script of routers does not limit this, and user, when the concrete enforcement embodiment of the present invention, can be arranged according to demand.
After the adaptive script of routers is encrypted, terminal equipment obtains the adaptive script of encryption, needs first to be decrypted the adaptive script of encryption.Wherein, concrete deciphering can be carried out according to the algorithm of encryption, and for this, the embodiment of the present invention does not also limit.
Based on said method embodiment, the embodiment of the present invention provides a kind of router adaptive device, as shown in Figure 4, comprising:
Type information acquiring unit 41, treating adaptive router for identifying, treating the type information of adaptive router described in acquisition; This type information is the unique identification information of router, comprises manufacturer and version number; For being different from other routers.
Adaptive script acquiring unit 42, for treating the adaptive script of adaptive router according to described type information acquisition, described adaptive script comprises the functional interface of each function of router, and this functional interface is formed by the page elements abstract package of each function pages; This script is a txt file, a script file comprises the functional interface of each function involved by a model router, a corresponding a kind of function of functional interface, each functional interface is formed by the page elements abstract package of each function pages, and it can be employed program and directly call.
Relevant information acquiring unit 43, for utilizing corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, returns to calling layer using described relevant information as return value.Wherein, this relevant information acquiring unit 43 utilizes corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, described relevant information is returned to calling layer specific implementation as return value is exactly, utilize the logic inside script to carry out parsing to the predetermined function page and obtain data, and the data parsed are returned to caller.Such as obtain wireless messages, its corresponding function interface is get_wan_info, calls this interface get_wan_info just can obtain the relevant informations such as wireless title, password and wireless cipher cipher mode when implementing.
Further, described type information acquiring unit 41 treats adaptive router in identification, described in acquisition when the type information of adaptive router, by following functional module specific implementation, can comprise:
Page info acquisition module, for obtaining the page info treating adaptive router.
Condition code acquisition module, for treating the condition code of adaptive router according to described page info acquisition, described condition code is the information of unique identification different model router.
Type information acquisition module, for according to described condition code querying router feature code table, treat the type information of adaptive router described in acquisition, described router feature code table comprises condition code and type information, condition code and type information one_to_one corresponding.
Further, the conveniently identification of router, the invention process regular meeting is at the attribute information of terminal equipment local maintenance all known routers, and this attribute information comprises the type information, condition code information etc. of router.This condition code information is the peculiar and information of unique identification router of router.The attribute information of this router is stored in terminal equipment this locality by the form of feature code table.The embodiment of the present invention provides a kind of condition code systematic function, and as shown in Figure 5, described router adaptive device also comprises:
Feature code table generation unit 44, treating adaptive router for identifying at described type information acquiring unit 41, before treating the type information of adaptive router, generating described router feature code table described in acquisition.
Further, described feature code table generation unit 44 generates described router feature code table and by following Implement of Function Module, specifically can comprise:
Acquisition module, for the condition code of the type information He this router that obtain different model router.
Memory module, for being stored in tables of data by described type information and the binding of described condition code, forms router feature code table.
Further, after obtaining the type information treating adaptive router, if think the relevant information of the acquisition router corresponding function of automation, then need the adaptive script obtaining router, and then by calling the acquisition of corresponding function Interface realization relevant information in adaptive script.Before performing the adaptive script obtaining corresponding model router, the embodiment of the present invention also generates corresponding adaptive script according to the router of different model, and is preserved by adaptive script, obtains so that convenient when follow-up use.When described adaptive script acquiring unit 42 obtains router script according to type information, different based on adaptive script memory location, by following Implement of Function Module, can be specially:
When the adaptive script of router is only stored in terminal equipment this locality, described adaptive script acquiring unit 42 comprises the first adaptive script acquisition module, for treating the adaptive script of adaptive router in the adaptive script from the storage of terminal equipment this locality according to described type information acquisition;
When the adaptive script of router is only stored in cloud server, described adaptive script acquiring unit 42 comprises the second adaptive script acquisition module, for treating the adaptive script of adaptive router described in obtaining according to described type information in the adaptive script that stores from cloud server;
When namely the adaptive script of router is stored in local terminal side, be stored in cloud server again, and when the content for script that two ends store is consistent, described adaptive script acquiring unit 42 comprises detection module, the 3rd adaptive script acquisition module and the 4th adaptive script acquisition module.Whether described detection module, for existing adaptive script corresponding to described type information according in the adaptive script of described type information inquiry terminal equipment this locality storage; Described 3rd adaptive script acquisition module, during for existing on adaptive script corresponding to described type information in the adaptive script storage of terminal equipment this locality being detected, described in obtaining according to described type information from the adaptive script that cloud server stores, treat the adaptive script of adaptive router; Described 4th adaptive script acquisition module, for detect there is not adaptive script corresponding to described type information in the adaptive script that terminal equipment this locality stores time, treat the adaptive script of adaptive router described in obtaining according to described type information from the adaptive script that terminal equipment this locality stores.
Further, as shown in Figure 6, this router adaptive device also comprises:
Adaptive script generation unit 45, before treating the adaptive script of adaptive router at described adaptive script acquiring unit according to described type information acquisition, generates the adaptive script of router.
Wherein, described adaptive script generation unit 45 by following Implement of Function Module, specifically can comprise when generating the adaptive script of router:
Acquisition module, for obtaining the router of different model;
Analysis module, analyzes the page of these router all functions respectively for the router for often kind of model, obtain the page elements of each page;
Abstract package module, for abstract according to the described page elements of often kind of function and be packaged into corresponding functional interface, obtain a kind of adaptive script of model router, the page elements of the router identical function of different model is abstract and be packaged into unified functional interface.Wherein, page elements is abstract and when being packaged into corresponding functional interface, can adopt but be not limited to Lua language and realize.Certain use Lua carries out writing of the adaptive script of router, it is only a kind of specific embodiment in the embodiment of the present invention, in the specific implementation, the embodiment of the present invention does not limit this, and any one script all can carry out writing of the adaptive script of router.
Further, in order to ensure that the adaptive script of the router generated is not by counteroffensive, after writing the adaptive script of router, needs the adaptive script of routers to be encrypted.After the adaptive script of routers is encrypted, when terminal equipment obtains the adaptive script of encryption, then when using the adaptive script of this encryption, need first to be decrypted the adaptive script of encryption.Concrete.As shown in Figure 7, this router adaptive device also comprises:
Adaptive script encryption unit 46, after generating the adaptive script of router at described adaptive script generation unit 45, is encrypted the adaptive script of the router generated, obtains the adaptive script of the router encrypted.
Adaptive script decryption unit 47, for utilizing before corresponding function interface in adaptive script described in application call obtains the relevant information of router corresponding function at described relevant information acquiring unit 43, the adaptive script of the router of described encryption is decrypted, obtains the adaptive script of the router deciphered.
Further, described relevant information acquiring unit 43 is utilizing the relevant information of corresponding function interface acquisition router corresponding function in adaptive script described in application call, when described relevant information is returned to calling layer as return value, by following Implement of Function Module, specifically can comprise:
Calling module, for the respective page of corresponding function interface requests router in script adaptive described in application call.
Parsing module, parses the relevant information of correspondence for the page info analyzing described respective page.
Information returns module, for the relevant information parsed is returned to calling layer as return value with set form.
It should be noted that, the associated description of each functional module that the router adaptive device that the embodiment of the present invention provides comprises, can the correspondence in reference method embodiment describe, the embodiment of the present invention will repeat no more herein.
Based on said apparatus embodiment, the embodiment of the present invention also provides a kind of terminal equipment, and this terminal equipment comprises above-mentioned router adaptive device.About the associated description of this router adaptive device, can with reference to the description of above-mentioned corresponding part, the embodiment of the present invention will repeat no more herein.
In the embodiment of the present invention, by abstract for the page elements of the router feature page and be encapsulated as adaptive script.When needing the relevant information obtaining a model router predetermined function, under the prerequisite automatically identifying this router model, obtain the adaptive script that this model router is corresponding, by calling the acquisition of the corresponding interface practical function page relevant information of correlation function in this adaptive script, compared with prior art, the embodiment of the present invention can obtain automatically and accurately and conveniently the page info of the router feature page.
Embodiments of the invention also disclose:
A9, method according to claim A8, is characterized in that, to utilize in adaptive script described in application call before corresponding function interface obtains the relevant information of router corresponding function, also comprising:
The adaptive script of the router of described encryption is decrypted, obtains the adaptive script of the router deciphered.
A10, according to claim A1 method, it is characterized in that, utilize corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, described relevant information is returned to calling layer as return value and comprises:
The respective page of corresponding function interface requests router in adaptive script described in application call;
The relevant information of correspondence parses by the page info analyzing described respective page;
The relevant information parsed is returned to calling layer as return value with set form.
A11, according to any one of claim A1-A10 method, it is characterized in that, described adaptive script is what write by Lua.
B13, device according to claim B12, it is characterized in that, described type information acquiring unit comprises:
Page info acquisition module, for obtaining the page info treating adaptive router;
Condition code acquisition module, for treating the condition code of adaptive router according to described page info acquisition, described condition code is the information of unique identification different model router;
Type information acquisition module, for according to described condition code querying router feature code table, treat the type information of adaptive router described in acquisition, described router feature code table comprises condition code and type information, condition code and type information one_to_one corresponding.
B14, device according to claim B13, is characterized in that, also comprise:
Feature code table generation unit, for treating adaptive router in the identification of described type information acquiring unit, before treating the type information of adaptive router described in acquisition, generates described router feature code table.
B15, device according to claim B14, it is characterized in that, described feature code table generation unit comprises:
Acquisition module, for the condition code of the type information He this router that obtain different model router;
Memory module, for described type information and described condition code being bound and being stored in tables of data, forms router feature code table.
B16, device according to claim B12, it is characterized in that, described adaptive script acquiring unit comprises:
First adaptive script acquisition module, for treating the adaptive script of adaptive router according to described type information acquisition in the adaptive script from the storage of terminal equipment this locality;
And/or the second adaptive script acquisition module, for treating the adaptive script of adaptive router described in obtaining according to described type information in the adaptive script that stores from cloud server;
And/or detection module, the 3rd adaptive script acquisition module and the 4th adaptive script acquisition module;
Whether described detection module, for existing adaptive script corresponding to described type information according in the adaptive script of described type information inquiry terminal equipment this locality storage;
Described 3rd adaptive script acquisition module, during for existing on adaptive script corresponding to described type information in the adaptive script storage of terminal equipment this locality being detected, described in obtaining according to described type information from the adaptive script that cloud server stores, treat the adaptive script of adaptive router;
Described 4th adaptive script acquisition module, for detect there is not adaptive script corresponding to described type information in the adaptive script that terminal equipment this locality stores time, treat the adaptive script of adaptive router described in obtaining according to described type information from the adaptive script that terminal equipment this locality stores.
B17, device according to claim B16, is characterized in that, also comprise:
Adaptive script generation unit, before treating the adaptive script of adaptive router at described adaptive script acquiring unit according to described type information acquisition, generates the adaptive script of router.
B18, device according to claim B17, it is characterized in that, described adaptive script generation unit comprises:
Acquisition module, for obtaining the router of different model;
Analysis module, analyzes the page of these router all functions respectively for the router for often kind of model, obtain the page elements of each page;
Abstract package module, for according to function by abstract for described page elements and be packaged into corresponding functional interface, obtain a kind of adaptive script of model router, the page elements of the router identical function of different model is abstract and the functional interface be packaged into is identical.
B19, device according to claim B18, is characterized in that, also comprise:
Adaptive script encryption unit, after generating the adaptive script of router at described adaptive script generation unit, is encrypted the adaptive script of the router obtaining encrypting to the adaptive script of the router generated.
B20, device according to claim B19, is characterized in that, also comprise:
Adaptive script decryption unit, for utilizing before corresponding function interface in adaptive script described in application call obtains the relevant information of router corresponding function at described page info acquiring unit, the adaptive script of the router of described encryption is decrypted, obtains the adaptive script of the router deciphered.
B21, device according to claim B12, it is characterized in that, described relevant information acquiring unit comprises:
Calling module, for the respective page of corresponding function interface requests router in script adaptive described in application call;
Parsing module, parses the relevant information of correspondence for the page info analyzing described respective page;
Information returns module, for the relevant information parsed is returned to calling layer as return value with set form.
B22, device according to any one of claim B12-B21, it is characterized in that, described adaptive script is what write by Lua.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
Be understandable that, the correlated characteristic in said method and device can reference mutually.In addition, " first ", " second " in above-described embodiment etc. are for distinguishing each embodiment, and do not represent the quality of each embodiment.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In specification provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary compound mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions of the some or all parts in router adaptation method, device and the terminal equipment that microprocessor or digital model processor (DSP) can be used in practice to realize according to the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more model can be had.Such model can be downloaded from internet website and obtain, or provides in carrier model, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (10)

1. a router adaptation method, is characterized in that, comprising:
Adaptive router is treated in identification, treats the type information of adaptive router described in acquisition;
Treat the adaptive script of adaptive router described in obtaining according to described type information, described adaptive script comprises the functional interface of each function of router, and this functional interface is formed by the page elements abstract package of each function pages;
Utilize corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, described relevant information is returned to calling layer as return value.
2. method according to claim 1, is characterized in that, identifies and treats adaptive router, treat that the type information of adaptive router comprises described in acquisition:
Obtain the page info treating adaptive router;
Treat the condition code of adaptive router described in obtaining according to described page info, described condition code is the information of unique identification different model router;
According to described condition code querying router feature code table, treat the type information of adaptive router described in acquisition, described router feature code table comprises condition code and type information, condition code and type information one_to_one corresponding.
3. method according to claim 2, is characterized in that, treats adaptive router in identification, before treating the type information of adaptive router, also comprises described in acquisition:
Generate described router feature code table.
4. method according to claim 3, is characterized in that, generates described router feature code table and comprises:
Obtain the type information of different model router and the condition code of this router;
Described type information and described condition code bound and is stored in tables of data, forming router feature code table.
5. method according to claim 1, is characterized in that, treats that the adaptive script of adaptive router comprise described in obtaining according to described type information:
The adaptive script of adaptive router is treated described in obtaining according to described type information from the adaptive script that terminal equipment this locality stores;
Or treat the adaptive script of adaptive router described in obtaining according to described type information from the adaptive script that cloud server stores;
Or whether there is adaptive script corresponding to described type information according in the adaptive script that described type information inquiry terminal equipment this locality stores, if do not exist, treat the adaptive script of adaptive router described in then obtaining according to described type information from the adaptive script that cloud server stores, if exist, described in obtaining according to described type information from the adaptive script that terminal equipment this locality stores, treat the adaptive script of adaptive router.
6. method according to claim 5, is characterized in that, before treating the adaptive script of adaptive router, also comprises according to described type information described in obtaining:
Generate the adaptive script of router.
7. method according to claim 6, is characterized in that, the adaptive script of described generation router comprises:
Obtain the router of different model;
Router for often kind of model analyzes the page of these router all functions respectively, obtains the page elements of each page;
According to function by abstract for described page elements and be packaged into corresponding functional interface, obtain a kind of adaptive script of model router, the page elements of the router identical function of different model is abstract and the functional interface be packaged into is identical.
8. method according to claim 7, is characterized in that, after the adaptive script generating router, also comprises:
The adaptive script of the router generated is encrypted, obtains the adaptive script of the router encrypted.
9. a router adaptive device, is characterized in that, comprising:
Type information acquiring unit, treating adaptive router for identifying, treating the type information of adaptive router described in acquisition;
Adaptive script acquiring unit, for treating the adaptive script of adaptive router according to described type information acquisition, described adaptive script comprises the functional interface of each function of router, and this functional interface is formed by the page elements abstract package of each function pages;
Relevant information acquiring unit, for utilizing corresponding function interface in adaptive script described in application call to obtain the relevant information of router corresponding function, returns to calling layer using described relevant information as return value.
10. a terminal equipment, is characterized in that, comprises router adaptive device as claimed in claim 9.
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 true CN104301139A (en) 2015-01-21
CN104301139B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016045595A3 (en) * 2014-09-28 2016-05-19 北京奇虎科技有限公司 Router adaptation method and device, and terminal device
CN106713004A (en) * 2016-07-12 2017-05-24 腾讯科技(深圳)有限公司 Router adaptation method and system
CN106714161A (en) * 2016-06-29 2017-05-24 腾讯科技(深圳)有限公司 Method for cutting off network connection of unauthorized mobile terminal, equipment and system
CN107094089A (en) * 2016-12-20 2017-08-25 腾讯科技(深圳)有限公司 A kind of network management, relevant device and system
CN110392375A (en) * 2018-04-18 2019-10-29 腾讯科技(深圳)有限公司 WiFi network channel amending 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
CN111884938A (en) * 2020-06-30 2020-11-03 海尔优家智能科技(北京)有限公司 Router information acquisition method and device
CN115766429A (en) * 2022-11-04 2023-03-07 珠海格力电器股份有限公司 Matching method and device of system and edge computing gateway

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887362B (en) * 2021-01-08 2023-03-10 重庆锐明信息技术有限公司 Equipment access method, equipment access device and server

Citations (4)

* 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
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 (1)

* 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

Patent Citations (4)

* 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
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

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016045595A3 (en) * 2014-09-28 2016-05-19 北京奇虎科技有限公司 Router adaptation method and device, and terminal device
CN106714161A (en) * 2016-06-29 2017-05-24 腾讯科技(深圳)有限公司 Method for cutting off network connection of unauthorized mobile terminal, equipment and system
CN106713004A (en) * 2016-07-12 2017-05-24 腾讯科技(深圳)有限公司 Router adaptation method and system
CN106713004B (en) * 2016-07-12 2022-02-18 腾讯科技(深圳)有限公司 Router adaptation method and system
CN107094089A (en) * 2016-12-20 2017-08-25 腾讯科技(深圳)有限公司 A kind of network management, relevant device and system
CN107094089B (en) * 2016-12-20 2020-06-16 腾讯科技(深圳)有限公司 Network management method, related equipment and system
CN110392375A (en) * 2018-04-18 2019-10-29 腾讯科技(深圳)有限公司 WiFi network channel amending method, terminal, server and storage medium
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
CN111884938A (en) * 2020-06-30 2020-11-03 海尔优家智能科技(北京)有限公司 Router information acquisition method and device
CN111884938B (en) * 2020-06-30 2022-12-30 海尔优家智能科技(北京)有限公司 Router information acquisition method and device
CN115766429A (en) * 2022-11-04 2023-03-07 珠海格力电器股份有限公司 Matching method and device of system and edge computing gateway

Also Published As

Publication number Publication date
WO2016045595A2 (en) 2016-03-31
CN104301139B (en) 2017-12-01
WO2016045595A3 (en) 2016-05-19

Similar Documents

Publication Publication Date Title
CN104301139A (en) Router adaptation method, device and terminal equipment
US10133870B2 (en) Customizing a security report using static analysis
CN106778288B (en) A kind of method and system of data desensitization
KR101213916B1 (en) Method and system for obfuscating data structures by deterministic natural data substitution
US8060414B1 (en) Encoding and decoding of product properties in a uniform resource locator
CN110414261A (en) A kind of data desensitization method, device, equipment and readable storage medium storing program for executing
CN105590051B (en) Trusted application for credible performing environment generates and installation method
CN104503745B (en) A kind of method and apparatus generated using channel packet
CN105303112B (en) The detection method and device of component call loophole
JP2020531975A (en) A device that provides a set of cryptographically protected, filtered, and sorted transaction datasets for blockchain links.
CN106462677A (en) Optimizing and protecting software
CN109145235B (en) Method and device for analyzing webpage and electronic equipment
US9438609B2 (en) Device verification prior to registration
TW201445355A (en) Protecting data
US20140250429A1 (en) Code analysis for simulation efficiency improvement
US20150244737A1 (en) Detecting malicious advertisements using source code analysis
CN106970820A (en) Code storage method and code storage
CN104601736A (en) Method and device for realizing short uniform resource locator (URL) service
CN106326691B (en) Implementation method, device and server for encryption and decryption function
CN105939284B (en) The matching process and device of message control strategy
CN108762767A (en) Using dissemination method, device and computer readable storage medium
CN106326099B (en) A kind of method, apparatus and electronic equipment for program tracking
CN109960509A (en) Method, device, computing device and computer storage medium for application reinforcement
CN105511935B (en) The acquisition methods and device of resource index value
CN112230963B (en) Method, device, computer equipment and storage medium for repairing security vulnerabilities

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