WO2017020776A1 - Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword - Google Patents

Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword Download PDF

Info

Publication number
WO2017020776A1
WO2017020776A1 PCT/CN2016/092296 CN2016092296W WO2017020776A1 WO 2017020776 A1 WO2017020776 A1 WO 2017020776A1 CN 2016092296 W CN2016092296 W CN 2016092296W WO 2017020776 A1 WO2017020776 A1 WO 2017020776A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration file
keyword
domain name
terminal device
webpage address
Prior art date
Application number
PCT/CN2016/092296
Other languages
French (fr)
Chinese (zh)
Inventor
孙强
张天翼
Original Assignee
北京金山安全软件有限公司
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 北京金山安全软件有限公司 filed Critical 北京金山安全软件有限公司
Publication of WO2017020776A1 publication Critical patent/WO2017020776A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques

Definitions

  • the present application relates to the field of keywords, and in particular, to a method and an apparatus for acquiring a keyword and performing information recommendation based on the keyword.
  • the existing method for obtaining a keyword obtains a keyword through a search engine.
  • the search engine of the website sends the keyword to the server of the website.
  • the server of the website can obtain the above keywords.
  • this method of obtaining keywords can only obtain keywords input by a user in a search engine website, and users often search through various search engine websites, so the existing keywords for obtaining keywords are not comprehensive enough. Further leads to a reduction in the accuracy and effectiveness of the information provided to the user.
  • the embodiment of the present application discloses a method and an apparatus for acquiring a keyword and performing information recommendation based on the keyword, so that the obtained keyword is more comprehensive, and the information recommended according to the obtained keyword is more accurate.
  • the technical solutions are as follows:
  • An embodiment of the present application provides a method for acquiring a keyword, which is applied to a terminal device, and includes:
  • the obtaining a webpage address of the browser pre-displayed page includes:
  • the method before determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file, the method further includes:
  • the configuration file with the second identification information sent by the server is received; and the locally saved configuration file is replaced with the received configuration file.
  • the application also provides an information recommendation method, which is applied to a server, and includes:
  • a keyword of the pre-displayed page of the terminal device wherein the keyword is a webpage address of the pre-displayed page of the browser, and determining whether the domain name of the obtained webpage address exists in the terminal
  • the local pre-stored configuration file determines the keyword parameter name corresponding to the domain name of the obtained webpage address according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, and from the webpage address And extracting a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding corresponding to the coding mode Method for decoding the extracted parameter values;
  • it also includes:
  • the domain name of the search engine is added to the configuration file, and the keyword parameter name and encoding mode corresponding to the search engine are saved for the domain name of the search engine, and the identification information of the configuration file is updated.
  • it also includes:
  • the domain name, keyword parameter name, or the encoding mode of the search engine changes, the domain name, keyword parameter name, or encoding mode corresponding to the change engine corresponding to the search engine stored in the configuration file is searched;
  • the changed domain name, keyword parameter name or encoding method is used to replace the domain name before the change, the keyword parameter name or the encoding mode, and the identification information of the configuration file is updated.
  • it also includes:
  • it also includes:
  • the configuration file with the second identification information is sent to the terminal device, so that the terminal device replaces the locally saved configuration file with the received configuration file with the second identification information.
  • the embodiment of the present application further provides an apparatus for acquiring a keyword, which is applied to a terminal device, including: an acquiring unit, a determining unit, an extracting unit, and a decoding unit;
  • the obtaining unit is configured to obtain a webpage address of a browser pre-displayed page
  • the determining unit is configured to determine whether a domain name of the webpage address acquired by the acquiring unit exists in a locally pre-stored configuration file
  • the extracting unit is configured to determine, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, a keyword parameter corresponding to the domain name of the obtained webpage address, if the determination result of the determining unit is yes And extracting, from the webpage address, a parameter value corresponding to the keyword parameter name;
  • the decoding unit is configured to respond to a domain name and an encoding method saved according to the configuration file. And determining a coding mode corresponding to the domain name of the webpage address obtained by the acquiring unit, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode to obtain a keyword generated after decoding.
  • the obtaining unit is specifically configured to: obtain, by using an input interface of the browser, a webpage address of the browser pre-displayed page.
  • the method further includes: a first identifier information sending unit and a configuration file replacing unit; wherein
  • the first identifier information sending unit is configured to: before the determining unit determines whether the domain name of the webpage address acquired by the acquiring unit exists in the locally pre-stored configuration file, the first identifier information of the locally pre-stored configuration file Sending to the server, so that the server detects whether the received first identification information is consistent with the second identification information of the configuration file locally stored by the server;
  • the configuration file replacement unit is configured to receive, when the server detects that the received first identification information is inconsistent with the second identification information of the configuration file locally stored by the server, the configuration file that is sent by the server and has the second identification information. ; and replace the locally saved configuration file with the received configuration file.
  • the embodiment of the present application further provides an information recommendation apparatus, which is applied to a server, and includes: a receiving unit, a determining unit, and a recommending unit;
  • the receiving unit is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is a webpage address of the pre-displayed page of the browser, and the obtained webpage address is determined by the terminal device. Whether the domain name exists in the configuration file pre-stored locally by the terminal device, and if yes, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file.
  • the determining unit is configured to determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword;
  • the recommendation unit is configured to send the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information on the page when displaying a page corresponding to the webpage address in.
  • the method further includes: a detecting unit and an adding unit; wherein
  • the detecting unit is configured to detect, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
  • the adding unit is configured to add the domain name of the search engine to the configuration file when the domain name of the search engine does not exist in the currently stored configuration file, and save the keyword corresponding to the search engine for the domain name of the search engine. Parameter name and encoding method, and update the identification information of the configuration file.
  • the method further includes: a searching unit and a replacement unit; wherein
  • the searching unit is configured to: when detecting a domain name, a keyword parameter name, or a coding mode corresponding to the search engine, searching for a domain name, a keyword parameter name, or an encoding method corresponding to the change engine corresponding to the search engine saved in the configuration file. ;
  • the replacing unit is configured to replace the domain name before the change, the keyword parameter name, or the encoding manner by using the changed domain name, the keyword parameter name, or the encoding manner, and update the identifier information of the configuration file.
  • the method further includes: a periodic sending unit, wherein the periodic sending unit is configured to send the locally saved configuration file to the terminal device according to the set update period, so that the terminal device utilizes the received The configuration file replaces the locally pre-stored configuration file.
  • a periodic sending unit configured to send the locally saved configuration file to the terminal device according to the set update period, so that the terminal device utilizes the received The configuration file replaces the locally pre-stored configuration file.
  • the method further includes: a first identifier information receiving unit, a profile detecting unit, and a profile sending unit; wherein
  • the first identifier information receiving unit is configured to receive first identifier information of a configuration file pre-stored locally by the terminal device that is sent by the terminal device;
  • the configuration file detecting unit is configured to detect whether the received first identification information is consistent with the second identification information of the locally stored configuration file
  • the configuration file sending unit is configured to: when the configuration file detecting unit detects that the detection result is inconsistent, send the configuration file that has the second identification information to the terminal device, so that the terminal device adopts the received second identification information.
  • the configuration file replaces the locally saved configuration file.
  • the embodiment of the present application further provides an information recommendation system, including: a terminal device and a server, where
  • the terminal device is configured to acquire a webpage address of a browser pre-displayed page; determine the acquired Whether the domain name of the webpage address exists in the locally stored configuration file; if yes, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, And extracting a parameter value corresponding to the keyword parameter name from the webpage address; determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and adopting Decoding mode corresponding to the coding mode decodes the extracted parameter values to obtain keywords generated after decoding;
  • the server is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, and determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword; The information is sent to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  • the embodiment of the present application further provides a terminal device, including: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, and the processor and the memory are disposed on the circuit board.
  • a power circuit for powering various circuits or devices of the terminal device; a memory for storing executable program code; and a processor for executing a program corresponding to the executable program code by reading executable program code stored in the memory, A method for performing the above-described acquisition of keywords.
  • the embodiment of the present application further provides an application for executing the foregoing method for acquiring a keyword at runtime.
  • the embodiment of the present application further provides a storage medium for storing an application, and the application is configured to execute the foregoing method for acquiring a keyword at runtime.
  • the embodiment of the present application further provides a server, including: a casing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the casing, and the processor and the memory are disposed on the circuit board.
  • a power circuit for powering various circuits or devices of the server; a memory for storing executable program code; and a processor for executing a program corresponding to the executable program code by reading executable program code stored in the memory to use Perform the above information recommendation method.
  • the embodiment of the present application further provides an application for executing the above information recommendation method at runtime.
  • the embodiment of the present application further provides a storage medium for storing an application, where the application is configured to execute the above information recommendation method at runtime.
  • the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding.
  • the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the key input by the user in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address.
  • the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, and further, the information recommended to the user according to the keywords is more Accurate, the user feels better.
  • FIG. 1 is a flowchart of a method for acquiring a keyword according to an embodiment of the present application
  • FIG. 2 is another flowchart of a method for acquiring a keyword according to an embodiment of the present application
  • FIG. 3 is a flowchart of an information recommendation method according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring a keyword according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of an apparatus for information recommendation according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
  • a method for obtaining a keyword provided by the embodiment of the present application is briefly introduced.
  • the method is applied to a terminal device, and may include the following steps:
  • the method for obtaining a keyword is applied to a terminal device, where a browser client is installed, and the user can input a keyword through an input box in a browser client. Search for the content you want; you can also click on the shortcut entry in the browser interface to search accordingly.
  • the terminal device may be: a mobile terminal, a tablet computer, a notebook computer and the like, and of course, the terminal may also be a non-portable terminal such as a desktop computer or a digital television.
  • the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the key input by the user in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address.
  • the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, and further, the information recommended to the user according to the keywords is more Accurate, the user feels better.
  • FIG. 1 is a flowchart of a method for acquiring a keyword according to an embodiment of the present application, where the method is applied to a terminal device. The steps can be included:
  • the terminal device acquires a webpage address of a browser pre-displayed page.
  • the browser pre-display page is: a page that the browser is about to display but has not yet displayed; in practice, when the user performs related search, the corresponding search engine will splicing the content input by the user according to the respective splicing rules.
  • the browser sends the network request to the corresponding server, and the server feeds back the corresponding webpage address according to the network request, and the browser displays the information corresponding to the webpage address fed back by the server in the search result page;
  • the pre-display page is consistent with the display content in the subsequent search results page.
  • the user inputs the search content in the browser, and the browser sends the network request including the search content to the corresponding server, and the server feeds back the corresponding webpage address according to the network request, and the browser displays the corresponding webpage address.
  • the page was previously intercepted by the page.
  • the terminal device can monitor the webpage address received by the browser in real time and obtain it in time, so that the obtained webpage address is relatively comprehensive; in addition, the webpage address received by the browser can be periodically monitored and acquired, so that although the webpage address is not obtained, However, due to the periodic acquisition, the memory consumption of the terminal device can be relatively reduced, and the web address obtained by the prior art is more.
  • the browser needs to invoke the corresponding input interface of the browser when receiving the webpage address fed back by the server.
  • the obtaining the webpage address of the pre-displayed page of the browser may include:
  • the corresponding input interface such as OnNavigate, can obtain the webpage address of the browser pre-displayed page through the input interface of the browser, so that the obtained webpage address is more accurate and more comprehensive.
  • the terminal device determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, performs step S103; if not, does not process;
  • the configuration file is generated by the server corresponding to the browser, and can be sent to the terminal device, and then saved in the terminal device.
  • the configuration file in the embodiment of the present application stores: a domain name of each search engine and a keyword parameter name corresponding to each search engine and a corresponding encoding manner.
  • Each of the search engines is accessible to the browser, and each search engine has its own corresponding domain name, keyword parameter name, and encoding method.
  • the domain name of "Baidu" is Http://www.baidu.com/s?
  • the keyword parameter name is wd, the encoding method is utf-8;
  • the domain name of "360" is http://www.so.com/s?
  • the keyword parameter is named q and the encoding method is GBK.
  • the domain name of the obtained webpage address is compared with the search engine domain name in the locally pre-stored configuration file, and then it is determined whether the obtained webpage address exists in the configuration file. Domain name.
  • the configuration file 1 is pre-stored locally, and the details are as follows:
  • step S103 is performed; if it does not exist, no processing is performed.
  • the terminal device determines, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracts the keyword parameter from the webpage address.
  • the corresponding parameter value of the name
  • the obtaining may be determined according to the correspondence between the domain name and the keyword parameter name saved in the configuration file.
  • the keyword parameter name corresponding to the domain name of the webpage address and further extracting the parameter value corresponding to the keyword parameter name in the webpage address according to the keyword parameter name.
  • the extraction of the domain name, the keyword parameter name, and the parameter value of the webpage address belongs to the prior art, and details are not described herein again.
  • step S102 determines that the domain name www.baidu.com/s exists? According to the domain name in the configuration file www.baidu.com/s? Corresponding keywords
  • the parameter name wd can be used to find the wd in the webpage address, and then extract the parameter value huawei%20%E6%89%8B%E6%9C%BA after the wd.
  • the terminal device determines, according to the correspondence between the domain name and the encoding mode saved in the configuration file, an encoding mode corresponding to the domain name of the obtained webpage address, and performs the extracted parameter value by using a decoding manner corresponding to the encoding mode. Decoding, the keywords generated after decoding are obtained.
  • the obtained webpage may be determined according to the correspondence between the domain name and the encoding mode saved in the configuration file.
  • step S102 determines that the domain name www.baidu.com/s exists? According to the domain name in the configuration file www.baidu.com/s?
  • Corresponding coding mode utf-8 determines the corresponding decoding mode, and uses the decoding method to decode the parameter value huawei%20%E6%89%8B%E6%9C%BA extracted in step S103 to obtain decoding.
  • the generated keyword "huawei mobile phone".
  • the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding.
  • the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address.
  • Keywords the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
  • FIG. 2 is another flowchart of a method for obtaining a keyword according to an embodiment of the present application. The following steps are added before the step S102 of the embodiment shown in FIG. 1 :
  • the terminal device sends the first identifier information of the locally pre-stored configuration file to the server.
  • the first identifier information may be the version information of the configuration file or the number carried by the configuration file, which is reasonable.
  • the server is responsible for generating the configuration file, so the server stores the most current configuration file.
  • the terminal device may periodically send the first identifier information of the locally stored configuration file to the server, and may also send the first identifier information to the server according to other trigger conditions set by a person skilled in the art. This embodiment of the present application does not limit this.
  • step S202 After receiving the first identifier information, the server detects whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file; if not, step S203 is performed; if yes, go directly to step S102. ;
  • the server receives the first identifier information sent by the terminal device in step S201, and compares the first identifier information with the second identifier information of the locally stored configuration file, and it is emphasized that the comparison must be performed according to the same type. For example, if the first identification information is version information, it must also be compared with the version information of the configuration file stored by the server, so that it is comparable, and it can be determined whether the two configuration files are consistent.
  • the server performs the step of transmitting the configuration file with the second identification information to the terminal device; when the server is consistent, the server does not perform any processing, and the terminal device directly performs the determination whether the domain name of the obtained webpage address exists in the locally pre-stored configuration. The steps in the file.
  • the server sends the configuration file with the second identification information to the terminal device.
  • the server detects that the received first identifier information is inconsistent with the second identifier information of the locally stored configuration file, the configuration file that has the second identifier information is sent to the terminal device.
  • the terminal device receives the configuration file that is sent by the server and has the second identification information, and replaces the locally saved configuration file with the received configuration file.
  • the terminal device receives the configuration file with the second identification information, and replaces the locally pre-stored first identification information with the configuration file. Configuration file.
  • the configuration file saved by the terminal device is updated in time, so that when the domain name of the obtained webpage address is determined to exist in the pre-stored configuration file, a greater matching degree can be obtained, and the comparison result is more accurate.
  • FIG. 3 is a flowchart of a method for recommending information provided by an embodiment of the present application.
  • the information recommendation method is applied to a server, and may include the following steps:
  • the server receives a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is that the terminal device acquires a webpage address of the pre-displayed page of the browser, and determines whether the domain name of the obtained webpage address exists.
  • the local pre-stored configuration file determines the keyword parameter name corresponding to the domain name of the obtained webpage address according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, and from the webpage address And extracting a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding corresponding to the coding mode Method for decoding the extracted parameter values;
  • the above server is a server corresponding to the browser.
  • step S104 After the keyword is obtained in step S104, the obtained keyword is sent to the server, and correspondingly, the server receives the keyword.
  • the server receives the keyword.
  • the server determines, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword.
  • the recommendation information pre-associated with the keyword is locally searched, and the found recommendation information is determined as the recommendation information corresponding to the keyword.
  • the server sends the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  • the recommendation information is sent to the terminal device, and correspondingly, the terminal device receives the recommendation information, and when the pre-display page is displayed, the recommendation information is simultaneously displayed at the same time. On the interface.
  • a new search engine may be generated or some configuration information of the original search engine may be changed, so that the server needs to update the local configuration file in real time or periodically.
  • the server can be added to the configuration file.
  • the server can replace the original configuration information with the new configuration information.
  • the steps to change the original content in the configuration file are:
  • the domain name, keyword parameter name, or the encoding mode of the search engine changes, the domain name, keyword parameter name, or encoding mode corresponding to the change engine corresponding to the search engine stored in the configuration file is searched;
  • the changed domain name, keyword parameter name or encoding method is used to replace the domain name before the change, the keyword parameter name or the encoding mode, and the identification information of the configuration file is updated.
  • the server when the server detects that any one of the domain name, the keyword parameter name, or the encoding mode of the search engine changes, the server searches for a domain name, a keyword parameter name, or a coding mode corresponding to the search engine in the currently stored configuration file; And replace the domain name, keyword parameter name or encoding method before the change with the changed domain name, keyword parameter name or encoding mode.
  • the configuration file is no longer Same as the original configuration file, you can update the identification information of the original configuration file.
  • the server can look up the keyword parameter name of "Baidu” in the currently stored configuration file, still “wd”. This is to replace “wd” directly with “word” and update the identification information of the configuration file at the same time.
  • the server can update the configuration file in real time or periodically to ensure that the information in the locally stored configuration file is the latest, which directly increases the matching degree between the domain name of the webpage address obtained by the terminal device and the configuration file.
  • the locally saved configuration file may be sent to the location according to the set update period.
  • the terminal device is configured to replace the locally pre-stored configuration file by receiving the configuration file.
  • the server may send the locally stored unupdated or updated configuration file to the terminal device according to the set update period, and the update period may be preset.
  • the update period is infinite, the configuration file is sent to the terminal device in real time.
  • the terminal device can directly replace the locally stored configuration file, or determine whether it is the same as the local configuration file. If not, replace the local configuration file to update the configuration file.
  • the server may further receive, by the terminal device, the first identifier information of the configuration file locally stored by the terminal device, and determine whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file. If not, the configuration file with the second identification information is sent to the terminal device, so that the terminal device replaces the locally saved configuration file with the received configuration file with the second identification information.
  • the first identifier information may be version information of the configuration file or a number carried by the configuration file.
  • the server is responsible for generating the configuration file, so the server stores the most current configuration file.
  • the terminal device may periodically send the first identifier information of the locally stored configuration file to the server, and may also send the information in real time, and may also be according to other trigger strips set by those skilled in the art.
  • the first identifier information is sent to the server, which is not limited by the embodiment of the present invention.
  • the server compares the received first identification information with the second identification information of the locally stored configuration file. It is emphasized that the comparison must be performed according to the same type. For example, if the first identification information is version information, The version information of the configuration file stored by the server is compared, so that it is comparable, and it can be judged whether the two configuration files are consistent. When inconsistent, the server sends a configuration file with the second identification information to the terminal device.
  • the terminal device correspondingly receives the configuration file with the second identification information, and then replaces the locally pre-stored configuration file with the first identification information with the configuration file.
  • the configuration file saved by the terminal device is updated in time, so that when the domain name of the obtained webpage address is determined to exist in the pre-stored configuration file, a greater matching degree can be obtained, and the comparison result is more accurate.
  • the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding.
  • the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address.
  • Keywords the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
  • the embodiment of the present application further provides a device for acquiring a keyword.
  • the device in FIG. 4 is applied to a terminal device, and includes: an obtaining unit 410 and a determining unit. 420, an extracting unit 430 and a decoding unit 440; wherein
  • the obtaining unit 410 is configured to obtain a webpage address of a browser pre-displayed page
  • the determining unit 420 is configured to determine whether a domain name of the webpage address acquired by the acquiring unit 410 exists in a locally pre-stored configuration file;
  • the extracting unit 430 is configured to determine, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, the key corresponding to the domain name of the obtained webpage address, if the determination result of the determining unit 420 is YES. a parameter name of the word, and extracting a parameter value corresponding to the keyword parameter name from the webpage address;
  • the decoding unit 440 is configured to determine, according to the correspondence between the domain name and the encoding mode saved in the configuration file, an encoding manner corresponding to the domain name of the webpage address acquired by the acquiring unit 410, and adopt the corresponding encoding manner.
  • the decoding method decodes the extracted parameter values to obtain keywords generated after decoding.
  • the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding.
  • the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address.
  • Keywords the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
  • the obtaining unit 410 in the embodiment shown in FIG. 4 is specifically configured to: obtain a webpage address of a browser pre-displayed page through an input interface of the browser.
  • the method further includes: a first identifier information sending unit and a configuration file replacing unit; wherein
  • the first identifier information sending unit is configured to: pre-store locally before determining whether the domain name of the webpage address acquired by the acquiring unit exists in the locally pre-stored configuration file.
  • the first identifier information of the configuration file is sent to the server, so that the server detects whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file;
  • the configuration file replacement unit is configured to: if the server detects that the received first identification information is inconsistent with the second identification information of the locally stored configuration file, receive a configuration file that is sent by the server and has the second identification information; The received configuration file replaces the locally saved configuration file.
  • the embodiment of the present application further provides an information recommendation device.
  • the device is applied to a server, and may include: a receiving unit 510, a determining unit 520, and Recommendation unit 530; wherein
  • the receiving unit 510 is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is that the terminal device acquires a webpage address of a pre-displayed page of the browser, and determines the obtained webpage address.
  • the domain name exists in the locally stored configuration file, if yes, according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined, and Determining, by the webpage address, a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, using the encoding
  • the decoding method corresponding to the mode is obtained by decoding the extracted parameter values;
  • the determining unit 520 is configured to determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword;
  • the recommendation unit 530 is configured to send the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  • the detecting unit and the adding unit may also be included; and the embodiment is referred to as the first embodiment, wherein
  • the detecting unit is configured to detect, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
  • the adding unit is configured to add the domain name of the search engine to the configuration file when the domain name of the search engine does not exist in the currently stored configuration file, and protect the domain name of the search engine.
  • the keyword parameter name and encoding mode corresponding to the search engine are stored, and the identification information of the configuration file is updated.
  • the search unit and the replacement unit may be further included; and the embodiment is referred to as the second embodiment, where
  • the searching unit is configured to: when detecting a domain name, a keyword parameter name, or a coding mode corresponding to the search engine, searching for a domain name, a keyword parameter name, or an encoding method corresponding to the change engine corresponding to the search engine saved in the configuration file. ;
  • the replacing unit is configured to replace the domain name before the change, the keyword parameter name, or the encoding manner by using the changed domain name, the keyword parameter name, or the encoding manner, and update the identifier information of the configuration file.
  • the method further includes: a periodic sending unit, wherein the periodic sending unit is configured to send the locally saved configuration file to the terminal device according to the set update period, so that the terminal The device replaces the locally pre-stored configuration file with the received configuration file.
  • the method further includes: a first identification information receiving unit, a configuration file detecting unit, and a configuration file sending unit;
  • the first identifier information receiving unit is configured to receive first identifier information of a configuration file pre-stored locally by the terminal device that is sent by the terminal device;
  • the configuration file detecting unit is configured to detect whether the received first identification information is consistent with the second identification information of the locally stored configuration file
  • the configuration file sending unit is configured to: when the configuration file detecting unit detects that the detection result is inconsistent, send the configuration file that has the second identification information to the terminal device, so that the terminal device adopts the received second identification information.
  • the configuration file replaces the locally saved configuration file.
  • the embodiment of the present application further provides an information recommendation system, including: a terminal device and a server, where
  • the terminal device is configured to obtain a webpage address of a browser pre-displayed page; determine whether the domain name of the obtained webpage address exists in a locally pre-stored configuration file; if yes, according to the domain name and keyword saved in the configuration file Corresponding relationship of the parameter name, determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Correspondence of coding methods, determine the location Obtaining a coding method corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding method corresponding to the coding mode to obtain a keyword generated after decoding;
  • the server is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, and determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword; The information is sent to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  • the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art.
  • the keyword input by the user in the browser is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key
  • the information recommended by the word to the user is more accurate and the user feels better.
  • the embodiment of the present application further provides a terminal device, as shown in FIG. 6, comprising: a housing 601, a processor 602, a memory 603, a circuit board 604, and a power circuit 605, wherein the circuit board 604 is disposed in the housing 601.
  • the processor 602 and the memory 603 are disposed on the circuit board 604;
  • the power circuit 605 is used to supply power to the various circuits or devices of the terminal device;
  • the memory 603 is used to store executable program code;
  • the processor 602 is read by
  • the executable program code stored in the memory 603 is configured to execute a program corresponding to the executable program code for executing the method for acquiring a keyword, the method comprising:
  • the terminal of the embodiment of the present application is compared with the prior art.
  • the webpage address of the pre-displayed page of the browser is intercepted, and the keyword input by the user in the browser is obtained according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address, and the method is applicable to all searches saved in the configuration file.
  • the engine can obtain keywords input by users in many search engines, so that the keywords obtained are more comprehensive. Further, the information recommended to the users according to the keywords is more accurate, and the user feels better.
  • An embodiment of the present application further provides an application, where the application is configured to execute the method for acquiring a keyword at a runtime, where the method includes:
  • the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art.
  • the keyword input by the user in the browser is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key
  • the information recommended by the word to the user is more accurate and the user feels better.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute the method for acquiring a keyword at a runtime, where the method includes:
  • the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art.
  • the keyword input by the user in the browser is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key
  • the information recommended by the word to the user is more accurate and the user feels better.
  • the embodiment of the present application further provides a server, as shown in FIG. 7, comprising: a housing 701, a processor 702, a memory 703, a circuit board 704, and a power circuit 705, wherein the circuit board 704 is disposed in the housing 701. Internal to the space, the processor 702 and the memory 703 are disposed on the circuit board; the power supply circuit 705 is configured to supply power to the various circuits or devices of the server; the memory 703 is used to store executable program code; and the processor 702 reads the memory 703 by reading The stored executable program code runs a program corresponding to the executable program code for executing the information recommendation method, and the method includes:
  • the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further, according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address, compared with the prior art.
  • the method is applicable to all the search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, further, The information recommended to users based on keywords is more accurate and the user feels better.
  • the embodiment of the present application further provides an application, where the application is used to execute the information recommendation method at runtime, and the method includes:
  • the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art.
  • the keyword input by the user in the browser is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key
  • the information recommended by the word to the user is more accurate and the user feels better.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute the information recommendation method at runtime, where the method includes:
  • the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art.
  • the keyword input by the user in the browser is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key
  • the information recommended by the word to the user is more accurate and the user feels better.

