CN110889027A - Method and device for accessing webpage, terminal equipment and server - Google Patents

Method and device for accessing webpage, terminal equipment and server Download PDF

Info

Publication number
CN110889027A
CN110889027A CN201911163754.8A CN201911163754A CN110889027A CN 110889027 A CN110889027 A CN 110889027A CN 201911163754 A CN201911163754 A CN 201911163754A CN 110889027 A CN110889027 A CN 110889027A
Authority
CN
China
Prior art keywords
webpage
target
target webpage
position information
web page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911163754.8A
Other languages
Chinese (zh)
Inventor
王直菊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911163754.8A priority Critical patent/CN110889027A/en
Publication of CN110889027A publication Critical patent/CN110889027A/en
Pending legal-status Critical Current

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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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

Abstract

The invention provides a method, a device, terminal equipment and a server for accessing a webpage; wherein, the method comprises the following steps: acquiring an access request of a target webpage; the access request carries preset keywords; acquiring the position information of the keywords in the target webpage and the page data of the target webpage; and displaying the page data of the target webpage according to the position information. According to the method and the device, the page data of the target webpage are displayed according to the position information of the keywords, so that the user can quickly find the related contents of the searched keywords in the target webpage, and the user experience is improved.

Description

Method and device for accessing webpage, terminal equipment and server
Technical Field
The invention relates to the technical field of internet, in particular to a method, a device, terminal equipment and a server for accessing a webpage.
Background
In the related art, a user inputs a keyword on a search engine to search, and the keyword is highlighted in a search result in a red marking or highlight mode; selecting and opening a target webpage containing keywords from the search result by the user; however, after the web page content of the target web page is displayed, the user still needs to search for the content related to the keyword from the top of the target web page, which is time-consuming and labor-consuming and affects user experience.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a terminal device and a server for accessing a web page, so as to improve efficiency of finding a searched keyword in a target web page by a user, thereby improving user experience.
In a first aspect, an embodiment of the present invention provides a method for accessing a web page, where the method includes: acquiring an access request of a target webpage; the access request carries preset keywords; acquiring the position information of the keywords in the target webpage and the page data of the target webpage; and displaying the page data of the target webpage according to the position information.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the step of obtaining an access request of a target web page includes: receiving keywords to be searched input by a user; acquiring a search result corresponding to the keyword through a preset search engine; wherein the search results include: at least one web page containing keywords; and if the user selects the webpage in the search result, taking the selected webpage as a target webpage, and generating an access request of the target webpage according to the webpage address and the keywords of the target webpage.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the step of obtaining location information of a keyword in a target webpage includes: sending a query request to a preset resource server so as to query the position information of the keyword in the target webpage from a preset resource library through the resource server; or, searching the position information of the keyword in the target webpage from a webpage server corresponding to the target webpage.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the step of obtaining page data of a target web page includes: extracting a webpage address of a target webpage and an IP address of a webpage server corresponding to the target webpage from the position information; generating an http request packet of the target webpage according to the webpage address of the target webpage; and sending the http request packet to the web server corresponding to the target web page according to the IP address of the web server corresponding to the target web page, so as to return the page data of the target web page through the web server.
With reference to the third possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the step of extracting the web page address of the target web page and the IP address of the web server corresponding to the target web page from the location information includes: and if the IP address of the webpage server corresponding to the target webpage cannot be extracted from the position information, analyzing the webpage address of the target webpage through a preset DNS (domain name system) system to obtain the IP address of the webpage server corresponding to the target webpage.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the location information of the keyword in the target webpage includes: the keywords appear in the text line of the target webpage for the first time; the step of displaying the page data of the target web page according to the position information includes: and displaying the page data of the webpage area corresponding to the position information in the target webpage.
With reference to the fifth possible implementation manner of the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the location information of the keyword in the target webpage includes: the keyword appears in a text line of a target webpage for the first time; the step of displaying the page data of the web page area corresponding to the position information in the target web page includes: and displaying page data adjacent to the text line of the target webpage in which the keywords firstly appear in the page data of the target webpage according to the scale of the display area of the browser.
With reference to the sixth possible implementation manner of the first aspect, an embodiment of the present invention provides a seventh possible implementation manner of the first aspect, where the step of displaying, in the page data of the target web page, page data that is adjacent to a text line of the target web page where the keyword first appears includes: the keywords are first presented in the text line of the target web page and displayed at the top of the display area of the browser.
In a second aspect, an embodiment of the present invention provides a method for accessing a web page, where the method includes: receiving a query request from a user terminal; the query request comprises keywords to be queried and a target webpage; inquiring the position information of the keywords in the target webpage from a preset resource library; and returning the position information to the user terminal so as to display the page data of the target webpage through the user terminal according to the position information.
In a third aspect, an embodiment of the present invention provides an apparatus for accessing a web page, where the apparatus includes: the request acquisition module is used for acquiring an access request of a target webpage; the access request carries preset keywords; the position information acquisition module is used for acquiring the position information of the keywords in the target webpage and the page data of the target webpage; and the page display module is used for displaying the page data of the target webpage according to the position information.
In a fourth aspect, an embodiment of the present invention provides an apparatus for accessing a web page, where the apparatus includes: a request receiving module for receiving a query request from a user terminal; the query request comprises keywords to be queried and a target webpage; the position information query module is used for querying the position information of the keywords in the target webpage from a preset resource library; and the position information returning module is used for returning the position information to the user terminal so as to display the page data of the target webpage through the user terminal according to the position information.
In a fifth aspect, an embodiment of the present invention provides a terminal device, which includes a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the method described above.
In a sixth aspect, embodiments of the present invention provide a server, including a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the above method.
In a seventh aspect, embodiments of the present invention provide a machine-readable storage medium, which stores machine-executable instructions, which when called and executed by a processor, cause the processor to implement the above-mentioned method.
The embodiment of the invention has the following beneficial effects:
after the access request of the target webpage is obtained, the position information of the keywords in the access request in the target webpage and the page data of the target webpage are obtained; thereby displaying page data of the target web page according to the position information. In the method, the page data of the target webpage is displayed according to the position information of the keywords, so that the user can quickly find the related contents of the searched keywords in the target webpage, and the user experience is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention as set forth above.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of an application scenario for accessing a web page according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for accessing a web page according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for accessing a web page according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for accessing a web page according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for accessing a web page according to an embodiment of the present invention;
fig. 6 is an interaction diagram of a user terminal, a resource server, and a server of a target web page in a method for accessing a web page according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for accessing a web page according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another apparatus for accessing a web page according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal device or a server according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For ease of understanding, an application scenario for accessing a web page is first shown, as shown in fig. 1, the scenario including a user terminal, a server of a search engine, and a server of a target web page; the user terminal can be a mobile terminal (such as a tablet computer, a mobile phone and the like), a computer or special terminal equipment, and a browser is installed on the user terminal; the user terminal can access a search engine through a search box of the browser and obtain a search result of the keywords in the search box through the search engine; the search engine can collect information from the internet by using a specific computer program according to a certain strategy based on keywords provided by the user terminal, and returns retrieved related information to the user terminal after organizing and processing the information; the retrieved related information generally includes related information of the target web page, such as a web address. The target webpage is a webpage selected by a user after the webpage related to the keywords is captured by a search engine; when acquiring related information of a target webpage, a search engine needs to communicate with a server of the target webpage; the server of the target webpage can be a cloud server or an entity server, and a website of the target webpage is operated on the server; the user can access the website of the target webpage on the server through a browser installed on the user terminal.
When a user searches keywords, the user needs to input a keyword into a search box corresponding to a search engine on a browser, so that the search engine searches to find a search result containing a web site link (also called an online service entry link) of a webpage; the search result typically includes a plurality of web pages, and the web page selected by the user may be referred to as a target web page. In the related art, the searched keywords can be marked in the search result in a highlighted or reddened form, but after the user opens the target webpage, the user does not know the specific position of the keyword, and still needs to search the content related to the keyword from the top of the webpage downwards, which is time-consuming and labor-consuming.
Based on this, the embodiment of the invention provides a method, a device, a terminal device and a server for accessing a webpage, which can be applied to various webpage accesses based on search keywords.
Firstly, referring to a method for accessing a webpage shown in fig. 2, the method is applied to a user terminal, and the user terminal is in communication connection with a preset resource server; the method comprises the following steps:
step S200, obtaining an access request of a target webpage; the access request carries a preset keyword.
The target web page is generally a web page selected by a user in the keyword-based search result. Firstly, a user terminal receives keywords input by a user in a search box of a browser or other clients; the keywords can be characters or pictures expressing the contents that the user wants to search; then, searching in the Internet through a search engine associated with the search box to obtain a search result returned by the search engine; the search result typically includes one or more web pages, and may be empty under some constraints.
When the search result is not empty, the relevance between the web pages with the larger relevance and the keywords is usually used as the arrangement sequence on the display page of the search result, the web pages with the larger relevance are usually arranged at the front position of the display page, partial content of the web pages and the website links are also displayed on the display page of the search result, and the user can select the target page according to the requirement. After a user clicks a website link of a target webpage through a mouse or a touch screen or other human-computer interaction equipment, a user terminal acquires an access request of the target webpage; the access request typically includes the web page address of the target web page and keywords searched by the user.
Step S202, acquiring the position information of the keywords in the target webpage and the page data of the target webpage.
The position information may be a display position of the keyword on the target webpage, such as a specific coordinate on a display page, a line number of a text line where the keyword is located, and the like; if a plurality of keywords are displayed in the target webpage, the display positions are also a plurality. The page data of the target webpage is data for displaying the target webpage on the user terminal, and is usually stored by a server of the target webpage. The user terminal can access the server of the target webpage based on the address of the target website to acquire the page data of the target webpage.
After the access request of the target webpage is obtained, the keywords in the access request and the website of the target webpage can be sent to the resource server; the resource server can access the server of the target website according to the address of the target website to obtain the position information of the keyword in the target webpage.
The resource server can also be called as a preset resource library, and stores information such as partial page data and addresses of some webpages in the resource library in advance; after the resource server receives the access request, if the information of the target webpage in the access request is already stored in the resource server, the position information of the keyword in the target webpage can be directly inquired in the resource library. The resource server may be combined with a search engine or may be a separately provided server.
And step S204, displaying the page data of the target webpage according to the position information.
After the page data of the target webpage are obtained, displaying the page data of the target webpage on a user terminal in a rendering mode and the like; when displaying the page data, the position information of the keyword used by the user in searching is embodied in the display page of the target page. For example, a text line of a first keyword appearing in the target web page may be displayed in a first line of a display page, and the keyword may also be displayed in a manner of highlighting or marking red, etc.; or the display position of the keyword can be set to the page position which can most attract the attention of the user according to the visual characteristics of the webpage viewed by the user.
After the access request of the target webpage is obtained, the position information of the keywords in the access request in the target webpage and the page data of the target webpage are obtained; thereby displaying page data of the target web page according to the position information. In the method, the page data of the target webpage is displayed according to the position information of the keywords, so that the user can quickly find the related contents of the searched keywords in the target webpage, and the user experience is improved.
The embodiment of the invention also provides another method for accessing the webpage, which is realized on the basis of the method in the embodiment; the method mainly describes a specific implementation process of obtaining an access request of a target webpage (implemented by the following steps S300-S306), and a specific process of obtaining location information of a keyword in the target webpage and page data of the target webpage (implemented by the following steps S308-S316), as shown in fig. 3, the method includes the following steps:
step S300, receiving a keyword to be searched input by a user.
In the actual implementation process, a user can input keywords into a user terminal through a search box through a mouse, a keyboard, a touch screen and other human-computer interaction equipment; the keywords can be characters or pictures.
Step S302, a search result corresponding to the keyword is obtained through a preset search engine; wherein the search results include: at least one web page containing keywords.
The search engine can retrieve the search results related to the keywords from the internet according to the keywords and a certain algorithm. The search engine relies on various technologies, such as web crawler technology, retrieval sorting technology, web page processing technology, big data processing technology, natural language processing technology, etc., and its core modules generally include crawler, indexing, retrieval and sorting, etc. The search result obtained by the search engine may be null, but in the method provided by the embodiment of the present invention, only the case that the search result is not null is considered, that is, the search result includes at least one web page containing keywords.
Step S304, if the user is monitored to select the webpage in the search result, step S306 is executed; if not, the process is ended.
Specifically, a user can view the search results and select one of the webpages according to the requirement; when a user clicks a webpage address link of the webpage, the user terminal can monitor the selected operation of the user on the webpage; if the user does not select the webpage in the search result and the user terminal does not monitor the selection operation of the user on the webpage, the process of searching through the keyword is finished.
And step S306, taking the selected webpage as a target webpage, and generating an access request of the target webpage according to the webpage address and the keywords of the target webpage.
When a user selects a certain webpage in the search results, the webpage is a target webpage; the user terminal can generate the access request of the target webpage according to the webpage address and the keyword of the target webpage and a preset format.
Step S308, sending a query request to a preset resource server, so as to query the location information of the keyword in the target webpage from a preset resource library through the resource server.
The query request usually includes the website and the keyword of the target webpage; the resource library can pre-store the position information of various keywords in each webpage; the location information usually includes the specific location of the keyword on the web page, and may also include related information of the target web page, such as the web page address of the target web page and the IP address of the web page server; the location information is stored in the resource library in a preset format.
After receiving the query request, the resource server can search the position information of the keyword in the target webpage in the resource library; when the position information of the keyword in the target webpage does not exist in the resource library, the resource server can also acquire the position information through a preset resource provider; the resource provider includes, but is not limited to, a server, third party facilitator, or agent of the target page that includes the keyword; the third-party service provider or the agent usually pre-stores the page information of the target page under the authorization of the operator of the target page.
Step S310, if the webpage address of the target webpage and the IP address of the webpage server corresponding to the target webpage can be extracted from the position information, step S314 is executed; if the IP address of the web server corresponding to the target web page cannot be extracted from the location information, step S312 is performed.
Since the web page address of the web page and the IP address of the web page server are usually stored in the location information in a certain format, the obtained location information of the keyword in the target web page can be subjected to corresponding format analysis, so as to obtain the web page address of the target web page and the IP address of the web page server corresponding to the target web page.
Step S312, analyzing the webpage address of the target webpage through a preset DNS (Domain Name Server) system to obtain the IP address of the webpage Server corresponding to the target webpage; step 314 is performed.
When the IP address of the web server in the obtained location information is expired or the IP address of the web server is not stored in the location information, the IP address of the web server corresponding to the target web page may not be extracted from the location information; at this time, the IP address of the web server of the target web page may be acquired by a common DNS resolution method. In short, the local domain name server performs layer-by-layer analysis on the root domain name server, the top-level domain name server to which the target web page belongs, and each level of domain name server, and finally obtains the IP address of the web page server corresponding to the target web page.
Step S314, generating an http request packet of the target webpage according to the webpage address of the target webpage;
the http Request packet is a Request message from a client to a server, which is commonly used in the internet, and mainly includes a Request method URI (Uniform resource identifier) protocol or version, a Request Header (Request Header), and a Request text. The above-mentioned web page address is usually represented by a URL (Uniform Resource Locator); the URL is a URI, and the request method or version of the http request packet may be generated from the web page address of the target web page.
And step S316, according to the IP address of the webpage server corresponding to the target webpage, sending the http request packet to the webpage server corresponding to the target webpage so as to return the page data of the target webpage through the webpage server.
Specifically, page data of the target webpage is stored in a webpage server corresponding to the target webpage; after the IP address of the webpage server is obtained, the http request packet can be directly sent to the webpage server corresponding to the target webpage, and the webpage server responds to the http request and returns the page data of the target webpage to the user terminal.
Step S318 is to display the page data of the web page area corresponding to the position information in the target web page.
The position information comprises the specific position of the keyword in the target webpage, and the page data corresponding to the position information comprises the keyword; displaying the page data including the keywords on the user terminal, so that the user can find the keywords conveniently; further, keywords may be displayed at the top of the current page, which may be more convenient for the user to find.
After receiving a keyword to be searched input by a user, the method for accessing the webpage obtains a search result corresponding to the keyword through a preset search engine; if receiving and monitoring the selected operation of the user on the webpage in the search result, taking the webpage as a target webpage, and generating an access request of the target webpage according to the webpage address and the keywords of the webpage; acquiring the position information of a keyword in an access request in a target webpage by sending a query request to a preset resource server, extracting the IP address of a webpage server of the target webpage from the position information, and acquiring the page data of the target webpage by generating an http request packet and sending the http request packet to the webpage server; therefore, the page data of the webpage area corresponding to the position information in the target webpage is displayed at the user terminal. In the method, the position information of the keyword is acquired through the preset resource server, and the page data of the webpage area corresponding to the position information in the target webpage is directly displayed, so that the efficiency of finding the searched keyword in the target webpage by the user is improved, and the user experience is improved.
The embodiment of the invention also provides another method for accessing the webpage, which is realized on the basis of the method in the embodiment; the method mainly describes another specific process of acquiring the position information data of the keyword in the target webpage (realized by the following step S402), and when the position information of the keyword in the target webpage comprises a text line of the keyword appearing in the target webpage for the first time, the specific process of displaying the page data of the target webpage according to the position information (realized by the following step S410); as shown in fig. 4, the method includes the steps of:
step S400, obtaining an access request of a target webpage; the access request carries preset keywords.
Step S402, searching the position information of the keywords in the target webpage from the webpage server corresponding to the target webpage.
Specifically, after the resource server and the web server are merged, that is, when the web server can also implement the function of querying the location information of the keyword in the target web page, a query request may be sent to the web server corresponding to the target web page, where the query request includes a preset keyword, so that the web server returns the location information of the keyword to the user terminal.
Step S404, extracting the web page address of the target web page and the IP address of the web page server corresponding to the target web page from the position information.
Step S406, generating an http request packet of the target webpage according to the webpage address of the target webpage.
Step S408, according to the IP address of the web server corresponding to the target web page, the http request packet is sent to the web server corresponding to the target web page, so that the web page data of the target web page is returned through the web server.
Step S410, displaying page data, which is adjacent to the text line of the target webpage in which the keyword appears for the first time, in the page data of the target webpage according to the scale of the display area of the browser.
Generally, the display scale of the browser of the same client terminal is in a certain range; through the steps, page data adjacent to the first keyword appearing in the target webpage are ensured to be displayed in the display area of the browser; at this time, the first keyword must appear in the display area of the browser. Specifically, the keyword may be first presented on the text line of the target web page, and displayed at the top of the display area of the browser, and the keyword may be highlighted to make the keyword more conspicuous.
After an access request of a target webpage is obtained, searching position information of a keyword in the target webpage from a webpage server corresponding to the target webpage, extracting an IP address of the webpage server of the target webpage from the position information, and obtaining page data of the target webpage by generating an http request packet and sending the http request packet to the webpage server; therefore, according to the scale of the display area of the browser, page data, adjacent to the text line of the target webpage, of the page data of the target webpage, of the keywords are displayed for the first time. In the method, the first keyword appearing in the target webpage is ensured to be displayed in the display area of the browser, so that a user can find the searched keyword as soon as possible, and the user experience is improved.
The embodiment of the invention also provides another method for accessing the webpage, which is realized on the basis of the method in the embodiment and is applied to the resource server; as shown in fig. 5, the method comprises the steps of:
step S500, receiving a query request from a user terminal; the query request comprises keywords to be queried and a target webpage.
Step S502, inquiring the position information of the keywords in the target webpage from a preset resource library;
step S504, the position information is returned to the user terminal, so that the page data of the target webpage is displayed through the user terminal according to the position information.
After receiving a query request from a user terminal, the method for accessing a webpage queries the position information of a keyword in a target webpage from a preset resource library, and returns the position information to the user terminal, so that the user terminal displays the page data of the target webpage according to the position information. In the method, the position information of the keyword in the target webpage is returned to the user terminal, so that the user terminal directly reflects the position information in the display page of the target webpage, the efficiency of finding the searched keyword in the target webpage by the user is improved, and the user experience is improved.
The embodiment of the invention also provides another method for accessing the webpage, which is realized on the basis of the method in the embodiment; the method utilizes a resource server (also called as a skip service platform) to link the searched keywords with the first appearing keywords in the target webpage, and directly displays a first keyword on a browser display page of a user terminal; compared with the related technology, the browser display page of the user terminal directly jumps to the top of the webpage, the efficiency of searching the position of the keyword by the user is higher, and the user experience is better. The method is realized by the interaction of a user terminal, a resource server and a web server (also called a web server) of a target web page; as shown in fig. 6, the method comprises the steps of:
step S600, receiving keywords input by a user; specifically, a user inputs keywords meeting certain grammatical rules in the browser address bar, a plurality of result webpages are output, and the keywords are displayed in red before clicking in the webpage, so that the webpage content contains the keywords.
Step S602, when it is monitored that the user clicks the web page link, sending the keyword (also referred to as keyword jump name) to the resource server.
Step S604, the resource server reads the related information of the keyword jump name from a preset resource library (also called a target webpage resource library) according to the keyword; specifically, the resource server links the retrieved keyword with a first keyword in a target webpage, and reads related information of a keyword jump name from a preset resource library (also called as a target webpage resource library); the related information includes, but is not limited to, the specific location of the web page corresponding to the jump name.
The related information of the keyword in the preset resource library (also referred to as a keyword name resource) is submitted by a resource provider through a platform or an Open API (Open application Programming Interface) of the keyword name provided by a resource server provider, where the resource provider includes, but is not limited to, a server corresponding to a web page corresponding to the jump name, a third party service provider or an agent, and the resource server itself.
Step S606, the resource server returns the related information of the keyword to the browser of the user terminal.
Step S608, the browser of the user terminal constructs an http request packet according to the URL address in the relevant information.
Step S610, the user terminal sends the http request packet to the web server of the target web page according to the IP address of the target web server in the keyword related information.
Step S612, the web server of the target web page returns an http response packet to the user terminal.
Step S614, the browser of the user terminal skips and displays the web page corresponding to the http response packet; specifically, the web page corresponding to the http response packet is skipped, rendered and displayed in a browser window, and the row where the keyword is located is displayed at the top of the display page of the browser.
In addition, if the returned keyword related information does not contain the IP address of the server of the target webpage, or the IP address cannot be communicated, the browser loads the URL address according to the existing mechanism of loading the web page of the browser. If the URL address is not in the returned keyword related information or the related information indicates that the resource server is temporarily inaccessible for various reasons, the browser directly shows the webpage to the user according to a target page display mode in the related technology.
In the method, the resource server is adopted to obtain the specific position of the keyword, so that the display page of the browser of the client terminal can reach the line of the keyword in the webpage directly, the time for a user to find the keyword is greatly reduced, and the user experience is improved.
Corresponding to the above method embodiment for accessing a web page, an embodiment of the present invention further provides an apparatus for accessing a web page, as shown in fig. 7, where the apparatus includes:
a request obtaining module 700, configured to obtain an access request of a target webpage; the access request carries preset keywords;
a location information obtaining module 702, configured to obtain location information of the keyword in the target webpage and page data of the target webpage;
and a page display module 704, configured to display page data of the target webpage according to the location information.
After the device for accessing the webpage obtains the access request of the target webpage, the position information of the keywords in the access request in the target webpage and the page data of the target webpage are obtained; thereby displaying page data of the target web page according to the position information. In the method, the page data of the target webpage is displayed according to the position information of the keywords, so that the user can quickly find the related contents of the searched keywords in the target webpage, and the user experience is improved.
Specifically, the request obtaining module is further configured to: receiving keywords to be searched input by a user; acquiring a search result corresponding to the keyword through a preset search engine; wherein the search results include: at least one web page containing keywords; and if the user selects the webpage in the search result, taking the selected webpage as a target webpage, and generating an access request of the target webpage according to the webpage address and the keywords of the target webpage.
Specifically, the position information acquiring module is further configured to: sending a query request to a preset resource server so as to query the position information of the keyword in the target webpage from a preset resource library through the resource server; or, searching the position information of the keyword in the target webpage from a webpage server corresponding to the target webpage.
Specifically, the position information acquiring module is further configured to: extracting a webpage address of a target webpage and an IP address of a webpage server corresponding to the target webpage from the position information; generating an http request packet of the target webpage according to the webpage address of the target webpage; and sending the http request packet to the web server corresponding to the target web page according to the IP address of the web server corresponding to the target web page, so as to return the page data of the target web page through the web server.
Further, the position information obtaining module is further configured to: and if the IP address of the webpage server corresponding to the target webpage cannot be extracted from the position information, analyzing the webpage address of the target webpage through a preset DNS (domain name system) system to obtain the IP address of the webpage server corresponding to the target webpage.
Specifically, the page display module is further configured to: and displaying the page data of the webpage area corresponding to the position information in the target webpage.
In the actual implementation process, the position information of the keywords in the target webpage comprises a text line of the target webpage in which the keywords firstly appear; further, the page display module is further configured to: and displaying page data adjacent to the text line of the target webpage in which the keywords firstly appear in the page data of the target webpage according to the scale of the display area of the browser.
Further, the page display module is further configured to: the keywords are first presented in the text line of the target web page and displayed at the top of the display area of the browser.
The implementation principle and the generated technical effect of the device for accessing a webpage provided by the embodiment of the invention are the same as those of the embodiment of the method for accessing a webpage, and for brief description, the embodiment of the device for accessing a webpage is not mentioned, and reference can be made to the corresponding contents in the embodiment of the method for accessing a webpage.
Corresponding to the above method embodiment for accessing a web page, an embodiment of the present invention further provides an apparatus for accessing a web page, as shown in fig. 8, where the apparatus includes:
a request receiving module 800, configured to receive a query request from a user terminal; the query request comprises keywords to be queried and a target webpage;
a location information query module 802, configured to query location information of the keyword in the target webpage from a preset resource library;
and a location information returning module 804, configured to return the location information to the user terminal, so that the page data of the target webpage is displayed by the user terminal according to the location information.
After receiving a query request from a user terminal, the device for accessing a webpage queries the position information of a keyword in a target webpage from a preset resource library, and returns the position information to the user terminal, so that the user terminal displays the page data of the target webpage according to the position information. In the method, the position information of the keyword in the target webpage is returned to the user terminal, so that the user terminal directly reflects the position information in the display page of the target webpage, the efficiency of finding the searched keyword in the target webpage by the user is improved, and the user experience is improved.
An embodiment of the present invention further provides a terminal device, as shown in fig. 9, where the terminal device includes a processor 130 and a memory 131, the memory 131 stores machine executable instructions that can be executed by the processor 130, and the processor 130 executes the machine executable instructions to implement a method for accessing a web page.
An embodiment of the present invention further provides a server, as shown in fig. 9, where the server includes a processor 130 and a memory 131, the memory 131 stores machine executable instructions capable of being executed by the processor 130, and the processor 130 executes the machine executable instructions to implement a method for accessing a web page.
Further, the server shown in fig. 9 further includes a bus 132 and a communication interface 133, and the processor 130, the communication interface 133 and the memory 131 are connected through the bus 132.
The Memory 131 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 132 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
The processor 130 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 130. The Processor 130 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for accessing a web page.
The method, the device and the computer program product for accessing a webpage provided by the embodiment of the present invention include a computer readable storage medium storing a program code, and instructions included in the program code may be used to execute the method described in the foregoing method embodiment.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (14)

