A kind of method for pushing and router of APP download link
Technical field
This application involves network communication technology field, in particular to a kind of APP downloading method for pushing and router.
Background technique
Many intelligent router factory commercial cities are that its product increases APP function at present, and user can pass through mobile phone etc.
Mobile terminal administration router undoubtedly allows user more easily use router, and the cell phone application branch of router in this way
Long-range management is held, user does not have to the be in information that can check router and the download function for enabling router, so that intelligence
The utilization rate of energy router is higher.
It when user is by PC or mobile phone access router is realized by http protocol, HTTP request message is mainly by asking
Ask row, request header, request 3 part of text composition.Request row is made of between three requesting method, URL and protocol version
By space-separated;Request header is that request message is added to some additional informations, (with receiving the server of request comprising Host
Location), the application name of request (send), Connection (specifying attribute relevant to connection), Accept-Charset
(coded format that notice server-side can be sent), Accept-Encoding (the data compression lattice that notice server-side can be sent
Formula), Accept-Language (notice server-side can send language);Request text is that optional part includes to need to transmit
Data.
The mode that user downloads router mobile terminal APP at present either scans the two of PC end page face often by official website
It ties up what code was realized, needs to log on to official website by official website downloading and then need for APP to imported into mobile phone, by scanning PC end page
The two dimensional code in face, it is necessary first to log on to router using PC, then be scanned with mobile phone, these obtain the mode of APP all one
Determine to increase the complexity that user uses in degree.
Summary of the invention
The method for pushing and router for being designed to provide a kind of APP download link of the embodiment of the present application, to user
When passing through mobile terminal accessing router homepage, display downloading mobile terminal APP and prompt information, so that user facilitates downloading
Manage the APP of the router.
The method for pushing and router of a kind of APP download link provided by the embodiments of the present application are achieved in that
A kind of method for pushing of APP download link is suitable for router, comprising:
S1, the router receive request message and progress of the user by the access router homepage of access terminal transmission
Parsing;
S2, corresponding download link address information and prompt information are chosen according to parsing result, feedback arrives the routing
Device homepage is shown.
Preferably, the parsing result includes:
Access the parsing result that terminal is PC;
Access the parsing result that terminal is Android intelligent end;
Access the parsing result that terminal is IOS intelligent end.
Preferably, the access router homepage that the reception user of router described in the step S1 is sent by access terminal
Request message and carry out parsing specifically include:
S11, the request message for obtaining the access router homepage that user is sent by access terminal;
S12, the field information for extracting the request message are parsed and generate parsing result.
Preferably, the field information that the step S12 extracts the request message is parsed and generates parsing result tool
Body includes:
S121, the field information of extraction is saved in websRec structural body;
S122, reading preserve the character string that the websRec structural body of the field information is directed toward;
S123, analysis judgment is carried out to the character string, and generates parsing result.
Preferably, the step S2 chooses corresponding download link address information and prompt information according to parsing result,
Feed back the router homepage carry out display specifically include:
S21, judge the parsing result;
S22, when the parsing result be the end PC parsing result when, then do not obtain APP download link information;
S23, when the parsing result is the result of Android intelligent end, then selection is suitable for android system
APP download link information;
S24, when the parsing result be IOS intelligent end result when, then obtain be suitable for IOS system APP download chain
Connect information.
Preferably, corresponding download link address information is chosen according to parsing result in the step S2 and prompt is believed
Breath, feedback are shown to the router homepage further include:
The router APP download link address information and prompt information that will acquire are loaded into the feedback report of the router
Wen Li is shown in the router homepage.
The embodiment of the present application also provides a kind of routers, comprising:
Receive message unit, for obtaining the request message information of access router homepage;
Analytical unit is connected to the Receive message unit, the request for obtaining to the Receive message unit
Message information is parsed and generates parsing result;
Storage unit, for storing router APP download link information;
Feedback unit is connected to the analytical unit and the storage unit, for raw according to the analytical unit
At the parsing result obtain the router APP download link information from the storage unit and generate feedback message and send
To access terminal.
Preferably, the analytical unit includes:
Extraction module, for extracting the field information of the request message information;
Module is integrated, the extraction module is connected to, the field information for extracting the extraction module saves
To websRec structural body;
Read module, be connected to it is described integrate module, for reading the websRec structure for saving the field information
The character string that body is directed toward;
Parsing module is connected to the read module, and the character string for reading to the read module solves
Analysis, and generate parsing result.
Preferably, the parsing result includes:
Access the parsing result that terminal is PC;
Access the parsing result that terminal is Android intelligent end;
Access the parsing result that terminal is IOS intelligent end.
Preferably, the feedback unit includes:
Judgment module is connected to the analytical unit, judges for the parsing result to the analytical unit
Generate judging result;
Searching module is connected to the judgment module and the storage unit, for what is generated according to the judgment module
The judging result searches from the storage unit and obtains the router APP download link information;
Loading module is connected to the searching module, the router APP downloading for obtaining the searching module
Link information and prompt information are loaded into the feedback message of router.
The method for pushing and router of a kind of APP download link provided by the embodiments of the present application, by access router
The request message of homepage is parsed, and selects the download link address information of router APP in the routing according to parsing result
Device homepage is shown and user is prompted to be downloaded by clicking download link, provides a kind of friend using the router for user
Good interaction is reminded so that user download control the APP of the router only need to can be complete by clicking download link prompt information
The downloading of whole APP improves the user satisfaction of user without voluntarily searching relevant APP information.
Referring to following description and accompanying drawings, specific implementations of the present application are disclosed in detail, specify the original of the application
Reason can be in a manner of adopted.It should be understood that presently filed embodiment is not so limited in range.In appended power
In the range of the spirit and terms that benefit requires, presently filed embodiment includes many changes, modifications and is equal.
The feature for describing and/or showing for a kind of embodiment can be in a manner of same or similar one or more
It uses in a other embodiment, is combined with the feature in other embodiment, or the feature in substitution other embodiment.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, one integral piece, step or component when using herein, but simultaneously
It is not excluded for the presence or additional of one or more other features, one integral piece, step or component.
Detailed description of the invention
Included attached drawing is used to provide that a further understanding of the embodiments of the present application, and which constitute one of specification
Point, for illustrating presently filed embodiment, and with verbal description come together to illustrate the principle of the application.Under it should be evident that
Attached drawing in the description of face is only some embodiments of the present application, for those of ordinary skill in the art, is not paying wound
Under the premise of the property made is laborious, it is also possible to obtain other drawings based on these drawings.In the accompanying drawings:
Fig. 1 is a kind of method for pushing flow diagram of APP download link provided by the embodiments of the present application;
Fig. 2 is the process signal that the request message provided by the embodiments of the present application to access router homepage is handled
Figure;
Fig. 3 is the flow diagram provided by the embodiments of the present application analyzed message;
Fig. 4 is a kind of structural schematic diagram of router provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of the analytical unit of router provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of the feedback unit of router provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The application protection all should belong in technical staff's all other embodiment obtained without making creative work
Range.
The method for pushing flow diagram of a kind of APP download link provided by the embodiments of the present application refering to fig. 1, as schemed institute
Show, a kind of method for pushing of APPA download link provided by the present application, comprising:
S1, the router receive request message and progress of the user by the access router homepage of access terminal transmission
Parsing;
S2, corresponding download link address information and prompt information are chosen according to parsing result, feedback arrives the routing
Device homepage is shown.
In the present embodiment, pass through the request message of the homepage of terminal device access router when router gets user
When, which is parsed, and and the parsing result choose the APP download link address of corresponding different access equipment
Information, and these information are fed back into the router homepage that access terminal carries out and are shown.In the case where a kind of embodiment, when
When accessing the parsing result that terminal is PC, then the present chained address APP is not chosen;When access terminal is Android intelligent end
When parsing result, then the APP download link address for being used for android system is chosen;When the parsing that access terminal is IOS intelligent end
When as a result, then the APP download link address for being used for IOS system is chosen.
Wherein, router described in the step S1 receives asking for the access router homepage that user is sent by access terminal
It seeks message and carries out parsing and specifically include:
S11, the request message for obtaining the access router homepage that user is sent by access terminal;
S12, the field information for extracting the request message are parsed and generate parsing result.
The process signal handled refering to Fig. 2 request message provided by the embodiments of the present application to access router homepage
Scheme, in the present embodiment, user is by being to be realized by http protocol, therefore be based on HTTP when access terminal access router homepage
The request message of agreement is mainly made of request row, request header, request 3 part of text, and wherein request header mainly has:
User-Agent: the browser type of request is generated, Accept: the identifiable content type list of client, Host: request
Host name allows multiple domain names to exist together an IP address, i.e. fictitious host computer.Request data does not use in GET method, but
It is used in POST method.POST method is applicable to the occasion that client fills in list.It is relevant to request data most-often used
Request header be Content-Type and Content-Length.The request report visited when getting user's access router homepage
Text then extracts the information of each field of request header, by parsing to these field informations from the request message.
Refering to the flow diagram provided by the embodiments of the present application analyzed message shown in Fig. 3, step S12 is extracted
The field information of the request message is parsed and generates parsing result and specifically included:
S121, the field information of extraction is saved in websRec structural body;
S122, reading preserve the character string that the websRec structural body of the field information is directed toward;
S123, analysis judgment is carried out to the character string, and generates parsing result.
In the present embodiment, the field information extracted from the request header of request message is added in websRec structural body
It is read out analysis, obtains character string pointed by websRec structural body, wherein the character string letter that different field informations is read
Breath is not also identical, and final acquisition parsing result is not also identical, since character string information is for judging that the type for accessing terminal is believed
Breath, therefore, under a kind of scene of embodiment, when parsing result of the access terminal of the parsing for the end PC, then parsing result
Not obtain APP download link information;When the access terminal of the parsing is the result of Android intelligent end, then knot is parsed
Fruit is the APP download link information that selection is suitable for android system;When the access terminal of the parsing is IOS intelligent end
When as a result, then parsing result is to obtain the APP download link information for being suitable for IOS system.
In the present embodiment, the router APP download link address information and prompt information that finally will acquire are loaded into institute
It states and is shown in the feedback message of router in the router homepage.
Refering to Fig. 4, the embodiment of the present application also provides a kind of routers, comprising:
Receive message unit 1, for obtaining the request message information of access router homepage;
Analytical unit 3 is connected to the Receive message unit 1, for asking to described in Receive message unit acquisition
It asks message information to be parsed and generates parsing result;
Storage unit 2, for storing router APP download link information;
Feedback unit 4 is connected to the analytical unit 3 and the storage unit 2, for according to the analytical unit
3 parsing results generated obtain the router APP download link information from the storage unit 2 and generate feedback message
It is sent to access terminal.
In the present embodiment, when homepage of the user by access terminal access router, then router passes through Receive message
Unit 1 obtains the request message of user's access router homepage, and the request message information obtained by 3 Duis of analytical unit parses
To obtain the terminal type that user accesses terminal, feedback unit 4 then obtains phase from storage unit 2 according to the terminal type of parsing
The download link address and prompt information are generated feedback message information by the APP download link address information of counterpart terminal type
Feed back to access terminal.
Refering to a kind of Fig. 5 structural schematic diagram of the analytical unit of router provided by the embodiments of the present application, institute as shown in the figure
Stating analytical unit includes:
Extraction module 31, for extracting the field of the request message information;
Module 32 is integrated, the extraction module 31 is connected to, the field for extracting the extraction module saves
To websRec structural body;
Read module 33, be connected to it is described integrate module 32, for reading the websRec structure for saving the field
The character string that body is directed toward;
Parsing module 34 is connected to the read module 33, the character string for being read to the read module into
Row parsing, and generate parsing result.
In the present embodiment, after getting the request message of access terminal, then through extraction module 31 from request message
The field information on the message request head of extraction is added to websRec in integrating module 32 by the information for extracting request header
In structural body, the websRec structural body for being added to request header field information is read by read module 33, to obtain its direction
Character string judges the character string by parsing module 34 and generates parsing result.In the present embodiment, the parsing result packet
It includes: the parsing result for being PC when access terminal;Access the parsing result that terminal is Android intelligent end;Access terminal is IOS intelligence
The parsing result at energy end.
Refering to a kind of Fig. 6 structural schematic diagram of the feedback unit of router provided by the embodiments of the present application, as shown, institute
Stating feedback unit includes:
Judgment module 41 is connected to the analytical unit, sentences for the parsing result to the analytical unit
Medium well is at judging result;
Searching module 42 is connected to the judgment module 41 and the storage unit 2, for according to the judgment module 41
The judging result generated searches from the storage unit 2 and obtains the router APP download link information;
Loading module 43 is connected to the searching module 42, the router APP for obtaining the searching module
Download link information and prompt information are loaded into the feedback message of router.
In the present embodiment, judgment module 41 judges the parsing terminal type result of parsing module 34 to obtain the visit
Ask the judging result for the APP download link address information that terminal type should be obtained, then searching module 42 is according to the judgement knot
Fruit searches the corresponding APP download link address information of the access terminal from storage unit 2, is ultimately passed to loading module 43, will
The address information and prompt information are loaded into feedback in feedback message and are shown to access terminal.
Those skilled in the art are supplied to the purpose described to the description of the various embodiments of the application above.It is not
It is intended to exhaustion or be not intended to and limit the invention to single disclosed embodiment.As described above, the application's is various
Substitution and variation will be apparent for above-mentioned technology one of ordinary skill in the art.Therefore, although specifically begging for
Some alternative embodiments are discussed, but other embodiment will be apparent or those skilled in the art are opposite
It is easy to obtain.The application is intended to include all substitutions of the invention discussed herein, modification and variation, and falls in
Other embodiment in the spirit and scope of above-mentioned application.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The application can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer, clothes
Business device computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system, set
Top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including any of the above system or equipment
Distributed computing environment etc..
The application can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group
Part, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage equipment.
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application there are many deformation and
Variation is without departing from spirit herein, it is desirable to which the attached claims include these deformations and change without departing from the application's
Spirit.