Abstract

Provided are a method and apparatus for obtaining a keyword and for suggesting information on the basis of the keyword, applied to a terminal device. The method for obtaining a keyword comprises: obtaining, by a terminal device, a webpage address of a preview page of a browser (S101); determining whether a domain name of the obtained webpage address exists in a local pre-stored configuration file (S102); if so, determining, by the terminal device and according to a corresponding relationship between domain names stored in the configuration file and keyword parameter names, a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address (S103); and determining, by the terminal device and according to a corresponding relationship between the domain names stored in the configuration file and coding methods, a coding method corresponding to the domain name of the obtained webpage address, and decoding, by using a decoding method corresponding to the coding method, the extracted parameter value to obtain a keyword produced after the decoding (S104). The keyword obtained by the method is more comprehensive, and furthermore, information suggested to a user according to the keyword is more accurate, thereby providing better user experience.

Description

获取关键词和基于该关键词进行信息推荐的方法及装置Method and device for obtaining keywords and recommending information based on the keyword
本申请要求于2015年7月31日提交中国专利局、申请号为201510462959.1、发明名称为“获取关键词和基于该关键词进行信息推荐的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on July 31, 2015, the Chinese Patent Application No. 201510462959.1, the invention titled "Getting Keyword and Method and Apparatus for Information Recommendation Based on the Key Word", all of which The content is incorporated herein by reference.
技术领域Technical field
本申请涉及关键词领域,特别涉及一种获取关键词和基于该关键词进行信息推荐的方法及装置。The present application relates to the field of keywords, and in particular, to a method and an apparatus for acquiring a keyword and performing information recommendation based on the keyword.
背景技术Background technique
随着计算机网络技术的发展,通过网络搜索信息成为用户搜索信息的重要途径之一。通常,用户通过在搜索引擎网站中输入关键词来搜索信息。为了了解用户的真实需求以为用户提供信息,往往需要获取用户输入的关键词。With the development of computer network technology, searching for information through the network has become one of the important ways for users to search for information. Typically, users search for information by entering keywords in a search engine website. In order to understand the real needs of users in order to provide information to users, it is often necessary to obtain keywords input by users.
现有的获取关键词的方法通过搜索引擎来获取关键词,当用户向搜索引擎网站的关键词输入框中输入关键词时,该网站的搜索引擎就将此关键词发送给该网站的服务器,这样该网站的服务器就可以获取上述关键词。但是这种获取关键词的方法只能获取用户在一个搜索引擎网站中输入的关键词,而用户常通过多种搜索引擎网站进行搜索,因此现有的获取关键词的方法获得的关键词不够全面,进一步导致向用户提供的信息的准确性和有效性降低。The existing method for obtaining a keyword obtains a keyword through a search engine. When a user inputs a keyword into a keyword input box of a search engine website, the search engine of the website sends the keyword to the server of the website. In this way, the server of the website can obtain the above keywords. However, this method of obtaining keywords can only obtain keywords input by a user in a search engine website, and users often search through various search engine websites, so the existing keywords for obtaining keywords are not comprehensive enough. Further leads to a reduction in the accuracy and effectiveness of the information provided to the user.
发明内容Summary of the invention
基于上述问题,本申请实施例公开了一种获取关键词和基于该关键词进行信息推荐的方法及装置,以使得获取的关键词更加全面,且根据获取的关键词推荐的信息更加准确。技术方案如下:Based on the above problem, the embodiment of the present application discloses a method and an apparatus for acquiring a keyword and performing information recommendation based on the keyword, so that the obtained keyword is more comprehensive, and the information recommended according to the obtained keyword is more accurate. The technical solutions are as follows:
本申请实施例提供了一种获取关键词的方法,应用于终端设备,包括:An embodiment of the present application provides a method for acquiring a keyword, which is applied to a terminal device, and includes:
获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值; If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
可选的,所述获取浏览器预显示页面的网页地址,包括:Optionally, the obtaining a webpage address of the browser pre-displayed page includes:
通过浏览器的输入接口获取浏览器预显示页面的网页地址。Obtain the webpage address of the browser pre-displayed page through the input interface of the browser.
可选的,判断所获取的网页地址的域名是否存在于本地预存的配置文件中之前,还包括:Optionally, before determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file, the method further includes:
将本地预存的配置文件的第一标识信息发送给服务器,使得服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息是否一致;And sending, by the server, the first identifier information of the locally stored configuration file to the server, so that the server detects whether the received first identifier information is consistent with the second identifier information of the configuration file locally stored by the server;
如果不一致,接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。If not, the configuration file with the second identification information sent by the server is received; and the locally saved configuration file is replaced with the received configuration file.
本申请还提供了一种信息推荐方法,应用于服务器,包括:The application also provides an information recommendation method, which is applied to a server, and includes:
接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于所述终端本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;Receiving, by the terminal device, a keyword of the pre-displayed page of the terminal device; wherein the keyword is a webpage address of the pre-displayed page of the browser, and determining whether the domain name of the obtained webpage address exists in the terminal The local pre-stored configuration file, if present, determines the keyword parameter name corresponding to the domain name of the obtained webpage address according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, and from the webpage address And extracting a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding corresponding to the coding mode Method for decoding the extracted parameter values;
根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;Determining the recommendation information corresponding to the received keyword according to the correspondence between the locally stored keyword and the recommendation information;
将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。Sending the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
可选的,还包括:Optionally, it also includes:
针对浏览器访问到的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名; Detecting, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
当不存在时,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。When it does not exist, the domain name of the search engine is added to the configuration file, and the keyword parameter name and encoding mode corresponding to the search engine are saved for the domain name of the search engine, and the identification information of the configuration file is updated.
可选的,还包括:Optionally, it also includes:
当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式;When it is detected that the domain name, the keyword parameter name, or the encoding mode of the search engine changes, the domain name, keyword parameter name, or encoding mode corresponding to the change engine corresponding to the search engine stored in the configuration file is searched;
采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。The changed domain name, keyword parameter name or encoding method is used to replace the domain name before the change, the keyword parameter name or the encoding mode, and the identification information of the configuration file is updated.
可选的,还包括:Optionally, it also includes:
按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。And sending the locally saved configuration file to the terminal device according to the set update period, so that the terminal device replaces the locally pre-stored configuration file by receiving the configuration file.
可选的,还包括:Optionally, it also includes:
接收终端设备发送的所述终端设备本地预存的配置文件的第一标识信息;Receiving, by the terminal device, first identifier information of a configuration file pre-stored locally by the terminal device;
检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;Detecting whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file;
如果不一致,将具有第二标识信息的配置文件发送给终端设备,使得所述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。If not, the configuration file with the second identification information is sent to the terminal device, so that the terminal device replaces the locally saved configuration file with the received configuration file with the second identification information.
本申请实施例还提供了一种获取关键词的装置,应用于终端设备,包括:获取单元、判断单元、提取单元和译码单元;其中,The embodiment of the present application further provides an apparatus for acquiring a keyword, which is applied to a terminal device, including: an acquiring unit, a determining unit, an extracting unit, and a decoding unit;
所述获取单元,用于获取浏览器预显示页面的网页地址;The obtaining unit is configured to obtain a webpage address of a browser pre-displayed page;
所述判断单元,用于判断所述获取单元所获取的网页地址的域名是否存在于本地预存的配置文件中;The determining unit is configured to determine whether a domain name of the webpage address acquired by the acquiring unit exists in a locally pre-stored configuration file;
所述提取单元,用于如果所述判断单元的判断结果为是时,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;The extracting unit is configured to determine, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, a keyword parameter corresponding to the domain name of the obtained webpage address, if the determination result of the determining unit is yes And extracting, from the webpage address, a parameter value corresponding to the keyword parameter name;
所述译码单元,用于根据所述配置文件中保存的域名与编码方式的对应 关系,确定所述获取单元所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。The decoding unit is configured to respond to a domain name and an encoding method saved according to the configuration file. And determining a coding mode corresponding to the domain name of the webpage address obtained by the acquiring unit, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode to obtain a keyword generated after decoding.
可选的,所述获取单元,具体用于:通过浏览器的输入接口获取浏览器预显示页面的网页地址。Optionally, the obtaining unit is specifically configured to: obtain, by using an input interface of the browser, a webpage address of the browser pre-displayed page.
可选的,还包括:第一标识信息发送单元和配置文件替换单元;其中,Optionally, the method further includes: a first identifier information sending unit and a configuration file replacing unit; wherein
所述第一标识信息发送单元,用于所述判断单元在判断所述获取单元所获取的网页地址的域名是否存在于本地预存的配置文件中之前,将本地预存的配置文件的第一标识信息发送给服务器,使得服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息是否一致;The first identifier information sending unit is configured to: before the determining unit determines whether the domain name of the webpage address acquired by the acquiring unit exists in the locally pre-stored configuration file, the first identifier information of the locally pre-stored configuration file Sending to the server, so that the server detects whether the received first identification information is consistent with the second identification information of the configuration file locally stored by the server;
所述配置文件替换单元,用于如果服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息不一致时,接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。The configuration file replacement unit is configured to receive, when the server detects that the received first identification information is inconsistent with the second identification information of the configuration file locally stored by the server, the configuration file that is sent by the server and has the second identification information. ; and replace the locally saved configuration file with the received configuration file.
本申请实施例还提供了一种信息推荐装置,应用于服务器,包括:接收单元、确定单元和推荐单元;其中,The embodiment of the present application further provides an information recommendation apparatus, which is applied to a server, and includes: a receiving unit, a determining unit, and a recommending unit;
所述接收单元,用于接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于所述终端设备本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;The receiving unit is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is a webpage address of the pre-displayed page of the browser, and the obtained webpage address is determined by the terminal device. Whether the domain name exists in the configuration file pre-stored locally by the terminal device, and if yes, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file. And extracting a parameter value corresponding to the keyword parameter name from the webpage address, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding manner corresponding to the domain name of the obtained webpage address, Decoding the extracted parameter values by using a decoding method corresponding to the coding mode;
所述确定单元,用于根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;The determining unit is configured to determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword;
所述推荐单元,用于将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面 中。The recommendation unit is configured to send the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information on the page when displaying a page corresponding to the webpage address in.
可选的,还包括:检测单元和添加单元;其中,Optionally, the method further includes: a detecting unit and an adding unit; wherein
所述检测单元,用于针对浏览器访问到的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名;The detecting unit is configured to detect, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
所述添加单元,用于当本地当前存储的配置文件中不存在该搜索引擎的域名时,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。The adding unit is configured to add the domain name of the search engine to the configuration file when the domain name of the search engine does not exist in the currently stored configuration file, and save the keyword corresponding to the search engine for the domain name of the search engine. Parameter name and encoding method, and update the identification information of the configuration file.
可选的,还包括:查找单元和替换单元;其中,Optionally, the method further includes: a searching unit and a replacement unit; wherein
所述查找单元,用于当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式;The searching unit is configured to: when detecting a domain name, a keyword parameter name, or a coding mode corresponding to the search engine, searching for a domain name, a keyword parameter name, or an encoding method corresponding to the change engine corresponding to the search engine saved in the configuration file. ;
所述替换单元,用于采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。And the replacing unit is configured to replace the domain name before the change, the keyword parameter name, or the encoding manner by using the changed domain name, the keyword parameter name, or the encoding manner, and update the identifier information of the configuration file.
可选的,还包括:周期发送单元,其中,所述周期发送单元,用于按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。Optionally, the method further includes: a periodic sending unit, wherein the periodic sending unit is configured to send the locally saved configuration file to the terminal device according to the set update period, so that the terminal device utilizes the received The configuration file replaces the locally pre-stored configuration file.
可选的,还包括:第一标识信息接收单元、配置文件检测单元和配置文件发送单元;其中,Optionally, the method further includes: a first identifier information receiving unit, a profile detecting unit, and a profile sending unit; wherein
所述第一标识信息接收单元,用于接收终端设备发送的所述终端设备本地预存的配置文件的第一标识信息;The first identifier information receiving unit is configured to receive first identifier information of a configuration file pre-stored locally by the terminal device that is sent by the terminal device;
所述配置文件检测单元,用于检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;The configuration file detecting unit is configured to detect whether the received first identification information is consistent with the second identification information of the locally stored configuration file;
所述配置文件发送单元,用于所述配置文件检测单元检测结果为不一致时,将具有第二标识信息的配置文件发送给终端设备,使得所述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。The configuration file sending unit is configured to: when the configuration file detecting unit detects that the detection result is inconsistent, send the configuration file that has the second identification information to the terminal device, so that the terminal device adopts the received second identification information. The configuration file replaces the locally saved configuration file.
本申请实施例还提供了一种信息推荐系统,包括:终端设备和服务器,其中,The embodiment of the present application further provides an information recommendation system, including: a terminal device and a server, where
所述终端设备,用于获取浏览器预显示页面的网页地址;判断所获取的 网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词;The terminal device is configured to acquire a webpage address of a browser pre-displayed page; determine the acquired Whether the domain name of the webpage address exists in the locally stored configuration file; if yes, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, And extracting a parameter value corresponding to the keyword parameter name from the webpage address; determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and adopting Decoding mode corresponding to the coding mode decodes the extracted parameter values to obtain keywords generated after decoding;
所述服务器,用于接收所述终端设备发送该终端设备预显示页面的关键词;根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。The server is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, and determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword; The information is sent to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
本申请实施例还提供了一种终端设备,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为终端设备的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行上述获取关键词的方法。The embodiment of the present application further provides a terminal device, including: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, and the processor and the memory are disposed on the circuit board. a power circuit for powering various circuits or devices of the terminal device; a memory for storing executable program code; and a processor for executing a program corresponding to the executable program code by reading executable program code stored in the memory, A method for performing the above-described acquisition of keywords.
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行上述获取关键词的方法。The embodiment of the present application further provides an application for executing the foregoing method for acquiring a keyword at runtime.
本申请实施例还提供了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行上述获取关键词的方法。The embodiment of the present application further provides a storage medium for storing an application, and the application is configured to execute the foregoing method for acquiring a keyword at runtime.
本申请实施例还提供了一种服务器,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为服务器的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行上述信息推荐方法。The embodiment of the present application further provides a server, including: a casing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the casing, and the processor and the memory are disposed on the circuit board. a power circuit for powering various circuits or devices of the server; a memory for storing executable program code; and a processor for executing a program corresponding to the executable program code by reading executable program code stored in the memory to use Perform the above information recommendation method.
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行上述信息推荐方法。The embodiment of the present application further provides an application for executing the above information recommendation method at runtime.
本申请实施例还提供了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行上述信息推荐方法。 The embodiment of the present application further provides a storage medium for storing an application, where the application is configured to execute the above information recommendation method at runtime.
本申请实施例中,终端设备获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。In the embodiment of the present application, the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding. Compared with the prior art, the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the key input by the user in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address. Word, the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, and further, the information recommended to the user according to the keywords is more Accurate, the user feels better.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例所提供的一种获取关键词方法的一种流程图;FIG. 1 is a flowchart of a method for acquiring a keyword according to an embodiment of the present application;
图2为本申请实施例所提供的一种获取关键词方法的另一种流程图;FIG. 2 is another flowchart of a method for acquiring a keyword according to an embodiment of the present application;
图3为本申请实施例所提供的一种信息推荐方法的一种流程图;FIG. 3 is a flowchart of an information recommendation method according to an embodiment of the present application;
图4为本申请实施例所提供的一种获取关键词的装置的一种结构示意图;FIG. 4 is a schematic structural diagram of an apparatus for acquiring a keyword according to an embodiment of the present disclosure;
图5为本申请实施例所提供的一种信息推荐的装置的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for information recommendation according to an embodiment of the present disclosure;
图6为本申请实施例所提供的一种终端设备的结构示意图;FIG. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图7为本申请实施例所提供的一种服务器的结构示意图。FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通 技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments in the present application, common in the art All other embodiments obtained by the skilled person without creative efforts are within the scope of the present application.
首先对本申请实施例所提供的一种获取关键词的方法进行简单介绍,该方法应用于终端设备,可以包括以下步骤:A method for obtaining a keyword provided by the embodiment of the present application is briefly introduced. The method is applied to a terminal device, and may include the following steps:
获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
需要说明的是,本申请实施例所提供的一种获取关键词的方法应用于终端设备,该终端设备上安装有浏览器客户端,且用户可以通过浏览器客户端中的输入框输入关键词搜索所需的内容;也可以直接点击浏览器界面的快捷入口,进行相应搜索。该终端设备可以为:手机、平板电脑、笔记本电脑等便携式终端,当然,该终端也可以为:台式电脑、数字电视等非便携式终端。It should be noted that the method for obtaining a keyword provided by the embodiment of the present application is applied to a terminal device, where a browser client is installed, and the user can input a keyword through an input box in a browser client. Search for the content you want; you can also click on the shortcut entry in the browser interface to search accordingly. The terminal device may be: a mobile terminal, a tablet computer, a notebook computer and the like, and of course, the terminal may also be a non-portable terminal such as a desktop computer or a digital television.
与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Compared with the prior art, the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the key input by the user in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address. Word, the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, and further, the information recommended to the user according to the keywords is more Accurate, the user feels better.
下面对本申请实施例所提供一种获取关键词的方法的步骤进行详细介绍,图1为本申请实施例所提供的一种获取关键词的方法的一种流程图,该方法应用于终端设备,可以包括以下步骤: The following is a detailed description of a method for obtaining a keyword according to an embodiment of the present application. FIG. 1 is a flowchart of a method for acquiring a keyword according to an embodiment of the present application, where the method is applied to a terminal device. The steps can be included:
S101,终端设备获取浏览器预显示页面的网页地址;S101. The terminal device acquires a webpage address of a browser pre-displayed page.
需要说明的是,浏览器预显示页面为:浏览器即将要显示但还未显示的页面;实际中,当用户进行相关搜索时,对应的搜索引擎会根据各自的拼接规则将用户输入的内容拼接为对应的网络请求,进而浏览器将该网络请求发送给各自对应的服务器,服务器根据该网络请求反馈对应的网页地址,浏览器将服务器反馈的网页地址对应的信息显示在搜索结果页面中;上述的预显示页面与之后的搜索结果页面中的显示内容是一致的。It should be noted that the browser pre-display page is: a page that the browser is about to display but has not yet displayed; in practice, when the user performs related search, the corresponding search engine will splicing the content input by the user according to the respective splicing rules. For the corresponding network request, the browser sends the network request to the corresponding server, and the server feeds back the corresponding webpage address according to the network request, and the browser displays the information corresponding to the webpage address fed back by the server in the search result page; The pre-display page is consistent with the display content in the subsequent search results page.
具体的,用户在浏览器中输入搜索内容,进而浏览器将包含该搜索内容的网络请求发送给各自对应的服务器,服务器根据该网络请求反馈对应的网页地址,浏览器在显示该网页地址对应的页面之前将该网页地址截获。终端设备可以实时的监测浏览器接收的网页地址并及时获取,这样获取的网页地址比较全面;另外,也可以周期性的监测浏览器接收的网页地址并获取,这样虽然未将网页地址全部获取,但是由于是周期性获取,可以相对减少对终端设备的内存的消耗,相比现有技术仍获取的网页地址较多。Specifically, the user inputs the search content in the browser, and the browser sends the network request including the search content to the corresponding server, and the server feeds back the corresponding webpage address according to the network request, and the browser displays the corresponding webpage address. The page was previously intercepted by the page. The terminal device can monitor the webpage address received by the browser in real time and obtain it in time, so that the obtained webpage address is relatively comprehensive; in addition, the webpage address received by the browser can be periodically monitored and acquired, so that although the webpage address is not obtained, However, due to the periodic acquisition, the memory consumption of the terminal device can be relatively reduced, and the web address obtained by the prior art is more.
实际中,浏览器在接收服务器反馈的网页地址时,都需要调用浏览器的相应输入接口,在该S101步骤中,所述获取浏览器预显示页面的网页地址,可以包括:In practice, the browser needs to invoke the corresponding input interface of the browser when receiving the webpage address fed back by the server. In the step S101, the obtaining the webpage address of the pre-displayed page of the browser may include:
通过浏览器的输入接口获取浏览器预显示页面的网页地址。Obtain the webpage address of the browser pre-displayed page through the input interface of the browser.
具体的,既然浏览器接收网页地址时,都会调用相应的输入接口,如OnNavigate,那么可以通过浏览器的输入接口来获取浏览器预显示页面的网页地址,这样获取的网页地址更加准确,且更加全面。Specifically, since the browser receives the corresponding web interface address, the corresponding input interface, such as OnNavigate, can obtain the webpage address of the browser pre-displayed page through the input interface of the browser, so that the obtained webpage address is more accurate and more comprehensive.
S102,终端设备判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,执行S103步骤;如果不存在,不作处理;S102: The terminal device determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, performs step S103; if not, does not process;
需要说明的是,配置文件由浏览器对应的服务器生成,可以发送给终端设备,进而在终端设备中进行保存。本申请实施例中的配置文件中保存有:各个搜索引擎的域名以及每个搜索引擎对应的关键词参数名和对应的编码方式。其中该每个搜索引擎都是该浏览器能够访问到的,每个搜索引擎都有各自对应的域名、关键词参数名和编码方式。例如:“百度”的域名为 http://www.baidu.com/s?,关键词参数名为wd,编码方式是utf-8;“360”的域名为http://www.so.com/s?,关键词参数名为q,编码方式是GBK。It should be noted that the configuration file is generated by the server corresponding to the browser, and can be sent to the terminal device, and then saved in the terminal device. The configuration file in the embodiment of the present application stores: a domain name of each search engine and a keyword parameter name corresponding to each search engine and a corresponding encoding manner. Each of the search engines is accessible to the browser, and each search engine has its own corresponding domain name, keyword parameter name, and encoding method. For example: the domain name of "Baidu" is Http://www.baidu.com/s? The keyword parameter name is wd, the encoding method is utf-8; the domain name of "360" is http://www.so.com/s? The keyword parameter is named q and the encoding method is GBK.
具体的,当S101步骤获取预显示页面的网页地址后,将该获取的网页地址的域名与本地预存的配置文件中的搜索引擎域名进行比较,进而判断该配置文件中是否存在该获取的网页地址的域名。Specifically, after the step S101 obtains the webpage address of the pre-displayed page, the domain name of the obtained webpage address is compared with the search engine domain name in the locally pre-stored configuration file, and then it is determined whether the obtained webpage address exists in the configuration file. Domain name.
举例说明,本地预存有配置文件1,具体内容如下所示:For example, the configuration file 1 is pre-stored locally, and the details are as follows:
Figure PCTCN2016092296-appb-000001
Figure PCTCN2016092296-appb-000001
获取的预显示页面的网页地址为http://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&tn=baidu&wd=huawei%20%E6%89%8B%E6%9C%BA&rsv_enter=1&rsv_sug3=8&rsv_sug4=100&rsv_sug1=7&rsv_sug2=0&inputT=5459,显然该网页地址的域名为www.baidu.com/s?,遍历该配置文件中的域名,判断是否存在域名www.baidu.com/s?。The web address of the pre-displayed page obtained is http://www.baidu.com/s? Ie=utf-8&f=8&rsv_bp=1&tn=baidu&wd=huawei%20%E6%89%8B%E6%9C%BA&rsv_enter=1&rsv_sug3=8&rsv_sug4=100&rsv_sug1=7&rsv_sug2=0&inputT=5459, obviously the domain name of the web address is www.baidu .com/s? , traverse the domain name in the configuration file to determine whether the domain name www.baidu.com/s? .
如果存在该域名,则执行S103步骤;如果不存在,不作处理。If the domain name exists, step S103 is performed; if it does not exist, no processing is performed.
S103,终端设备根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;S103. The terminal device determines, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracts the keyword parameter from the webpage address. The corresponding parameter value of the name;
具体的,当S102步骤判断结果为是时,即所获取的网页地址的域名存在于本地预存的配置文件中,可根据该配置文件中保存的域名与关键词参数名的对应关系,确定该获取的网页地址的域名对应的关键词参数名,进而根据该关键词参数名,在网页地址中提取到该关键词参数名对应的参数值。其中,网页地址的域名、关键词参数名、参数值的提取属于现有技术,这里不再赘述。Specifically, when the result of the step S102 is YES, that is, the domain name of the obtained webpage address exists in the locally pre-stored configuration file, the obtaining may be determined according to the correspondence between the domain name and the keyword parameter name saved in the configuration file. The keyword parameter name corresponding to the domain name of the webpage address, and further extracting the parameter value corresponding to the keyword parameter name in the webpage address according to the keyword parameter name. The extraction of the domain name, the keyword parameter name, and the parameter value of the webpage address belongs to the prior art, and details are not described herein again.
仍以S102步骤中的例子中的网页地址为例,当S102步骤中判断出存在域名www.baidu.com/s?,根据配置文件中域名www.baidu.com/s?对应的关键词 参数名wd,可在网页地址查找wd,进而将wd后的参数值huawei%20%E6%89%8B%E6%9C%BA提取出来。Still taking the webpage address in the example in step S102 as an example, when the step S102 determines that the domain name www.baidu.com/s exists? According to the domain name in the configuration file www.baidu.com/s? Corresponding keywords The parameter name wd can be used to find the wd in the webpage address, and then extract the parameter value huawei%20%E6%89%8B%E6%9C%BA after the wd.
S104,终端设备根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。S104. The terminal device determines, according to the correspondence between the domain name and the encoding mode saved in the configuration file, an encoding mode corresponding to the domain name of the obtained webpage address, and performs the extracted parameter value by using a decoding manner corresponding to the encoding mode. Decoding, the keywords generated after decoding are obtained.
具体的,当S102步骤判断结果为是时,即所获取的网页地址的域名存在于本地预存的配置文件中,可根据该配置文件中保存的域名与编码方式的对应关系,确定该获取的网页地址的域名对应的编码方式,进而根据该编码方式对应的译码方式将S103步骤中提取的参数值进行译码,得到译码后生成的关键词。Specifically, when the result of the step S102 is YES, that is, the domain name of the obtained webpage address exists in the locally pre-stored configuration file, the obtained webpage may be determined according to the correspondence between the domain name and the encoding mode saved in the configuration file. The encoding method corresponding to the domain name of the address, and further decoding the parameter value extracted in the step S103 according to the decoding method corresponding to the encoding method to obtain the keyword generated after decoding.
仍以S102步骤中的例子中的网页地址为例,当S102步骤中判断出存在域名www.baidu.com/s?,根据配置文件中域名www.baidu.com/s?对应的编码方式utf-8,确定对应的译码方式,并采用该译码方式对S103步骤提取的参数值huawei%20%E6%89%8B%E6%9C%BA进行译码,得到译码后生成的关键词“huawei手机”。Still taking the webpage address in the example in step S102 as an example, when the step S102 determines that the domain name www.baidu.com/s exists? According to the domain name in the configuration file www.baidu.com/s? Corresponding coding mode utf-8 determines the corresponding decoding mode, and uses the decoding method to decode the parameter value huawei%20%E6%89%8B%E6%9C%BA extracted in step S103 to obtain decoding. The generated keyword "huawei mobile phone".
本申请实施例中,终端设备获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。与现有技术相比,本申请实施例在终端设备处,截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。 In the embodiment of the present application, the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding. Compared with the prior art, the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address. Keywords, the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
为了使获取的网页地址的域名与配置文件中的域名有更高的匹配度,可以适时更新本地的配置文件。图2为本申请实施例提供的一种获取关键词的方法的另一种流程图,在图1所示实施例的S102步骤之前增加以下步骤:In order to make the domain name of the obtained webpage address have a higher matching degree with the domain name in the configuration file, the local configuration file may be updated in time. FIG. 2 is another flowchart of a method for obtaining a keyword according to an embodiment of the present application. The following steps are added before the step S102 of the embodiment shown in FIG. 1 :
S201,终端设备将本地预存的配置文件的第一标识信息发送给服务器;S201: The terminal device sends the first identifier information of the locally pre-stored configuration file to the server.
需要说明的是,上述第一标识信息可以是配置文件的版本信息,也可以是配置文件携带的编号,这都是合理的。服务器负责产生配置文件,所以服务器存储的一般为最新的配置文件。It should be noted that the first identifier information may be the version information of the configuration file or the number carried by the configuration file, which is reasonable. The server is responsible for generating the configuration file, so the server stores the most current configuration file.
具体的,终端设备可定期将本地预存的配置文件的第一标识信息发送给服务器,也可实时的发送,还可以根据本领域技术人员所设置的其他触发条件将第一标识信息发送给服务器,本申请实施例并不对此进行限定。Specifically, the terminal device may periodically send the first identifier information of the locally stored configuration file to the server, and may also send the first identifier information to the server according to other trigger conditions set by a person skilled in the art. This embodiment of the present application does not limit this.
S202,服务器在接收到第一标识信息后,检测该接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;如果不一致,执行步骤S203;如果一致,直接转至S102步骤;S202: After receiving the first identifier information, the server detects whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file; if not, step S203 is performed; if yes, go directly to step S102. ;
具体的,服务器接收S201步骤中终端设备发送的第一标识信息,并将该第一标识信息与本地存储的配置文件的第二标识信息进行比较,需要强调的是,比较时必须按照同一类型比较,比如:第一标识信息为版本信息,则也必须与服务器存储的配置文件的版本信息进行比较,这样才有可比性,才能判断两个配置文件是否一致。当不一致,服务器执行将具有第二标识信息的配置文件发送给终端设备的步骤;当一致时,服务器不做任何处理,终端设备直接执行判断所获取的网页地址的域名是否存在于本地预存的配置文件中的步骤。Specifically, the server receives the first identifier information sent by the terminal device in step S201, and compares the first identifier information with the second identifier information of the locally stored configuration file, and it is emphasized that the comparison must be performed according to the same type. For example, if the first identification information is version information, it must also be compared with the version information of the configuration file stored by the server, so that it is comparable, and it can be determined whether the two configuration files are consistent. When inconsistent, the server performs the step of transmitting the configuration file with the second identification information to the terminal device; when the server is consistent, the server does not perform any processing, and the terminal device directly performs the determination whether the domain name of the obtained webpage address exists in the locally pre-stored configuration. The steps in the file.
S203,服务器将具有第二标识信息的配置文件发送给终端设备;S203. The server sends the configuration file with the second identification information to the terminal device.
具体的,当S202步骤中服务器检测到接收到的第一标识信息与本地存储的配置文件的第二标识信息不一致时,将具有第二标识信息的配置文件发送给终端设备。Specifically, when the server detects that the received first identifier information is inconsistent with the second identifier information of the locally stored configuration file, the configuration file that has the second identifier information is sent to the terminal device.
S204,终端设备接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。 S204. The terminal device receives the configuration file that is sent by the server and has the second identification information, and replaces the locally saved configuration file with the received configuration file.
具体的,S203步骤服务器将具有第二标识信息的配置文件发送给终端设备后,终端设备相应接收该具有第二标识信息的配置文件,进而用该配置文件替换本地预存的具有第一标识信息的配置文件。Specifically, after the S203 step server sends the configuration file with the second identification information to the terminal device, the terminal device receives the configuration file with the second identification information, and replaces the locally pre-stored first identification information with the configuration file. Configuration file.
应用上述方案,及时对终端设备端保存的配置文件进行更新,这样在判断获取的网页地址的域名是否存在于预先存储的配置文件中时,可以得到更大的匹配度,而且比较结果也更加准确。Applying the above solution, the configuration file saved by the terminal device is updated in time, so that when the domain name of the obtained webpage address is determined to exist in the pre-stored configuration file, a greater matching degree can be obtained, and the comparison result is more accurate. .
图3为本申请实施例提供的信息推荐方法的一种流程图,该信息推荐方法应用于服务器,可以包括以下步骤:FIG. 3 is a flowchart of a method for recommending information provided by an embodiment of the present application. The information recommendation method is applied to a server, and may include the following steps:
S301,服务器接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;S301: The server receives a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is that the terminal device acquires a webpage address of the pre-displayed page of the browser, and determines whether the domain name of the obtained webpage address exists. The local pre-stored configuration file, if present, determines the keyword parameter name corresponding to the domain name of the obtained webpage address according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, and from the webpage address And extracting a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding corresponding to the coding mode Method for decoding the extracted parameter values;
需要说明的是,上述服务器为浏览器对应的服务器。It should be noted that the above server is a server corresponding to the browser.
具体的,在S104步骤中得到关键词后,将该得到的关键词发送给服务器,相应的,服务器接收该关键词。关于关键词的获取过程参见S101步骤至S104步骤,这里不再赘述。Specifically, after the keyword is obtained in step S104, the obtained keyword is sent to the server, and correspondingly, the server receives the keyword. For the process of obtaining keywords, refer to steps S101 to S104, and details are not described herein again.
S302,服务器根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;S302. The server determines, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword.
具体的,当S301步骤接收终端设备发送的关键词后,在本地查找该关键词预先关联的推荐信息,并将查找到的推荐信息确定为该关键词对应的推荐信息。Specifically, after the step S301 receives the keyword sent by the terminal device, the recommendation information pre-associated with the keyword is locally searched, and the found recommendation information is determined as the recommendation information corresponding to the keyword.
S303,服务器将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。 S303. The server sends the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
具体的,在S302步骤确定关键词对应的推荐信息后,将该推荐信息发送给终端设备,相应的,终端设备接收该推荐信息,并在显示上述预显示页面时,同时将该推荐信息显示在该界面上。Specifically, after the step S302 determines the recommendation information corresponding to the keyword, the recommendation information is sent to the terminal device, and correspondingly, the terminal device receives the recommendation information, and when the pre-display page is displayed, the recommendation information is simultaneously displayed at the same time. On the interface.
实际中,在长期与终端设备的信息交互或者技术更新过程中,可能会产生新的搜索引擎或者改变原搜索引擎的一些配置信息,那么就需要服务器实时或定期的对本地的配置文件进行更新,对于新的搜索引擎,服务器可以添加到配置文件中,对于原搜索引擎相关信息的变化,服务器可利用新的配置信息替换原配置信息。其中,配置文件在原有基础上被添加新内容的步骤为:In practice, in the long-term information exchange or technology update process of the terminal device, a new search engine may be generated or some configuration information of the original search engine may be changed, so that the server needs to update the local configuration file in real time or periodically. For new search engines, the server can be added to the configuration file. For changes in the information related to the original search engine, the server can replace the original configuration information with the new configuration information. The steps for adding new content to the configuration file are:
针对浏览器访问到的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名;Detecting, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
如果不存在,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。If it does not exist, add the domain name of the search engine to the configuration file, save the keyword parameter name and encoding mode corresponding to the search engine for the domain name of the search engine, and update the identification information of the configuration file.
具体的,针对当前浏览器访问到的每个搜索引擎,逐一与本地当前存储的配置文件中的域名进行比较,确定是否存在于当前存储的配置文件中。如果不存在,将该搜索引擎的域名添加到该配置文件中,并同时添加该搜索引擎对应的关键词参数名和编码方式,这时该配置文件已经不同于原来的配置文件,可以更新原配置文件的标识信息。Specifically, for each search engine accessed by the current browser, compare with the domain name in the locally stored configuration file one by one to determine whether it exists in the currently stored configuration file. If it does not exist, add the domain name of the search engine to the configuration file, and add the keyword parameter name and encoding mode corresponding to the search engine at the same time. At this time, the configuration file is different from the original configuration file, and the original configuration file can be updated. Identification information.
其中,配置文件中被更改原内容的步骤为:The steps to change the original content in the configuration file are:
当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式;When it is detected that the domain name, the keyword parameter name, or the encoding mode of the search engine changes, the domain name, keyword parameter name, or encoding mode corresponding to the change engine corresponding to the search engine stored in the configuration file is searched;
采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。The changed domain name, keyword parameter name or encoding method is used to replace the domain name before the change, the keyword parameter name or the encoding mode, and the identification information of the configuration file is updated.
具体的,服务器检测到有搜索引擎的域名、关键词参数名或编码方式中任何一个发生变化时,查找本地当前存储的配置文件中该搜素引擎对应的域名、关键词参数名或编码方式;并采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,这时该配置文件已经不 同于原来的配置文件,可以更新原配置文件的标识信息。Specifically, when the server detects that any one of the domain name, the keyword parameter name, or the encoding mode of the search engine changes, the server searches for a domain name, a keyword parameter name, or a coding mode corresponding to the search engine in the currently stored configuration file; And replace the domain name, keyword parameter name or encoding method before the change with the changed domain name, keyword parameter name or encoding mode. At this time, the configuration file is no longer Same as the original configuration file, you can update the identification information of the original configuration file.
举例说明,某天“百度”的关键词参数名由原来的“wd”变为“word”,服务器则可在当前存储的配置文件中查找“百度”的关键词参数名,仍为“wd”,这是直接用“word”替换掉“wd,并同时更新该配置文件的标识信息。For example, the keyword parameter name of Baidu changed from "wd" to "word" on the other day, and the server can look up the keyword parameter name of "Baidu" in the currently stored configuration file, still "wd". This is to replace "wd" directly with "word" and update the identification information of the configuration file at the same time.
当然,也可以更改添加新内容的配置文件中的某搜索引擎对应的域名、关键词参数名和对应的编码方式。Of course, you can also change the domain name, keyword parameter name, and corresponding encoding method of a search engine in the configuration file that adds new content.
由以上可知,服务器实时或者定时的更新配置文件,可以保证本地存储的配置文件中的信息都是最新的,直接增加了终端设备获取的网页地址的域名与配置文件的匹配度。It can be seen from the above that the server can update the configuration file in real time or periodically to ensure that the information in the locally stored configuration file is the latest, which directly increases the matching degree between the domain name of the webpage address obtained by the terminal device and the configuration file.
当服务器存储的配置文件发生变化时,为了保证终端设备存储的配置文件与获取的网页地址的域名有更好的匹配度,则可以按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。When the configuration file stored by the server changes, in order to ensure that the configuration file stored by the terminal device has a better matching degree with the domain name of the obtained webpage address, the locally saved configuration file may be sent to the location according to the set update period. The terminal device is configured to replace the locally pre-stored configuration file by receiving the configuration file.
具体的,服务器可按照设定的更新周期,将本地存储的未更新或者更新的配置文件发送给终端设备,更新周期可以预先设置,当更新周期无限小时,相当于实时将配置文件发送给终端设备。当终端设备接收到服务器发送的配置文件后,可以直接替换本地存储的配置文件,也可以先判断是否与本地的配置文件相同,当不一样时,替换本地的配置文件,实现配置文件的更新。Specifically, the server may send the locally stored unupdated or updated configuration file to the terminal device according to the set update period, and the update period may be preset. When the update period is infinite, the configuration file is sent to the terminal device in real time. . After receiving the configuration file sent by the server, the terminal device can directly replace the locally stored configuration file, or determine whether it is the same as the local configuration file. If not, replace the local configuration file to update the configuration file.
在本实施例中,服务器还可以接收终端设备发送的该终端设备本地预存的配置文件的第一标识信息,检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;如果不一致,将具有第二标识信息的配置文件发送给终端设备,使得所述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。In this embodiment, the server may further receive, by the terminal device, the first identifier information of the configuration file locally stored by the terminal device, and determine whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file. If not, the configuration file with the second identification information is sent to the terminal device, so that the terminal device replaces the locally saved configuration file with the received configuration file with the second identification information.
如上所述,第一标识信息可以是配置文件的版本信息,也可以是配置文件携带的编号。服务器负责产生配置文件,所以服务器存储的一般为最新的配置文件。As described above, the first identifier information may be version information of the configuration file or a number carried by the configuration file. The server is responsible for generating the configuration file, so the server stores the most current configuration file.
具体的,终端设备可定期将本地预存的配置文件的第一标识信息发送给服务器,也可实时的发送,还可以根据本领域技术人员所设置的其他触发条 件将第一标识信息发送给服务器,本发明实施例并不对此进行限定。Specifically, the terminal device may periodically send the first identifier information of the locally stored configuration file to the server, and may also send the information in real time, and may also be according to other trigger strips set by those skilled in the art. The first identifier information is sent to the server, which is not limited by the embodiment of the present invention.
服务器将接收到的第一标识信息与本地存储的配置文件的第二标识信息进行比较,需要强调的是,比较时必须按照同一类型比较,比如:第一标识信息为版本信息,则也必须与服务器存储的配置文件的版本信息进行比较,这样才有可比性,才能判断两个配置文件是否一致。当不一致,服务器将具有第二标识信息的配置文件发送给终端设备。The server compares the received first identification information with the second identification information of the locally stored configuration file. It is emphasized that the comparison must be performed according to the same type. For example, if the first identification information is version information, The version information of the configuration file stored by the server is compared, so that it is comparable, and it can be judged whether the two configuration files are consistent. When inconsistent, the server sends a configuration file with the second identification information to the terminal device.
终端设备相应接收该具有第二标识信息的配置文件,进而用该配置文件替换本地预存的具有第一标识信息的配置文件。The terminal device correspondingly receives the configuration file with the second identification information, and then replaces the locally pre-stored configuration file with the first identification information with the configuration file.
应用上述方案,及时对终端设备端保存的配置文件进行更新,这样在判断获取的网页地址的域名是否存在于预先存储的配置文件中时,可以得到更大的匹配度,而且比较结果也更加准确。Applying the above solution, the configuration file saved by the terminal device is updated in time, so that when the domain name of the obtained webpage address is determined to exist in the pre-stored configuration file, a greater matching degree can be obtained, and the comparison result is more accurate. .
本申请实施例中,终端设备获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。与现有技术相比,本申请实施例在终端设备处,截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。In the embodiment of the present application, the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding. Compared with the prior art, the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address. Keywords, the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
对应于图1所示的方法实施例,本申请实施例还提供了一种获取关键词的装置,如图4所示,图4中的装置应用于终端设备,包括:获取单元410、判断单元420、提取单元430和译码单元440;其中,Corresponding to the method embodiment shown in FIG. 1 , the embodiment of the present application further provides a device for acquiring a keyword. As shown in FIG. 4 , the device in FIG. 4 is applied to a terminal device, and includes: an obtaining unit 410 and a determining unit. 420, an extracting unit 430 and a decoding unit 440; wherein
所述获取单元410,用于获取浏览器预显示页面的网页地址; The obtaining unit 410 is configured to obtain a webpage address of a browser pre-displayed page;
所述判断单元420,用于判断所述获取单元410所获取的网页地址的域名是否存在于本地预存的配置文件中;The determining unit 420 is configured to determine whether a domain name of the webpage address acquired by the acquiring unit 410 exists in a locally pre-stored configuration file;
所述提取单元430,用于如果所述判断单元420的判断结果为是时,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;The extracting unit 430 is configured to determine, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, the key corresponding to the domain name of the obtained webpage address, if the determination result of the determining unit 420 is YES. a parameter name of the word, and extracting a parameter value corresponding to the keyword parameter name from the webpage address;
所述译码单元440,用于根据所述配置文件中保存的域名与编码方式的对应关系,确定所述获取单元410所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。The decoding unit 440 is configured to determine, according to the correspondence between the domain name and the encoding mode saved in the configuration file, an encoding manner corresponding to the domain name of the webpage address acquired by the acquiring unit 410, and adopt the corresponding encoding manner. The decoding method decodes the extracted parameter values to obtain keywords generated after decoding.
本申请实施例中,终端设备获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。与现有技术相比,本申请实施例在终端设备处,截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。In the embodiment of the present application, the terminal device obtains the webpage address of the browser pre-displayed page; determines whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file; if yes, according to the domain name and key saved in the configuration file Determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship with the coding mode, determining the coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter values by using the decoding method corresponding to the coding mode to obtain the keywords generated after decoding. Compared with the prior art, the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser at the terminal device, and then obtains the user input in the browser according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address. Keywords, the method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, and further, the information recommended to the user according to the keywords It is more accurate and the user feels better.
图4所示实施例中的所述获取单元410,具体用于:通过浏览器的输入接口获取浏览器预显示页面的网页地址。The obtaining unit 410 in the embodiment shown in FIG. 4 is specifically configured to: obtain a webpage address of a browser pre-displayed page through an input interface of the browser.
在图4所示实施例基础上,还可以包括:第一标识信息发送单元和配置文件替换单元;其中,On the basis of the embodiment shown in FIG. 4, the method further includes: a first identifier information sending unit and a configuration file replacing unit; wherein
所述第一标识信息发送单元,用于所述判断单元在判断所述获取单元所获取的网页地址的域名是否存在于本地预存的配置文件中之前,将本地预存 的配置文件的第一标识信息发送给服务器,使得服务器检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;The first identifier information sending unit is configured to: pre-store locally before determining whether the domain name of the webpage address acquired by the acquiring unit exists in the locally pre-stored configuration file. The first identifier information of the configuration file is sent to the server, so that the server detects whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file;
所述配置文件替换单元,用于如果服务器检测接收到的第一标识信息与本地存储的配置文件的第二标识信息不一致时,接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。The configuration file replacement unit is configured to: if the server detects that the received first identification information is inconsistent with the second identification information of the locally stored configuration file, receive a configuration file that is sent by the server and has the second identification information; The received configuration file replaces the locally saved configuration file.
在图4所示实施例和上述实施例基础上,本申请实施例还提供了一种信息推荐装置,如图5所示,该装置应用于服务器,可以包括:接收单元510、确定单元520和推荐单元530;其中,On the basis of the embodiment shown in FIG. 4 and the foregoing embodiment, the embodiment of the present application further provides an information recommendation device. As shown in FIG. 5, the device is applied to a server, and may include: a receiving unit 510, a determining unit 520, and Recommendation unit 530; wherein
所述接收单元510,用于接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;The receiving unit 510 is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is that the terminal device acquires a webpage address of a pre-displayed page of the browser, and determines the obtained webpage address. Whether the domain name exists in the locally stored configuration file, if yes, according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined, and Determining, by the webpage address, a parameter value corresponding to the keyword parameter name, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, using the encoding The decoding method corresponding to the mode is obtained by decoding the extracted parameter values;
所述确定单元520,用于根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;The determining unit 520 is configured to determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword;
所述推荐单元530,用于将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。The recommendation unit 530 is configured to send the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
在图5所示实施例基础上,还可以包括:检测单元和添加单元;并将该实施例称为第一实施例,其中,Based on the embodiment shown in FIG. 5, the detecting unit and the adding unit may also be included; and the embodiment is referred to as the first embodiment, wherein
所述检测单元,用于针对浏览器访问到的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名;The detecting unit is configured to detect, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
所述添加单元,用于当本地当前存储的配置文件中不存在该搜索引擎的域名时,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保 存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。The adding unit is configured to add the domain name of the search engine to the configuration file when the domain name of the search engine does not exist in the currently stored configuration file, and protect the domain name of the search engine. The keyword parameter name and encoding mode corresponding to the search engine are stored, and the identification information of the configuration file is updated.
在图5所示实施例和第一实施例基础上,还可以包括:查找单元和替换单元;并将该实施例称为第二实施例,其中,Based on the embodiment and the first embodiment shown in FIG. 5, the search unit and the replacement unit may be further included; and the embodiment is referred to as the second embodiment, where
所述查找单元,用于当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式;The searching unit is configured to: when detecting a domain name, a keyword parameter name, or a coding mode corresponding to the search engine, searching for a domain name, a keyword parameter name, or an encoding method corresponding to the change engine corresponding to the search engine saved in the configuration file. ;
所述替换单元,用于采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。And the replacing unit is configured to replace the domain name before the change, the keyword parameter name, or the encoding manner by using the changed domain name, the keyword parameter name, or the encoding manner, and update the identifier information of the configuration file.
在第二实施例基础上,还可以包括:周期发送单元,其中,所述周期发送单元,用于按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。On the basis of the second embodiment, the method further includes: a periodic sending unit, wherein the periodic sending unit is configured to send the locally saved configuration file to the terminal device according to the set update period, so that the terminal The device replaces the locally pre-stored configuration file with the received configuration file.
在图5所示实施例基础上,还可以包括:第一标识信息接收单元、配置文件检测单元和配置文件发送单元;其中,On the basis of the embodiment shown in FIG. 5, the method further includes: a first identification information receiving unit, a configuration file detecting unit, and a configuration file sending unit;
所述第一标识信息接收单元,用于接收终端设备发送的所述终端设备本地预存的配置文件的第一标识信息;The first identifier information receiving unit is configured to receive first identifier information of a configuration file pre-stored locally by the terminal device that is sent by the terminal device;
所述配置文件检测单元,用于检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;The configuration file detecting unit is configured to detect whether the received first identification information is consistent with the second identification information of the locally stored configuration file;
所述配置文件发送单元,用于所述配置文件检测单元检测结果为不一致时,将具有第二标识信息的配置文件发送给终端设备,使得所述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。The configuration file sending unit is configured to: when the configuration file detecting unit detects that the detection result is inconsistent, send the configuration file that has the second identification information to the terminal device, so that the terminal device adopts the received second identification information. The configuration file replaces the locally saved configuration file.
本申请实施例还提供了一种信息推荐系统,包括:终端设备和服务器,其中,The embodiment of the present application further provides an information recommendation system, including: a terminal device and a server, where
所述终端设备,用于获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所 获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词;The terminal device is configured to obtain a webpage address of a browser pre-displayed page; determine whether the domain name of the obtained webpage address exists in a locally pre-stored configuration file; if yes, according to the domain name and keyword saved in the configuration file Corresponding relationship of the parameter name, determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Correspondence of coding methods, determine the location Obtaining a coding method corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding method corresponding to the coding mode to obtain a keyword generated after decoding;
所述服务器,用于接收所述终端设备发送该终端设备预显示页面的关键词;根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。The server is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, and determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword; The information is sent to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
应用本申请所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in the present application, the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art. The keyword input by the user in the browser. The method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key The information recommended by the word to the user is more accurate and the user feels better.
本申请实施例还提供了一种终端设备,如图6所示,包括:壳体601、处理器602、存储器603、电路板604和电源电路605,其中,电路板604安置在壳体601围成的空间内部,处理器602和存储器603设置在电路板604上;电源电路605,用于为终端设备的各个电路或器件供电;存储器603用于存储可执行程序代码;处理器602通过读取存储器603中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行所述获取关键词的方法,方法包括:The embodiment of the present application further provides a terminal device, as shown in FIG. 6, comprising: a housing 601, a processor 602, a memory 603, a circuit board 604, and a power circuit 605, wherein the circuit board 604 is disposed in the housing 601. The processor 602 and the memory 603 are disposed on the circuit board 604; the power circuit 605 is used to supply power to the various circuits or devices of the terminal device; the memory 603 is used to store executable program code; and the processor 602 is read by The executable program code stored in the memory 603 is configured to execute a program corresponding to the executable program code for executing the method for acquiring a keyword, the method comprising:
获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
应用本申请图6所示实施例,与现有技术相比,本申请实施例的终端设 备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in FIG. 6 of the present application, the terminal of the embodiment of the present application is compared with the prior art. The webpage address of the pre-displayed page of the browser is intercepted, and the keyword input by the user in the browser is obtained according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address, and the method is applicable to all searches saved in the configuration file. The engine can obtain keywords input by users in many search engines, so that the keywords obtained are more comprehensive. Further, the information recommended to the users according to the keywords is more accurate, and the user feels better.
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行所述获取关键词的方法,方法包括:An embodiment of the present application further provides an application, where the application is configured to execute the method for acquiring a keyword at a runtime, where the method includes:
获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
应用本申请所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in the present application, the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art. The keyword input by the user in the browser. The method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key The information recommended by the word to the user is more accurate and the user feels better.
本申请实施例还提供了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行所述获取关键词的方法,方法包括:The embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute the method for acquiring a keyword at a runtime, where the method includes:
获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值; If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
应用本申请所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in the present application, the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art. The keyword input by the user in the browser. The method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key The information recommended by the word to the user is more accurate and the user feels better.
本申请实施例还提供了一种服务器,如图7所示,包括:壳体701、处理器702、存储器703、电路板704和电源电路705,其中,电路板704安置在壳体701围成的空间内部,处理器702和存储器703设置在电路板上;电源电路705,用于为服务器的各个电路或器件供电;存储器703用于存储可执行程序代码;处理器702通过读取存储器703中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行所述信息推荐方法,方法包括:The embodiment of the present application further provides a server, as shown in FIG. 7, comprising: a housing 701, a processor 702, a memory 703, a circuit board 704, and a power circuit 705, wherein the circuit board 704 is disposed in the housing 701. Internal to the space, the processor 702 and the memory 703 are disposed on the circuit board; the power supply circuit 705 is configured to supply power to the various circuits or devices of the server; the memory 703 is used to store executable program code; and the processor 702 reads the memory 703 by reading The stored executable program code runs a program corresponding to the executable program code for executing the information recommendation method, and the method includes:
接收终端设备发送该终端设备预显示页面的关键词;Receiving, by the terminal device, a keyword of the pre-displayed page of the terminal device;
根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;Determining the recommendation information corresponding to the received keyword according to the correspondence between the locally stored keyword and the recommendation information;
将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。Sending the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
应用本申请图7所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in FIG. 7 of the present application, the terminal device in the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further, according to the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address, compared with the prior art. To obtain the keywords input by the user in the browser, the method is applicable to all the search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are more comprehensive, further, The information recommended to users based on keywords is more accurate and the user feels better.
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行所述信息推荐方法,方法包括:The embodiment of the present application further provides an application, where the application is used to execute the information recommendation method at runtime, and the method includes:
接收终端设备发送该终端设备预显示页面的关键词; Receiving, by the terminal device, a keyword of the pre-displayed page of the terminal device;
根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;Determining the recommendation information corresponding to the received keyword according to the correspondence between the locally stored keyword and the recommendation information;
将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。Sending the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
应用本申请所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in the present application, the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art. The keyword input by the user in the browser. The method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key The information recommended by the word to the user is more accurate and the user feels better.
本申请实施例还提供了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行所述信息推荐方法,方法包括:The embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute the information recommendation method at runtime, where the method includes:
接收终端设备发送该终端设备预显示页面的关键词;Receiving, by the terminal device, a keyword of the pre-displayed page of the terminal device;
根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;Determining the recommendation information corresponding to the received keyword according to the correspondence between the locally stored keyword and the recommendation information;
将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。Sending the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
应用本申请所示实施例,与现有技术相比,本申请实施例的终端设备截获浏览器的预显示页面的网页地址,进而根据该网页地址的域名对应的关键词参数名和编码方式,获得用户在浏览器中输入的关键词,该方法适用于配置文件中保存的所有搜索引擎,即可以获得用户在诸多搜索引擎中输入的关键词,这样获得的关键词比较全面,进一步的,根据关键词向用户推荐的信息则更加准确,用户感受更佳。Applying the embodiment shown in the present application, the terminal device of the embodiment of the present application intercepts the webpage address of the pre-displayed page of the browser, and further obtains the keyword parameter name and the encoding mode corresponding to the domain name of the webpage address according to the prior art. The keyword input by the user in the browser. The method is applicable to all search engines saved in the configuration file, that is, the keywords input by the user in many search engines can be obtained, so that the obtained keywords are comprehensive, further, according to the key The information recommended by the word to the user is more accurate and the user feels better.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。 The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (23)

  1. 一种获取关键词的方法,其特征在于,应用于终端设备,包括:A method for obtaining a keyword, which is characterized by being applied to a terminal device, including:
    获取浏览器预显示页面的网页地址;Obtain the webpage address of the browser pre-displayed page;
    判断所获取的网页地址的域名是否存在于本地预存的配置文件中;Determining whether the domain name of the obtained webpage address exists in the locally pre-stored configuration file;
    如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;If yes, determining a keyword parameter name corresponding to the domain name of the obtained webpage address according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, and extracting the keyword parameter name from the webpage address Corresponding parameter value;
    根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。Determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the coding mode, The keyword generated after decoding.
  2. 根据权利要求1所述的方法,其特征在于,所述获取浏览器预显示页面的网页地址,包括:The method according to claim 1, wherein the obtaining a webpage address of the browser pre-displayed page comprises:
    通过浏览器的输入接口获取浏览器预显示页面的网页地址。Obtain the webpage address of the browser pre-displayed page through the input interface of the browser.
  3. 根据权利要求1所述的方法,其特征在于,判断所获取的网页地址的域名是否存在于本地预存的配置文件中之前,还包括:The method according to claim 1, wherein before determining whether the domain name of the obtained webpage address exists in the locally stored configuration file, the method further includes:
    将本地预存的配置文件的第一标识信息发送给服务器,使得服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息是否一致;And sending, by the server, the first identifier information of the locally stored configuration file to the server, so that the server detects whether the received first identifier information is consistent with the second identifier information of the configuration file locally stored by the server;
    如果不一致,接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。If not, the configuration file with the second identification information sent by the server is received; and the locally saved configuration file is replaced with the received configuration file.
  4. 一种信息推荐方法,其特征在于,应用于服务器,包括:An information recommendation method, which is characterized by being applied to a server, including:
    接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于所述终端本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系, 确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;Receiving, by the terminal device, a keyword of the pre-displayed page of the terminal device; wherein the keyword is a webpage address of the pre-displayed page of the browser, and determining whether the domain name of the obtained webpage address exists in the terminal The local pre-stored configuration file, if present, determines the keyword parameter name corresponding to the domain name of the obtained webpage address according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file, and from the webpage address Extracting a parameter value corresponding to the keyword parameter name, and according to the correspondence between the domain name and the encoding mode saved in the configuration file, Determining an encoding method corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding manner corresponding to the encoding method;
    根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;Determining the recommendation information corresponding to the received keyword according to the correspondence between the locally stored keyword and the recommendation information;
    将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。Sending the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  5. 根据权利要求4所述的方法,其特征在于,还包括:The method of claim 4, further comprising:
    针对浏览器访问到的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名;Detecting, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
    当不存在时,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。When it does not exist, the domain name of the search engine is added to the configuration file, and the keyword parameter name and encoding mode corresponding to the search engine are saved for the domain name of the search engine, and the identification information of the configuration file is updated.
  6. 根据权利要求4或5所述的方法,其特征在于,还包括:The method according to claim 4 or 5, further comprising:
    当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式;When it is detected that the domain name, the keyword parameter name, or the encoding mode of the search engine changes, the domain name, keyword parameter name, or encoding mode corresponding to the change engine corresponding to the search engine stored in the configuration file is searched;
    采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。The changed domain name, keyword parameter name or encoding method is used to replace the domain name before the change, the keyword parameter name or the encoding mode, and the identification information of the configuration file is updated.
  7. 根据权利要求6所述的方法,其特征在于,还包括:The method of claim 6 further comprising:
    按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。And sending the locally saved configuration file to the terminal device according to the set update period, so that the terminal device replaces the locally pre-stored configuration file by receiving the configuration file.
  8. 根据权利要求4所述的方法,其特征在于,还包括:The method of claim 4, further comprising:
    接收终端设备发送的所述终端设备本地预存的配置文件的第一标识信息;Receiving, by the terminal device, first identifier information of a configuration file pre-stored locally by the terminal device;
    检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;Detecting whether the received first identifier information is consistent with the second identifier information of the locally stored configuration file;
    如果不一致,将具有第二标识信息的配置文件发送给终端设备,使得所 述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。If not, send a configuration file with the second identification information to the terminal device, so that The terminal device replaces the locally saved configuration file with the received configuration file with the second identification information.
  9. 一种获取关键词的装置,其特征在于,应用于终端设备,包括:获取单元、判断单元、提取单元和译码单元;其中,An apparatus for acquiring a keyword, comprising: an acquiring unit, a determining unit, an extracting unit, and a decoding unit; wherein
    所述获取单元,用于获取浏览器预显示页面的网页地址;The obtaining unit is configured to obtain a webpage address of a browser pre-displayed page;
    所述判断单元,用于判断所述获取单元所获取的网页地址的域名是否存在于本地预存的配置文件中;The determining unit is configured to determine whether a domain name of the webpage address acquired by the acquiring unit exists in a locally pre-stored configuration file;
    所述提取单元,用于如果所述判断单元的判断结果为是时,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;The extracting unit is configured to determine, according to the correspondence between the domain name and the keyword parameter name saved in the configuration file, a keyword parameter corresponding to the domain name of the obtained webpage address, if the determination result of the determining unit is yes And extracting, from the webpage address, a parameter value corresponding to the keyword parameter name;
    所述译码单元,用于根据所述配置文件中保存的域名与编码方式的对应关系,确定所述获取单元所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词。The decoding unit is configured to determine, according to the correspondence between the domain name and the encoding mode saved in the configuration file, an encoding manner corresponding to the domain name of the webpage address acquired by the acquiring unit, and use the decoding corresponding to the encoding mode. The method decodes the extracted parameter values to obtain keywords generated after decoding.
  10. 根据权利要求9所述的装置,其特征在于,所述获取单元,具体用于:通过浏览器的输入接口获取浏览器预显示页面的网页地址。The device according to claim 9, wherein the obtaining unit is specifically configured to: obtain a webpage address of a browser pre-displayed page through an input interface of the browser.
  11. 根据权利要求9所述的装置,其特征在于,还包括:第一标识信息发送单元和配置文件替换单元;其中,The apparatus according to claim 9, further comprising: a first identification information transmitting unit and a configuration file replacing unit; wherein
    所述第一标识信息发送单元,用于所述判断单元在判断所述获取单元所获取的网页地址的域名是否存在于本地预存的配置文件中之前,将本地预存的配置文件的第一标识信息发送给服务器,使得服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息是否一致;The first identifier information sending unit is configured to: before the determining unit determines whether the domain name of the webpage address acquired by the acquiring unit exists in the locally pre-stored configuration file, the first identifier information of the locally pre-stored configuration file Sending to the server, so that the server detects whether the received first identification information is consistent with the second identification information of the configuration file locally stored by the server;
    所述配置文件替换单元,用于如果服务器检测接收到的第一标识信息与所述服务器本地存储的配置文件的第二标识信息不一致时,接收所述服务器发送的具有第二标识信息的配置文件;并采用接收的该配置文件替换本地保存的配置文件。 The configuration file replacement unit is configured to receive, when the server detects that the received first identification information is inconsistent with the second identification information of the configuration file locally stored by the server, the configuration file that is sent by the server and has the second identification information. ; and replace the locally saved configuration file with the received configuration file.
  12. 一种信息推荐装置,其特征在于,应用于服务器,包括:接收单元、确定单元和推荐单元;其中,An information recommendation device, which is applied to a server, comprising: a receiving unit, a determining unit, and a recommending unit; wherein
    所述接收单元,用于接收终端设备发送该终端设备预显示页面的关键词;其中,所述关键词为所述终端设备获取浏览器的预显示页面的网页地址,判断所获取的网页地址的域名是否存在于所述终端设备本地预存的配置文件中,如果存在,根据配置文件中保存的该域名对应的关键词参数名及编码方式,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值,并根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,采用该编码方式对应的译码方式对所提取的参数值进行译码得到的;The receiving unit is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, where the keyword is a webpage address of the pre-displayed page of the browser, and the obtained webpage address is determined by the terminal device. Whether the domain name exists in the configuration file pre-stored locally by the terminal device, and if yes, the keyword parameter name corresponding to the domain name of the obtained webpage address is determined according to the keyword parameter name and the encoding mode corresponding to the domain name saved in the configuration file. And extracting a parameter value corresponding to the keyword parameter name from the webpage address, and determining, according to the correspondence between the domain name and the encoding mode saved in the configuration file, a coding manner corresponding to the domain name of the obtained webpage address, Decoding the extracted parameter values by using a decoding method corresponding to the coding mode;
    所述确定单元,用于根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;The determining unit is configured to determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword;
    所述推荐单元,用于将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。The recommendation unit is configured to send the determined recommendation information to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  13. 根据权利要求12所述的装置,其特征在于,还包括:检测单元和添加单元;其中,The apparatus according to claim 12, further comprising: a detecting unit and an adding unit; wherein
    所述检测单元,用于针对浏览器访问的每个搜索引擎,检测本地当前存储的配置文件中是否保存该搜索引擎的域名;The detecting unit is configured to detect, for each search engine accessed by the browser, whether the domain name of the search engine is saved in the currently stored configuration file;
    所述添加单元,用于当本地当前存储的配置文件中不存在该搜索引擎的域名时,将该搜索引擎的域名添加到配置文件中,针对该搜索引擎的域名保存该搜索引擎对应的关键词参数名及编码方式,并更新配置文件的标识信息。The adding unit is configured to add the domain name of the search engine to the configuration file when the domain name of the search engine does not exist in the currently stored configuration file, and save the keyword corresponding to the search engine for the domain name of the search engine. Parameter name and encoding method, and update the identification information of the configuration file.
  14. 根据权利要求12或13所述的装置,其特征在于,还包括:查找单元和替换单元;其中,The device according to claim 12 or 13, further comprising: a search unit and a replacement unit; wherein
    所述查找单元,用于当检测到搜索引擎对应的域名、关键词参数名或编码方式发生变化时,查找配置文件中保存的该搜索引擎对应的变化前的域名、关键词参数名或编码方式; The searching unit is configured to: when detecting a domain name, a keyword parameter name, or a coding mode corresponding to the search engine, searching for a domain name, a keyword parameter name, or an encoding method corresponding to the change engine corresponding to the search engine saved in the configuration file. ;
    所述替换单元,用于采用变化后的域名、关键词参数名或编码方式替换变化前的域名、关键词参数名或编码方式,并更新所述配置文件的标识信息。And the replacing unit is configured to replace the domain name before the change, the keyword parameter name, or the encoding manner by using the changed domain name, the keyword parameter name, or the encoding manner, and update the identifier information of the configuration file.
  15. 根据权利要求14所述的装置,其特征在于,还包括:周期发送单元,其中,所述周期发送单元,用于按照设定的更新周期,将本地保存的配置文件发送给所述终端设备,使得所述终端设备利用接收到所述配置文件替换本地预存的配置文件。The device according to claim 14, further comprising: a periodic sending unit, wherein the periodic sending unit is configured to send the locally saved configuration file to the terminal device according to the set update period, And causing the terminal device to replace the locally pre-stored configuration file by receiving the configuration file.
  16. 根据权利要求12所述的装置,其特征在于,还包括:第一标识信息接收单元、配置文件检测单元和配置文件发送单元;其中,The device according to claim 12, further comprising: a first identification information receiving unit, a configuration file detecting unit, and a configuration file transmitting unit; wherein
    所述第一标识信息接收单元,用于接收终端设备发送的所述终端设备本地预存的配置文件的第一标识信息;The first identifier information receiving unit is configured to receive first identifier information of a configuration file pre-stored locally by the terminal device that is sent by the terminal device;
    所述配置文件检测单元,用于检测接收到的第一标识信息与本地存储的配置文件的第二标识信息是否一致;The configuration file detecting unit is configured to detect whether the received first identification information is consistent with the second identification information of the locally stored configuration file;
    所述配置文件发送单元,用于所述配置文件检测单元检测结果为不一致时,将具有第二标识信息的配置文件发送给终端设备,使得所述终端设备采用接收到的具有第二标识信息的配置文件替换本地保存的配置文件。The configuration file sending unit is configured to: when the configuration file detecting unit detects that the detection result is inconsistent, send the configuration file that has the second identification information to the terminal device, so that the terminal device adopts the received second identification information. The configuration file replaces the locally saved configuration file.
  17. 一种信息推荐系统,其特征在于,所述系统包括:终端设备和服务器,其中,An information recommendation system, comprising: a terminal device and a server, wherein
    所述终端设备,用于获取浏览器预显示页面的网页地址;判断所获取的网页地址的域名是否存在于本地预存的配置文件中;如果存在,根据所述配置文件中保存的域名与关键词参数名的对应关系,确定所获取的网页地址的域名对应的关键词参数名,并从所述网页地址中提取所述关键词参数名对应的参数值;根据所述配置文件中保存的域名与编码方式的对应关系,确定所获取的网页地址的域名对应的编码方式,并采用该编码方式对应的译码方式对所提取的参数值进行译码,得到译码后生成的关键词;The terminal device is configured to obtain a webpage address of a browser pre-displayed page; determine whether the domain name of the obtained webpage address exists in a locally pre-stored configuration file; if yes, according to the domain name and keyword saved in the configuration file Corresponding relationship of the parameter name, determining a keyword parameter name corresponding to the domain name of the obtained webpage address, and extracting a parameter value corresponding to the keyword parameter name from the webpage address; according to the domain name saved in the configuration file Corresponding relationship of the coding mode, determining a coding mode corresponding to the domain name of the obtained webpage address, and decoding the extracted parameter value by using a decoding method corresponding to the coding mode to obtain a keyword generated after decoding;
    所述服务器,用于接收所述终端设备发送该终端设备预显示页面的关键词;根据本地存储的关键词与推荐信息的对应关系,确定接收到的关键词对应的推荐信息;将确定的推荐信息发送给所述终端设备,使得所述终端设备在显示所述网页地址对应的页面时将所述推荐信息显示在所述页面中。 The server is configured to receive a keyword that is sent by the terminal device to the pre-displayed page of the terminal device, and determine, according to a correspondence between the locally stored keyword and the recommendation information, recommendation information corresponding to the received keyword; The information is sent to the terminal device, so that the terminal device displays the recommendation information in the page when displaying a page corresponding to the webpage address.
  18. 一种终端设备,其特征在于,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为终端设备的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行权利要求1-3任一项所述的获取关键词的方法。A terminal device, comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; a circuit for powering various circuits or devices of the terminal device; a memory for storing executable program code; the processor running a program corresponding to the executable program code by reading executable program code stored in the memory for use in A method of obtaining a keyword according to any one of claims 1-3.
  19. 一种应用程序,其特征在于,所述应用程序用于在运行时执行权利要求1-3任一项所述的获取关键词的方法。An application, the application being operative to perform the method of obtaining a keyword according to any one of claims 1-3 at runtime.
  20. 一种存储介质,其特征在于,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行权利要求1-3任一项所述的获取关键词的方法。A storage medium for storing an application for performing the method of acquiring a keyword according to any one of claims 1 to 3 at runtime.
  21. 一种服务器,其特征在于,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为服务器的各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行权利要求4-8任一项所述的信息推荐方法。A server, comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, the processor and the memory are disposed on the circuit board; and the power circuit For powering various circuits or devices of the server; the memory is for storing executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory for executing the right The information recommendation method described in any one of 4-8 is required.
  22. 一种应用程序,其特征在于,所述应用程序用于在运行时执行权利要求4-8任一项所述的信息推荐方法。An application, characterized in that the application is operative to perform the information recommendation method according to any one of claims 4-8 at runtime.
  23. 一种存储介质,其特征在于,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行权利要求4-8任一项所述的信息推荐方法。 A storage medium, characterized in that the storage medium is for storing an application for performing the information recommendation method according to any one of claims 4-8 at runtime.