1. A method of accessing a web page, the method comprising:
acquiring an access request of a target webpage; the access request carries preset keywords;
acquiring the position information of the keywords in the target webpage and the page data of the target webpage;
and displaying the page data of the target webpage according to the position information.
2. The method of claim 1, wherein the step of obtaining an access request for the target web page comprises:
receiving keywords to be searched input by a user;
acquiring a search result corresponding to the keyword through a preset search engine; wherein the search results include: at least one webpage containing the keywords;
and if the selected operation of the user on the webpage in the search result is monitored, the selected webpage is used as a target webpage, and the access request of the target webpage is generated according to the webpage address of the target webpage and the keyword.
3. The method of claim 1, wherein the step of obtaining the location information of the keyword in the target webpage comprises:
sending a query request to a preset resource server so as to query the position information of the keyword in the target webpage from a preset resource library through the resource server;
or, searching the position information of the keyword in the target webpage from a webpage server corresponding to the target webpage.
4. The method of claim 1, wherein the step of obtaining page data of the target web page comprises:
extracting the webpage address of the target webpage and the IP address of a webpage server corresponding to the target webpage from the position information;
generating an http request packet of the target webpage according to the webpage address of the target webpage;
and sending the http request packet to the web server corresponding to the target web page according to the IP address of the web server corresponding to the target web page, so as to return the page data of the target web page through the web server.
5. The method of claim 4, wherein the step of extracting the web page address of the target web page and the IP address of the web server corresponding to the target web page from the location information comprises:
and if the IP address of the webpage server corresponding to the target webpage is not extracted from the position information, analyzing the webpage address of the target webpage through a preset DNS (domain name system) system to obtain the IP address of the webpage server corresponding to the target webpage.
6. The method according to claim 1, wherein the step of displaying the page data of the target webpage according to the location information comprises: and displaying the page data of the webpage area corresponding to the position information in the target webpage.
7. The method of claim 6, wherein the location information of the keyword in the target webpage comprises: the keywords appear in a text line of the target webpage for the first time;
the step of displaying the page data of the web page area corresponding to the position information in the target web page includes:
and displaying page data which is adjacent to the text line of the target webpage in the page data of the target webpage with the keyword appearing for the first time according to the scale of the display area of the browser.
8. The method according to claim 7, wherein the step of displaying page data adjacent to a text line of the target web page where the keyword first appears in the page data of the target web page comprises: and displaying the keywords on the top of a display area of the browser.
9. A method of accessing a web page, the method comprising:
receiving a query request from a user terminal; the query request comprises keywords to be queried and a target webpage;
inquiring the position information of the keywords in the target webpage from a preset resource library;
and returning the position information to the user terminal so as to display the page data of the target webpage through the user terminal according to the position information.
10. An apparatus for accessing a web page, the apparatus comprising:
the request acquisition module is used for acquiring an access request of a target webpage; the access request carries preset keywords;
the position information acquisition module is used for acquiring the position information of the keywords in the target webpage and the page data of the target webpage;
and the page display module is used for displaying the page data of the target webpage according to the position information.
11. An apparatus for accessing a web page, the apparatus comprising:
a request receiving module for receiving a query request from a user terminal; the query request comprises keywords to be queried and a target webpage;
the position information query module is used for querying the position information of the keyword in the target webpage from a preset resource library;
and the position information returning module is used for returning the position information to the user terminal so as to display the page data of the target webpage through the user terminal according to the position information.
12. A terminal device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the method of any one of claims 1 to 8.
13. A server comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the method of claim 9.
14. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1 to 9.
CN201911163754.8A 2019-11-22 2019-11-22 Method and device for accessing webpage, terminal equipment and server Pending CN110889027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911163754.8A CN110889027A (en) 2019-11-22 2019-11-22 Method and device for accessing webpage, terminal equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911163754.8A CN110889027A (en) 2019-11-22 2019-11-22 Method and device for accessing webpage, terminal equipment and server

