Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a flowchart illustrating a keyword search method according to an embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides a keyword search method, including:
step 101, a terminal sends a search query request to a Domain Name System (DNS) server through network access equipment, wherein the search query request comprises a keyword input by a user through a browser address bar connected with the terminal;
step 102, when the network access device receives a hypertext transfer Protocol (HTTP) request sent by a terminal, sending the HTTP request to a search server, wherein the HTTP request contains the keywords;
103, the search server queries a database according to the HTTP request and sends a query result to the terminal through the network access equipment;
and step 104, the terminal receives the query result and displays the website data information returned by the query result in the browser.
The network Access device in the embodiment of the present invention may be a switch, a router, a wireless Access Point (Access Point; hereinafter, referred to as AP) or a gateway server. When a user inputs a certain keyword through a browser address bar of a connection terminal (any terminal with browser and internet access functions such as a computer, a mobile phone or a tablet computer), the terminal sends a search query request containing the keyword to a DNS server through network access equipment. Generally, when a keyword input by a user in a browser address bar is not a standard domain name (the standard domain name is a website of a website to be accessed), a DNS server returns a query failure response to a terminal through a network access device, and after the terminal receives the query failure response returned by the DNS server, the terminal sends an HTTP request containing the keyword to a third-party common search website or other websites through the network access device. In the embodiment of the invention, when the network access equipment receives the HTTP request, the HTTP request is judged to be the request initiated by the terminal after the domain name inquiry is failed, the HTTP request is directly sent to the search server, the search server inquires in the database to obtain the inquiry result matched with the keyword, and the inquiry result is sent to the terminal through the network access equipment. And the terminal receives and displays the website data information returned by the query result in the browser.
The embodiment of the invention puts the analysis flow of the domain name on the network access equipment and the remote computer, is transparent to the user, and the user does not need to install any additional plug-in or client on the terminal.
According to the keyword search method provided by the embodiment of the invention, after the DNS server fails to search, the network access equipment sends the search query request to the search server so as to obtain the query result from the search server, thereby providing a simpler keyword search mode and providing more optimized experience and service for users.
FIG. 2 is a flowchart illustrating a keyword search method according to another embodiment of the present invention. As shown in fig. 2, based on the foregoing embodiment, the HTTP request sent by the terminal may further include an Identity (Identity; hereinafter, abbreviated as ID) of the terminal and browser-User Agent (User-Agent; hereinafter, abbreviated as UA) information, and then step 103 may include:
step 201, the search server performs combined query according to the keyword, the ID information of the terminal and the UA information of the browser, if the query result is obtained, step 204 is executed, otherwise, step 202 is executed;
step 202, performing combined query according to the keyword and the ID information of the terminal, if a query result is obtained, executing step 204, otherwise, executing step 203;
step 203, inquiring according to the keywords to obtain an inquiry result;
and step 204, the search server sends the query result to the terminal through the network access equipment.
In the embodiment of the invention, a large amount of website information corresponding to the keywords can be stored in the search server, the information source is to obtain a large amount of various website page data on the internet through a network data capture system of the search server, analyze the keywords in the websites and finally form the keywords and the corresponding data of the websites through a series of algorithm operations. The ID information of the terminal is a unique identification code fixed in the terminal, when the terminal sends a search query request to the search server, the terminal simultaneously contains key words, the ID information of the terminal and UA information of a browser, and the search server forms a hierarchical query relation through the information and finally obtains a query result.
According to the keyword search method provided by the embodiment of the invention, after the DNS server fails to search, the network access equipment sends the search query request to the search server so as to obtain the query result from the search server, thereby providing a simpler keyword search mode and providing more optimized experience and service for users.
Further, in the method embodiment provided by the present invention, the query result received by the terminal may include a website page related to the above keyword, and the website page is displayed in a home page of a browser of the terminal.
Still further, the query result received by the terminal may further include a toolbar displayed in the browser home page, and the toolbar may include: a keyword input box, a search button, a recommended website button of related keywords, a self-defined keyword entry button, a hidden button, a login button and a registration button. The keyword input box is used for re-inputting the keywords; the search button is used for displaying a search engine page in a main page of the browser after clicking, and the search engine page is provided by default by the browser or provided by a search server; the recommended website button of the related keyword is used for displaying search content related to the keyword in a main page of the browser after clicking; the user-defined keyword entry button is used for editing a database of the search server after clicking, and self-defining a website address corresponding to the keyword; the hidden button is used for hiding the toolbar after clicking; the login button is used for logging in the search server after clicking; and the registration button is used for registering and logging in the search server after clicking.
In the keyword search method provided by the embodiment of the invention, the query result returned by the search server can modify the returned website data through the network access equipment. For example, a toolbar is inserted at the top of the browser main page, when the user is satisfied with the query result, the user can continue to browse the web page, and when the user is not satisfied with the query result, the user can make more selections on the toolbar. For example, a keyword may be re-entered in a keyword entry box for searching; or clicking a search button, and searching the traditional search engine for the keywords again by adopting a search engine page provided by a browser by default or a search server; the recommended website buttons of the related keywords can be directly clicked to inquire the information related to the keywords, and if the keywords are 'hundredth', the user is likely to be interested in 'hundredth encyclopedia'; the user can click a custom keyword entry button, enter a database of the search server, and perform custom editing on the keyword and the corresponding website address, for example, the user can set the 'Baidu' to www.google.com, so that the user can directly enter www.google.com instead of www.baidu.com when accessing the 'Baidu' under the device provided by the embodiment of the invention; the user can click the hidden button to hide the toolbar, and the toolbar is displayed by clicking the button again; a login button can be clicked, when the user does not log in the search server, the login button can be displayed so that the user can log in, and when the user logs in the search server, the button can be replaced by a user name; and a registration button can be clicked to quickly register and log in the search server, and the keyword result can be customized after logging in. Through the analysis of the clicking behavior of the user on the toolbar, the result of the keywords of the user can be analyzed and optimized, so that the algorithm of the whole system is improved, and good user experience is achieved.
Meanwhile, the network access equipment can be operated by a user to perform machine learning, whether the user continues to click the search button on the toolbar provided by the embodiment of the invention after reaching the target website is analyzed, and if a large number of users do not click the search button, the result of the user is satisfied; if the user continues to use the search button, indicating that the user is not satisfied with the results and needs to make corrections, the correction data may be selected from the results that the user has searched again. The more correction data a user uses, the closer the result most users are satisfied with. After the same user uses the keyword search method of the embodiment of the invention in a large amount, the system records the behavior characteristics of the user, for example, if the user inputs 'green wave' but accesses 'green wave microblog' after entering every time, the system automatically enters 'green wave microblog' after the user inputs 'green wave' for a plurality of times.
FIG. 3 is a block diagram of a keyword search system according to an embodiment of the present invention. As shown in fig. 3, an embodiment of the present invention provides a keyword search system, including: a terminal 31, a network access device 32, and a search server 33; the terminal 31 is configured to send a search query request to the DNS server through the network access device 32, where the search query request includes a keyword input by a user through a browser address bar connected to the terminal 31; when receiving the HTTP request sent by the terminal 31, the network access device 32 sends the HTTP request to the search server 33, where the HTTP request includes the keyword; the search server 33 performs database query according to the HTTP request, and transmits a query result to the terminal 31 through the network access device 32; when the terminal 31 receives the inquiry result, the website data information returned by the inquiry result is displayed in the browser.
The network access device 32 in the embodiment of the present invention may be a switch, a router, a wireless AP, or a gateway server. When a user inputs a keyword through a browser address bar connected to the terminal 31 (which may be any terminal having a browser and a web function, such as a computer, a mobile phone, or a tablet computer), the terminal 31 sends a search query request containing the keyword to the DNS server through the network access device 32. Generally, when the keyword input by the user in the browser address bar is not a canonical domain name (the canonical domain name is a website of a website to be accessed), the DNS server will return a query failure response to the terminal 31 through the network access device 32, and after receiving the query failure response returned by the DNS server, the terminal 31 will send an HTTP request containing the keyword to a third-party general search website or other websites through the network access device 32. In the embodiment of the present invention, when the network access device 32 receives the HTTP request, it determines that the HTTP request is a request initiated after the terminal 31 fails to perform domain name query, and directly sends the HTTP request to the search server 33, and the search server 33 performs query in the database to obtain a query result matching the keyword, and sends the query result to the terminal 31 through the network access device 32. The terminal 31 receives and displays the website data information returned by the query result in the browser.
According to the keyword search system provided by the embodiment of the invention, after the DNS server fails to search, the network access equipment sends the search query request to the search server so as to obtain the query result from the search server, thereby providing a simpler keyword search mode and providing more optimized experience and service for users.
FIG. 4 is a system diagram of another embodiment of the keyword search system of the present invention. As shown in fig. 4, in the keyword search system provided by the present invention based on the above system embodiment, the HTTP request sent by the terminal 31 may further include ID information of the terminal 31 and browser UA information, and the search server 33 includes: a first query module 41, a second query module 42 and a third query module 43. The first query module 41 is configured to perform a joint query according to the keyword, the ID information of the terminal 31, and the information of the browser UA; the second query module 42 is configured to perform a joint query according to the keyword and the ID information of the terminal when the first query module 41 does not obtain the query result; the third query module 43 is configured to perform a query according to the keywords to obtain a query result when the second query module 42 does not obtain the query result.
In the embodiment of the present invention, the search server 33 may store a large amount of website information corresponding to the keywords, and the information source is to obtain a large amount of various website page data on the internet through the network data capturing system of the search server, analyze the keywords in the website, and finally form the keywords and the corresponding data of the website through a series of algorithm operations. The ID information of the terminal 31 is a unique identification code fixed in the terminal 31, and when the terminal 31 sends a search query request to the search server 33, the search server 33 simultaneously includes a keyword, the terminal ID information, and the browser UA information, and the search server 33 forms a hierarchical query relationship through these information to finally obtain a query result.
According to the keyword search system provided by the embodiment of the invention, after the DNS server fails to search, the network access equipment sends the search query request to the search server so as to obtain the query result from the search server, thereby providing a simpler keyword search mode and providing more optimized experience and service for users.
Further, in the system embodiment provided by the present invention, the query result received by the terminal 31 includes: a web page related to the above keyword, which is displayed in the home page of the browser of the terminal 31.
Still further, the query result received by the terminal 31 may further include a toolbar displayed in the browser home page, the toolbar including: a keyword input box, a search button, a recommended website button for related keywords, a custom keyword entry button, a hidden button, a login button, and a registration button. The keyword input box is used for re-inputting the keywords; the search button is used for displaying a search engine page in the main page of the browser after clicking, and the search engine page is provided by default by the browser or provided by the search server 33; the recommended website button of the related keyword is used for displaying search content related to the keyword in a main page of the browser after clicking; the custom keyword entry button is used for editing the database of the search server 33 after clicking, and customizing a website address corresponding to the keyword; the hidden button is used for hiding the toolbar after clicking; the login button is used for logging in the search server 33 after clicking; the registration button is used to register and log in the search server 33 after clicking.
In the embodiment of the present invention, the search server 33 may be provided independently, or may be provided in the network access device 32.
The functions of the buttons of the toolbar in the embodiment of the system are described in detail in the above method embodiment, and are not described herein again.
According to the keyword search system provided by the embodiment of the invention, after the DNS server fails to search, the network access equipment sends the search query request to the search server so as to obtain the query result from the search server, thereby providing a simpler keyword search mode and providing more optimized experience and service for users.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.