PCT/CN2016/092296 2015-07-31 2016-07-29 Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword WO2017020776A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510462959.1A CN105138579A (en) 2015-07-31 2015-07-31 Method and device for obtaining keywords and recommending information based on keywords
CN201510462959.1 2015-07-31

Publications (1)

Publication Number Publication Date
WO2017020776A1 true WO2017020776A1 (en) 2017-02-09

Family

ID=54723928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092296 WO2017020776A1 (en) 2015-07-31 2016-07-29 Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword

Country Status (2)

Country Link
CN (1) CN105138579A (en)
WO (1) WO2017020776A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795675A (en) * 2019-10-31 2020-02-14 郑州威科姆科技股份有限公司 Single-application multi-domain-name difference display method
CN112134968A (en) * 2020-09-29 2020-12-25 平安普惠企业管理有限公司 Domain name access method and device, electronic equipment and storage medium
CN113065132A (en) * 2021-03-25 2021-07-02 深信服科技股份有限公司 Confusion detection method and device for macro program, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138579A (en) * 2015-07-31 2015-12-09 北京金山安全软件有限公司 Method and device for obtaining keywords and recommending information based on keywords
CN106909565A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 The acquisition methods and device of recommendation information
CN108228631B (en) * 2016-12-15 2021-11-02 北京国双科技有限公司 Keyword page matching method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708132A (en) * 2012-03-06 2012-10-03 奇智软件(北京)有限公司 Method and system for webpage recommendation
US20130086053A1 (en) * 2010-06-11 2013-04-04 Zte Corporation Personalized Meta-Search Method and Application Terminal Thereof
CN103399930A (en) * 2013-08-07 2013-11-20 北京奇虎科技有限公司 Method and device for page jumping based on empty search interlinkage command
CN103792508A (en) * 2014-01-27 2014-05-14 国家电网公司 Error test system and method for digitized metering device
CN103955465A (en) * 2014-03-28 2014-07-30 百度在线网络技术(北京)有限公司 Method and device for generating recommended page
CN105138579A (en) * 2015-07-31 2015-12-09 北京金山安全软件有限公司 Method and device for obtaining keywords and recommending information based on keywords

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359353B (en) * 2008-09-05 2011-05-18 成都市华为赛门铁克科技有限公司 File protection method and device
CN102360321A (en) * 2011-09-30 2012-02-22 奇智软件(北京)有限公司 Terminal program quick backup and recovery method based on cloud architecture
CN102306201B (en) * 2011-09-30 2013-12-04 邢飞 Method and system for analyzing webpage title
CN103778156A (en) * 2012-10-24 2014-05-07 阿里巴巴集团控股有限公司 Method and device for searching for data and server for data search
CN102930059B (en) * 2012-11-26 2015-04-22 电子科技大学 Method for designing focused crawler
CN104679842A (en) * 2015-02-12 2015-06-03 北京集奥聚合科技有限公司 Method for identifying search key words of user in real time

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086053A1 (en) * 2010-06-11 2013-04-04 Zte Corporation Personalized Meta-Search Method and Application Terminal Thereof
CN102708132A (en) * 2012-03-06 2012-10-03 奇智软件(北京)有限公司 Method and system for webpage recommendation
CN103399930A (en) * 2013-08-07 2013-11-20 北京奇虎科技有限公司 Method and device for page jumping based on empty search interlinkage command
CN103792508A (en) * 2014-01-27 2014-05-14 国家电网公司 Error test system and method for digitized metering device
CN103955465A (en) * 2014-03-28 2014-07-30 百度在线网络技术(北京)有限公司 Method and device for generating recommended page
CN105138579A (en) * 2015-07-31 2015-12-09 北京金山安全软件有限公司 Method and device for obtaining keywords and recommending information based on keywords

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795675A (en) * 2019-10-31 2020-02-14 郑州威科姆科技股份有限公司 Single-application multi-domain-name difference display method
CN110795675B (en) * 2019-10-31 2023-04-28 郑州威科姆科技股份有限公司 Single-application multi-domain name difference display method
CN112134968A (en) * 2020-09-29 2020-12-25 平安普惠企业管理有限公司 Domain name access method and device, electronic equipment and storage medium
CN113065132A (en) * 2021-03-25 2021-07-02 深信服科技股份有限公司 Confusion detection method and device for macro program, electronic equipment and storage medium
CN113065132B (en) * 2021-03-25 2023-11-03 深信服科技股份有限公司 Method and device for detecting confusion of macro program, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105138579A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
WO2017020776A1 (en) Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword
US11134101B2 (en) Techniques for detecting malicious behavior using an accomplice model
US10146750B2 (en) Method, apparatus, terminal, and storage medium for image processing
US20180225387A1 (en) Method and apparatus for accessing webpage, apparatus and non-volatile computer storage medium
US20140337408A1 (en) Systems, methods and media for minimizing data downloads
JP6404351B2 (en) Method, apparatus, and system for communicating and presenting merchandise information
US11580294B2 (en) Techniques for web framework detection
US20190259040A1 (en) Information aggregator and analytic monitoring system and method
WO2015139539A1 (en) Video information push method and device
US20150007328A1 (en) Method and System for Quickly Scanning Files
US11080322B2 (en) Search methods, servers, and systems
CN112685671A (en) Page display method, device, equipment and storage medium
CN110737891A (en) host intrusion detection method and device
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN111078219B (en) Page display method, device and system, electronic equipment and storage medium
US20130151945A1 (en) Processing Published and Subscribed Events
CN111367606A (en) Application page display method, device, terminal and medium
US11210453B2 (en) Host pair detection
US8402367B1 (en) Smart reload pages
KR101845181B1 (en) Displaying activity across multiple devices
WO2016150017A1 (en) Page display method, device, system and non-volatile computer storage medium
CN111367898A (en) Data processing method, device, system, electronic equipment and storage medium
EP3289544A1 (en) Insertion of unsaved content via content channel
WO2019015326A1 (en) Method and device for processing static page data
CN113032808B (en) Data processing method and device, readable medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16832264

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 09/04/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16832264

Country of ref document: EP

Kind code of ref document: A1