Publications (1)

Publication Number Publication Date
CN110889027A true CN110889027A (en) 2020-03-17

Family

ID=69748719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911163754.8A Pending CN110889027A (en) 2019-11-22 2019-11-22 Method and device for accessing webpage, terminal equipment and server

Country Status (1)

Country Link
CN (1) CN110889027A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110015996A1 (en) * 2009-07-14 2011-01-20 Anna Kassoway Systems and Methods For Providing Keyword Related Search Results in Augmented Content for Text on a Web Page
CN104462427A (en) * 2014-12-12 2015-03-25 百度在线网络技术(北京)有限公司 Method and device for displaying search contents
CN104915451A (en) * 2015-06-30 2015-09-16 北京奇虎科技有限公司 A method for fast locating search query term in browser and browser
CN107870721A (en) * 2016-09-27 2018-04-03 北京搜狗科技发展有限公司 Search result shows method, apparatus and the device showed for search result
CN110059258A (en) * 2019-04-28 2019-07-26 百度在线网络技术(北京)有限公司 Search result shows method, apparatus and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110015996A1 (en) * 2009-07-14 2011-01-20 Anna Kassoway Systems and Methods For Providing Keyword Related Search Results in Augmented Content for Text on a Web Page
CN104462427A (en) * 2014-12-12 2015-03-25 百度在线网络技术(北京)有限公司 Method and device for displaying search contents
CN104915451A (en) * 2015-06-30 2015-09-16 北京奇虎科技有限公司 A method for fast locating search query term in browser and browser
CN107870721A (en) * 2016-09-27 2018-04-03 北京搜狗科技发展有限公司 Search result shows method, apparatus and the device showed for search result
CN110059258A (en) * 2019-04-28 2019-07-26 百度在线网络技术(北京)有限公司 Search result shows method, apparatus and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
卢曼莎: "《电子商务导论》", 30 September 2010, 武汉大学出版社 *
陆和建等: "《信息检索与利用》", 31 July 2017, 安徽师范大学出版社 *

Similar Documents

Publication Publication Date Title
CN103577597B (en) Keyword search system based on current browse webpage
CN103577596B (en) Keyword search methodology and device based on current browse webpage
CN108717435B (en) Webpage loading method, information processing method, computer equipment and storage medium
CN103577595B (en) Keyword method for pushing and device based on current browse webpage
CN108366058B (en) Method, device, equipment and storage medium for preventing traffic hijacking of advertisement operator
CN109918594B (en) Information display method and device
CN103617241B (en) Search information processing method, browser terminal and server
CN107644100B (en) Information processing method, device and system and computer readable storage medium
US20160173953A1 (en) Method, Device, Server, and Client Device for Video Processing
CN103488781A (en) Method and search engine server for providing information search
CN111104587A (en) Webpage display method and device and server
JP6520513B2 (en) Question and Answer Information Providing System, Information Processing Device, and Program
CN110222251B (en) Service packaging method based on webpage segmentation and search algorithm
CN103838862B (en) Video searching method, device and terminal
US20130024394A1 (en) Server apparatus, reaction transmitting program, recording medium having computer-readable reaction transmitting program recorded thereon, terminal device, reaction counting method, and reaction counting system
CN102955850A (en) Method and device for loading sequencing website
US8140508B2 (en) System and method for contextual commands in a search results page
CN111090797A (en) Data acquisition method and device, computer equipment and storage medium
KR101637016B1 (en) Method for providing user reaction web page
JP2007128367A (en) Information retrieval knowhow management system
CN112035744A (en) Page recommendation method, device, equipment and storage medium
CN111209325A (en) Service system interface identification method, device and storage medium
CN110889027A (en) Method and device for accessing webpage, terminal equipment and server
CN104850608A (en) Method for searching keywords on information exhibiting page
JP6894875B2 (en) Brand dictionary creation device, product evaluation device, brand dictionary creation method and program.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200317