CN105260433A - Webpage content collecting method and electronic device - Google Patents
Webpage content collecting method and electronic device Download PDFInfo
- Publication number
- CN105260433A CN105260433A CN201510639947.1A CN201510639947A CN105260433A CN 105260433 A CN105260433 A CN 105260433A CN 201510639947 A CN201510639947 A CN 201510639947A CN 105260433 A CN105260433 A CN 105260433A
- Authority
- CN
- China
- Prior art keywords
- preset
- content
- user
- text
- text format
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9562—Bookmark management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种网页内容收藏方法,包括:在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作,若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作,若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容,将所述用户选中的内容保存在一预设文档中。本发明实现了用户在浏览网页遇到想要收藏的内容时,可以方便、快捷地收藏该内容,提高了收藏效率的技术效果。同时,本发明还提供了一种电子设备。
The invention discloses a method for storing webpage content, which includes: when a user browses a webpage through a browser, detecting whether there is a trigger operation for triggering a preset button on the browser interface; if the trigger operation is detected, Then detect whether there is a selection operation performed by the user on the web page, and if the selection operation is detected, then based on the selection operation, determine the content selected by the user on the web page, and display the content selected by the user The selected content is saved in a preset file. The invention realizes the technical effect of conveniently and quickly collecting the content when the user encounters the content to be collected while browsing the webpage, and improves the collection efficiency. At the same time, the invention also provides an electronic device.
Description
技术领域technical field
本发明涉及互联网技术领域,尤其涉及一种网页内容收藏方法及电子设备。The invention relates to the technical field of the Internet, in particular to a method for storing webpage content and electronic equipment.
背景技术Background technique
随着科学技术的不断发展,计算机已经广泛普及,给人们的工作和生活带来了诸多便利。人们可以使用计算机处理文档、上网冲浪、玩游戏、听音乐、控制工业生产等等。With the continuous development of science and technology, computers have been widely popularized, bringing many conveniences to people's work and life. People can use computers to process documents, surf the Internet, play games, listen to music, control industrial production, and so on.
人们在写论文时,经常要使用计算机上网查找资料。目前,人们在网页上看到需要的内容并想要收藏该内容时,通常的办法是:先选中该内容,然后对该内容进行复制,再新建一文档(例如:word文档、或txt文档),将复制的内容粘贴到该文档中,再进行保存。整个过程中,用户需要执行选中、复制、新建、粘贴、保存等多个操作步骤,才能将需要的内容收藏到一文档中,操作繁琐,十分不方便。When people are writing papers, they often use computers to search for information on the Internet. At present, when people see the content they need on the webpage and want to bookmark the content, the usual way is: first select the content, then copy the content, and then create a new document (for example: word document or txt document) , paste the copied content into the document, and save it. During the whole process, the user needs to perform multiple operation steps such as selecting, copying, creating, pasting, saving, etc., in order to collect the required content into a document, which is cumbersome and inconvenient.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的网页内容收藏方法及电子设备。In view of the above problems, the present invention is proposed to provide a webpage content collection method and an electronic device that overcome the above problems or at least partially solve the above problems.
本发明的一个方面,提供了一种网页内容收藏方法,包括:One aspect of the present invention provides a method for collecting webpage content, including:
在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作;When a user browses a webpage through a browser, detect whether there is a trigger operation for triggering a preset button on the browser interface;
若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作;If the trigger operation is detected, it is detected whether there is a selection operation performed by the user on the web page;
若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容;If the selection operation is detected, then based on the selection operation, determine the content selected by the user on the web page;
将所述用户选中的内容保存在一预设文档中。The content selected by the user is saved in a preset file.
优选地,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。Preferably, a sign indicating that the content selected by the user is saved in the preset file is displayed on the preset button.
优选地,所述检测是否有用于触发所述浏览器界面上一预设按钮的触发操作,包括:Preferably, the detecting whether there is a trigger operation for triggering a preset button on the browser interface includes:
检测是否有点击所述预设按钮的点击操作;或detect whether there is a click operation of clicking the preset button; or
检测是否有鼠标指针在所述预设按钮上的悬停操作。Detect whether there is a hovering operation of the mouse pointer on the preset button.
优选地,所述将所述用户选中的内容保存在一预设文档中之后,还包括:Preferably, after saving the content selected by the user in a preset file, the method further includes:
跳转执行所述检测是否有用户在所述网页上进行的划选操作。Jumping to perform the detection whether there is a selection operation performed by the user on the web page.
优选地,在所述用户选中的内容为第一文本内容时,所述将所述用户选中的内容保存在一预设文档中,包括:Preferably, when the content selected by the user is the first text content, the saving the content selected by the user in a preset file includes:
基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容;Adjusting the first text format of the first text content to the preset text format based on the preset text format corresponding to the preset document to obtain the first text content in the preset text format;
将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中。saving the first text content in the preset text format in the preset document.
优选地,所述基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容,包括:Preferably, based on the preset text format corresponding to the preset document, the first text format of the first text content is adjusted to the preset text format, and the document in the preset text format is obtained. The first text content, including:
检测在所述预设文档中是否已经保存有第二文本内容;Detecting whether the second text content has been saved in the preset document;
若检测到所述第二文本内容,则将所述第二文本内容的第二文本格式确定为所述预设文本格式;If the second text content is detected, determining the second text format of the second text content as the preset text format;
基于所述预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容。Based on the preset text format, the first text format of the first text content is adjusted to the preset text format to obtain the first text content in the preset text format.
优选地,所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,还包括:Preferably, after saving the first text content in the preset text format in the preset document, the method further includes:
检测是否有用于打开所述预设文档的打开操作;Detecting whether there is an open operation for opening the preset document;
若检测到所述打开操作,则打开所述预设文档,以将具有所述预设文本格式的所述第一文本内容展示出来。If the opening operation is detected, the preset document is opened to display the first text content in the preset text format.
本发明的另一个方面,提供了一种电子设备,包括:Another aspect of the present invention provides an electronic device, comprising:
第一检测模块,用于在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作;The first detection module is used to detect whether there is a trigger operation for triggering a preset button on the browser interface when the user browses a webpage through the browser;
第二检测模块,用于若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作;The second detection module is used to detect whether there is a selection operation performed by the user on the webpage if the trigger operation is detected;
确定模块,用于若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容;A determination module, configured to determine the content selected by the user on the webpage based on the selection operation if the selection operation is detected;
保存模块,用于将所述用户选中的内容保存在一预设文档中。The saving module is used to save the content selected by the user in a preset file.
优选地,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。Preferably, a sign indicating that the content selected by the user is saved in the preset file is displayed on the preset button.
优选地,所述第一检测模块,具体用于:Preferably, the first detection module is specifically used for:
检测是否有点击所述预设按钮的点击操作;或detect whether there is a click operation of clicking the preset button; or
检测是否有鼠标指针在所述预设按钮上的悬停操作。Detect whether there is a hovering operation of the mouse pointer on the preset button.
优选地,所述电子设备,还包括:Preferably, the electronic device further includes:
跳转模块,用于所述将所述用户选中的内容保存在一预设文档中之后,跳转执行所述检测是否有用户在所述网页上进行的划选操作。The jumping module is used for jumping to execute the detecting whether there is a selection operation performed by the user on the webpage after saving the content selected by the user in a preset file.
优选地,在所述用户选中的内容为第一文本内容时,所述保存模块,包括:Preferably, when the content selected by the user is the first text content, the saving module includes:
调整单元,用于基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容;an adjusting unit, configured to adjust the first text format of the first text content to the preset text format based on the preset text format corresponding to the preset document, and obtain the document in the preset text format first text content;
保存单元,用于将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中。A saving unit, configured to save the first text content in the preset text format in the preset document.
优选地,所述调整单元,具体用于:Preferably, the adjustment unit is specifically used for:
检测在所述预设文档中是否已经保存有第二文本内容;若检测到所述第二文本内容,则将所述第二文本内容的第二文本格式确定为所述预设文本格式;基于所述预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容。Detecting whether the second text content has been saved in the preset document; if the second text content is detected, determining the second text format of the second text content as the preset text format; based on In the preset text format, the first text format of the first text content is adjusted to the preset text format to obtain the first text content in the preset text format.
优选地,所述电子设备,还包括:Preferably, the electronic device further includes:
检测模块,用于所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,检测是否有用于打开所述预设文档的打开操作;A detection module, configured to detect whether there is an opening operation for opening the preset document after the first text content having the preset text format is saved in the preset document;
打开模块,用于若检测到所述打开操作,则打开所述预设文档,以将具有所述预设文本格式的所述第一文本内容展示出来。The opening module is configured to open the preset document if the opening operation is detected, so as to display the first text content in the preset text format.
本申请实施例中提供的技术方案,至少具有如下技术效果或优点:The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
1、在本申请实施例中,在用户通过浏览器浏览一网页时,检测是否有用于触发浏览器界面上一预设按钮的触发操作,若检测到触发操作,则检测是否有用户在网页上进行的划选操作,若检测到划选操作,则基于划选操作在网页上确定用户选中的内容,将用户选中的内容保存在一预设文档中。可见,在用户触发该预设按钮(“收藏”按钮)后,用户在浏览网页遇到想要收藏的内容时,仅需通过划选操作选中想要收藏的内容,即可实现对该内容进行收藏。所以,有效地解决了现有技术中用户在浏览网页遇到想要收藏的内容时,需要多个操作步骤才能收藏该内容,操作繁琐的技术问题。实现了用户在浏览网页遇到想要收藏的内容时,可以方便、快捷地收藏该内容,提高了收藏效率的技术效果。1. In the embodiment of the present application, when a user browses a webpage through a browser, it is detected whether there is a trigger operation for triggering a preset button on the browser interface, and if a trigger operation is detected, it is detected whether there is a user on the webpage If the selection operation is performed, if the selection operation is detected, the content selected by the user is determined on the webpage based on the selection operation, and the content selected by the user is saved in a preset file. It can be seen that after the user triggers the preset button ("Favorite" button), when the user encounters the content he wants to collect when browsing the webpage, he only needs to select the content he wants to collect through the selection operation, and then the content can be realized. collect. Therefore, it effectively solves the technical problem in the prior art that when users encounter content they want to bookmark while browsing the webpage, multiple operation steps are required to bookmark the content, and the operation is cumbersome. The technical effect that the user can conveniently and quickly collect the content when encountering the content that he wants to collect when browsing the webpage is realized, and the collection efficiency is improved.
2、在本申请实施例中,在将用户选中的内容保存在一预设文档中之后,跳转执行检测是否有用户在所述网页上进行的划选操作,以在检测到用户的下一次划选操作时,能够基于用户的下一次划选操作,将用户下一次选中的内容保存所述预设文件中,无需用户再次触发该预设按钮,从而进一步提高了收藏效率。2. In the embodiment of the present application, after the content selected by the user is saved in a preset file, the jump is performed to detect whether there is a selection operation performed by the user on the web page, so that the next time the user is detected During the selection operation, the content selected by the user next time can be saved in the preset file based on the user's next selection operation, without the need for the user to trigger the preset button again, thereby further improving the collection efficiency.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:
图1示出了根据本发明一个实施例的一种网页内容收藏方法的流程图;Fig. 1 shows a flow chart of a method for collecting webpage content according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的一种电子设备的结构示意图。Fig. 2 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
本发明实施例提供了一种网页内容收藏方法及电子设备,用以克服或者至少部分地解决现有技术中用户在浏览网页遇到想要收藏的内容时,需要多个操作步骤才能收藏该内容,操作繁琐的技术问题。Embodiments of the present invention provide a method and electronic device for collecting webpage content, which are used to overcome or at least partly solve the problem in the prior art that when a user encounters content that he or she wants to collect while browsing a webpage, multiple steps are required to collect the content. , technical problems of cumbersome operation.
本实施例提供了一种网页内容收藏方法,应用于电子设备中,该电子设备可以是台式机电脑、笔记本电脑、平板电脑、智能手机等等,对于该电子设备具体是何种电子设备,本实施例不做具体限定。该电子设备包括一显示器,用于显示图像信息,其中,针对台式机电脑和笔记本电脑,该显示器可以不具有触控功能,用户可以通过鼠标、键盘进行人机交互;针对平板电脑和智能手机,该显示器应具有触控功能,用户可以通过具有触控功能的显示器(即:触摸屏)进行人机交互。该电子设备中安装有一浏览器,用户可以通过该浏览器上网。This embodiment provides a method for collecting webpage content, which is applied to electronic equipment. The electronic equipment can be a desktop computer, a notebook computer, a tablet computer, a smart phone, etc. As for the specific electronic equipment of the electronic equipment, this Examples are not specifically limited. The electronic device includes a display for displaying image information, wherein, for desktop computers and notebook computers, the display may not have a touch function, and the user can perform human-computer interaction through a mouse and a keyboard; for tablet computers and smart phones, The display should have a touch function, and the user can perform human-computer interaction through the display with the touch function (ie: touch screen). A browser is installed in the electronic device, and the user can surf the Internet through the browser.
本实施例中所介绍的一种网页内容收藏方法,其执行主体为上述电子设备,具体可以为安装在电子设备内的浏览器。A method for storing webpage content introduced in this embodiment is executed by the above-mentioned electronic device, specifically, a browser installed in the electronic device.
本实施例提供了一种网页内容收藏方法,如图1所示,包括:This embodiment provides a method for collecting webpage content, as shown in Figure 1, including:
步骤S101:在用户通过浏览器浏览一网页时,检测是否有用于触发浏览器界面上一预设按钮的触发操作。Step S101: When a user browses a webpage through a browser, detect whether there is a trigger operation for triggering a preset button on the browser interface.
作为一种可选的实施方式,在步骤S101中,该预设按钮可以设置在浏览器界面的任一位置,例如:工具栏中、或插件栏中,或侧边栏中,或网页浏览区域上。As an optional implementation, in step S101, the preset button can be set anywhere on the browser interface, for example: in the toolbar, or in the plug-in bar, or in the sidebar, or in the web browsing area superior.
作为一种可选的实施方式,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。例如:该预设按钮为“收藏”按钮,上面显示有“收藏”二字,用于表示该预设按钮的功能是将用户选中的内容进行收藏。As an optional implementation manner, a sign indicating that the content selected by the user is saved in the preset file is displayed on the preset button. For example: the preset button is a "Favorite" button, and the word "Favorite" is displayed on it, which is used to indicate that the function of the preset button is to collect the content selected by the user.
作为一种可选的实施方式,该预设按钮可以仅对当前浏览网页有效,即:在该预设按钮被触发后,只对当前浏览的网页开启“划词收藏”功能(即:步骤S102~步骤S104)。或者,该预设按钮可以对浏览器打开的所有网页都有效,即:对于浏览器打开的所有网页,都开启“划词收藏”功能。另外,在该预设按钮再次被触发后,则关闭“划词收藏”功能。As an optional implementation, the preset button can only be valid for the currently browsed webpage, that is, after the preset button is triggered, only the "marked word collection" function is opened for the currently browsed webpage (ie: step S102 ~step S104). Alternatively, the preset button may be valid for all webpages opened by the browser, that is, for all webpages opened by the browser, the function of "marking word collection" is enabled. In addition, after the preset button is triggered again, the "marked word collection" function is turned off.
作为一种可选的实施方式,在步骤S101中,该触发操作可以是用户执行的点击操作。As an optional implementation manner, in step S101, the triggering operation may be a click operation performed by the user.
举例来讲,在用户使用台式机电脑(或笔记本电脑)浏览网页时,用户可以通过与台式机电脑(或笔记本电脑)连接的鼠标点击该预设按钮,以触发该预设按钮。对应地,台式机电脑(或笔记本电脑)可以检测用户是否通过鼠标点击了该预设按钮,若检测到用户点击了该预设按钮,则视为检测到用于触发预设按钮的触发操作。For example, when a user uses a desktop computer (or notebook computer) to browse webpages, the user can click the preset button with a mouse connected to the desktop computer (or notebook computer) to trigger the preset button. Correspondingly, the desktop computer (or notebook computer) can detect whether the user has clicked the preset button through the mouse, and if it is detected that the user has clicked the preset button, it will be regarded as a trigger operation for triggering the preset button has been detected.
举例来讲,在用户通过智能手机(或平板电脑)浏览网页时,用户可以通过智能手机(或平板电脑)的触摸屏点击该预设按钮,以触发该预设按钮。对应地,智能手机(或平板电脑)可以获取用户点击的位置,判断用户点击的位置是否属于预设按钮的显示区域内,若属于,则确定用户点击了该预设按钮,则视为检测到用于触发预设按钮的触发操作。For example, when a user browses a webpage through a smart phone (or a tablet computer), the user may click the preset button through the touch screen of the smart phone (or tablet computer) to trigger the preset button. Correspondingly, the smart phone (or tablet computer) can obtain the position clicked by the user, and judge whether the position clicked by the user belongs to the display area of the preset button. The trigger action used to trigger the preset button.
作为一种可选的实施方式,在步骤S101中,该触发操作还可以是用户控制鼠标指针在预设按钮上的悬停操作。As an optional implementation manner, in step S101, the triggering operation may also be a hovering operation of the user controlling a mouse pointer on a preset button.
举例来讲,在用户使用台式机电脑(或笔记本电脑)浏览网页时,用户可以使用鼠标控制显示在显示器上的鼠标指针在该预设按钮上悬停,以触发该预设按钮。此时,若电子设备检测到该悬停操作(即:鼠标指针停留在该预设按钮上的时间大于一预设时间值,例如停留超过1秒钟),则可以视为检测到用于触发预设按钮的触发操作。For example, when a user uses a desktop computer (or a notebook computer) to browse a web page, the user can use a mouse to control a mouse pointer displayed on the display to hover over the preset button, so as to trigger the preset button. At this point, if the electronic device detects the hovering operation (that is, the time the mouse pointer stays on the preset button is longer than a preset time value, such as staying for more than 1 second), it can be regarded as detecting The trigger action of the preset button.
步骤S102:若检测到触发操作,则检测是否有用户在网页上进行的划选操作。Step S102: If a trigger operation is detected, it is detected whether there is a selection operation performed by the user on the webpage.
举例来讲,在用户使用台式机电脑(或笔记本电脑)浏览网页遇到想要收藏的内容(例如:文字、表格、图片等)时,用户可以通过点击鼠标左键并控制鼠标指针在网页上划动,以将想要收藏的内容选中。对应地,台式机电脑(或笔记本电脑)可以通过鼠标获得到用户划选操作。For example, when a user uses a desktop computer (or laptop) to browse the webpage and encounters content (such as text, tables, pictures, etc.) Swipe to select the content you want to favorite. Correspondingly, the desktop computer (or notebook computer) can obtain the user's selection operation through the mouse.
举例来讲,在用户使用智能手机(或平板电脑)浏览网页时,用户可以直接在触摸屏上进行划选操作来选中该网页上想要收藏的内容。对应地,智能手机(或平板电脑)可以通过检测获得用户在触摸屏上进行划选操作的位置,从而获取用户的划选操作。For example, when a user uses a smart phone (or a tablet computer) to browse a web page, the user can directly perform a selection operation on the touch screen to select the desired content on the web page. Correspondingly, the smart phone (or tablet computer) can acquire the user's swipe operation by detecting the position where the user performs the swipe operation on the touch screen.
步骤S103:若检测到划选操作,则基于划选操作,在网页上确定用户选中的内容(例如:文字、表格、图片,等等)。Step S103: If a swipe operation is detected, then based on the swipe operation, determine the content selected by the user on the webpage (for example: text, table, picture, etc.).
举例来讲,台式机电脑(或笔记本电脑)可以检测鼠标的左击事件并结合鼠标指针的位置的变化,确定用户在该网页上进行划选操作所选中的内容。智能手机(或平板电脑)可以通过检测获得用户在触摸屏上进行划选操作的位置,并基于该划选操作的位置确定用户所选中的内容。For example, a desktop computer (or a notebook computer) can detect the left-click event of the mouse and combine it with the change of the position of the mouse pointer to determine the content selected by the user on the webpage through the selection operation. The smart phone (or tablet computer) can obtain the position where the user performs a swipe operation on the touch screen through detection, and determine the content selected by the user based on the position of the swipe operation.
步骤S104:将用户选中的内容保存在一预设文档中。Step S104: Save the content selected by the user in a preset file.
举例来讲,所述预设文档可以是一word文档。该预设文档可以视为一“收藏本”,用于收藏用户在网页上选中的内容(例如:文字、表格、图片,等等)。具体来讲,可以提供一人机交互界面获取用户的设置操作,从电子设备本地已存在的word文档中指定一个word文档为该预设文档;当然也支持用户新建一word文档作为该预设文档;或者自动生成一默认word文档作为该预设文档;或者将当前正处于打开状态的word文档作为该预设文档,假如当前打开多个word文档,可以弹出一对话框,让用户中选择其中一个作为所述预设文档。For example, the preset document may be a word document. The default document can be regarded as a "bookmark", which is used to store the content selected by the user on the webpage (for example: text, tables, pictures, etc.). Specifically, a human-computer interaction interface can be provided to obtain the user's setting operation, and a word document can be designated as the preset document from the existing word documents locally on the electronic device; of course, the user can also create a new word document as the preset document; Or automatically generate a default word document as the default document; or use the currently opened word document as the default document. If multiple word documents are currently open, a dialog box can pop up, allowing the user to choose one of them as the default document. The preset document.
作为一种可选的实施方式,在执行完步骤S104之后,跳转执行步骤S102。As an optional implementation manner, after step S104 is executed, skip to step S102.
举例来讲,在执行完步骤S104(即:将用户选中的内容保存在一预设文档中)之后,跳转执行步骤S102(即:检测是否有用户在所述网页上进行的划选操作),这样,在检测到用户的下一次划选操作时,能够基于用户的下一次划选操作,将用户下一次选中的内容保存所述预设文件中,无需用户再次触发该预设按钮,从而进一步提高了收藏效率。For example, after step S104 is executed (that is, saving the content selected by the user in a preset file), jump to step S102 (that is, detect whether there is a selection operation performed by the user on the webpage) In this way, when the user's next swipe operation is detected, the content selected by the user next time can be saved in the preset file based on the user's next swipe operation, without the user needing to trigger the preset button again, thereby Further improve collection efficiency.
作为一种可选的实施方式,在用户选中的内容为第一文本内容时,在步骤S104中,将所述用户选中的内容保存在一预设文档中,包括:As an optional implementation manner, when the content selected by the user is the first text content, in step S104, saving the content selected by the user in a preset file includes:
基于所述预设文档对应的预设文本格式,将第一文本内容的第一文本格式调整为所述预设文本格式,获得具有预设文本格式的第一文本内容;Based on the preset text format corresponding to the preset document, adjusting the first text format of the first text content to the preset text format to obtain the first text content with the preset text format;
将具有预设文本格式的第一文本内容保存在所述预设文档中。The first text content with a preset text format is saved in the preset document.
举例来讲,可以先将第一文本内容复制到所述预设文档中,再基于所述预设文本格式,将第一文本内容的原文本格式(即:第一文本格式)调整为预设文本格式,最后获得具有预设文本格式的第一文本内容。For example, the first text content can be copied into the preset document first, and then based on the preset text format, the original text format (namely: the first text format) of the first text content can be adjusted to the preset text format, and finally obtain the first text content with a preset text format.
举例来讲,该预设文本格式规定了保存在该预设文档中的文本内容的文字格式和段落格式;其中,该文字格式规定了文字的字体、字号、颜色、是否加粗、是否倾斜、是否加下划线,等等;该段落格式规定了每段文字的行间距、段落间距、缩进量、对齐方式(例如:左对齐、居中、右对齐、两端对齐),等等。For example, the preset text format specifies the text format and paragraph format of the text content stored in the preset document; wherein, the text format specifies the font, font size, color, whether it is bold, whether italic, Whether to underline, etc.; the paragraph format specifies the line spacing, paragraph spacing, indentation, alignment (for example: left alignment, centering, right alignment, and both ends alignment) of each paragraph of text, and so on.
举例来讲,该预设文档本身规定有一文本格式,此时,可以将该预设文档本身规定的文本格式作为所述预设文本格式,将第一文本的原文本格式(即:第一文本格式)调整为预设文本格式,获得具有预设文本格式的第一文本内容。例如:该预设文档本身规定了保存在其中的文本内容的文本格式为:中文字体“楷体_GB2312”、英文字体“TimesNewRoman”,字号“四号”、“不加粗”、“不倾斜”、“不加下划线”,“两端对齐”、左侧缩进“0字符”、右侧缩进“0字符”、段前间距“0行”、段后间距“0行”、行距“1.5倍行距”,则不论第一文本内容原来的文本格式是什么,都统一调整为该预设文档本身规定的文本格式。For example, the preset document itself stipulates a text format, at this time, the text format specified in the preset document itself can be used as the preset text format, and the original text format of the first text (that is: the first text Format) is adjusted to a preset text format to obtain the first text content in the preset text format. For example: the preset document itself stipulates that the text format of the text content stored in it is: Chinese font "卷体_GB2312", English font "TimesNewRoman", font size "four", "no bold", "no italic" , "No underline", "Justify both ends", left indentation "0 characters", right indentation "0 characters", spacing before paragraph "0 lines", spacing after paragraphs "0 lines", line spacing "1.5 double line spacing", no matter what the original text format of the first text content is, it will be uniformly adjusted to the text format specified in the preset document itself.
举例来讲,该预设文档本身不规定任何文本格式,则检测在该预设文档中之前是否已经保存有第二文本内容,该第二文本内容为用户之前编辑的,若检测到第二文本内容,则将第二文本内容的文本格式(即:第二文本格式)确定为预设文本格式,将第一文本的原文本格式(即:第一文本格式)调整为预设文本格式(即:第二文本内容的文本格式),获得具有预设文本格式的第一文本内容。例如:用户事先在该预设文档进行过文本编辑,其编辑的文本内容所具有的文本格式为:中文字体“宋体”、英文字体“TimesNewRoman”,字号“五号”、“加粗”、“不倾斜”、“不加下划线”,“居中”、左侧缩进“0字符”、右侧缩进“0字符”、段前间距“0行”、段后间距“0行”、行距“单倍行距”,则将用户事先编辑过的文本内容的文本格式作为所述预设文本格式,不论第一文本内容原来的文本格式是什么,都统一调整为用户事先编辑过的文本内容的文本格式。For example, if the preset document itself does not specify any text format, it is detected whether there is a second text content previously saved in the preset document, and the second text content was edited by the user before, and if the second text content is detected content, then the text format of the second text content (ie: the second text format) is determined as the preset text format, and the original text format of the first text (ie: the first text format) is adjusted to the preset text format (ie : the text format of the second text content), to obtain the first text content with a preset text format. For example: the user has edited text in the preset document in advance, and the text format of the edited text content is: Chinese font "宋体", English font "TimesNewRoman", font size "No. 5", "Bold", " No Slant", "No Underline", "Center", Left Indent "0 Characters", Right Indent "0 Characters", Space Before Paragraph "0 Lines", Space After Paragraph "0 Lines", Line Spacing " Single line spacing", the text format of the text content edited by the user in advance is used as the preset text format, and no matter what the original text format of the first text content is, it is uniformly adjusted to the text content of the text content edited by the user in advance Format.
作为一种可选的实施方式,所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,还包括:As an optional implementation manner, after saving the first text content in the preset text format in the preset document, the method further includes:
检测是否有用于打开所述预设文档的打开操作;Detecting whether there is an open operation for opening the preset document;
若检测到打开操作,则打开所述预设文档,以将具有所述预设文本格式的第一文本内容展示出来。If an opening operation is detected, the preset document is opened to display the first text content in the preset text format.
举例来将,可以在浏览器界面上一预设位置(例如:在工具栏中、或在侧边栏中、或在网页浏览区域内)设置一用于打开该预设文档的按钮,且在该按钮上还可以显示用于表示打开所述预设文档的标识,(例如:“打开收藏本”按钮),当检测到用户点击了该“打开收藏本”按钮时,则打开该预设文档,以将其中收藏的全部内容都展示出来。当然,若用户知道存储该预设文档的路径,也可以通过该路径找到该预设文档,并打开该预设文档。For example, a button for opening the preset document can be set at a preset position on the browser interface (for example: in the toolbar, or in the sidebar, or in the web browsing area), and in The button can also display a logo for indicating opening the preset document (for example: "Open Favorites" button), when it is detected that the user clicks the "Open Favorites" button, then open the default document , to display all the content in the collection. Certainly, if the user knows the path where the preset file is stored, the preset file can also be found through the path, and the preset file can be opened.
为了更好地理解本发明所提供的收藏网页上内容的方法,下面将结合一具体应用场景,对本发明做进一步介绍。In order to better understand the method for collecting content on a web page provided by the present invention, the present invention will be further introduced below in conjunction with a specific application scenario.
一用户在一word文档上写论文时,需要上网查阅一些资料。基于本发明提供的网页内容收藏方法,当用户在一网页上看到自己论文需要的文本内容(例如:文字、表格)并想要收藏该文本内容时,在浏览器界面上点击“收藏”按钮(即:所述预设按钮),则开启“划词收藏”功能,用户可以通过鼠标执行一划选操作,将想要收藏的文本内容选中,浏览器则自动将用户选中的内容保存在一预设word文档中,其中,该预设word文档可以是用户事先指定的当前正在撰写的论文所在的word文档,这样方便了用户继续论文撰写。且,在将用户选中的文本内容保存在该word文档之前,可以基于用户之前编辑的文本内容的文本格式,对刚刚收藏的文本内容的格式进行调整,使这两部分文本内容具有统一的文本格式,省去了用户再对收藏来的文本内容进行文本格式调整的操作,节约了用户的时间,提高了收藏效率,大大提高了论文撰写的速度。When a user writes a thesis on a word document, he needs to check some information online. Based on the method for storing webpage content provided by the present invention, when a user sees the text content (for example: text, table) required by his paper on a webpage and wants to collect the text content, he clicks the "Favorite" button on the browser interface. (i.e.: the preset button), then open the "mark word collection" function, the user can perform a select operation with the mouse to select the text content that wants to be collected, and the browser automatically saves the content selected by the user in a In the preset word document, the preset word document may be the word document in which the thesis currently being written is specified by the user in advance, which is convenient for the user to continue writing the thesis. Moreover, before saving the text content selected by the user in the word document, the format of the text content just collected can be adjusted based on the text format of the text content edited by the user before, so that the two parts of the text content have a unified text format , eliminating the need for the user to adjust the text format of the collected text content, saving the user's time, improving the efficiency of collection, and greatly improving the speed of writing papers.
基于上述网页内容收藏方法,本发明还提供了一种电子设备,如图2所示,包括:Based on the method for storing webpage content above, the present invention also provides an electronic device, as shown in FIG. 2 , comprising:
第一检测模块201,用于在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作;The first detection module 201 is used to detect whether there is a trigger operation for triggering a preset button on the browser interface when the user browses a webpage through the browser;
第二检测模块202,用于若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作;The second detection module 202 is configured to detect whether there is a selection operation performed by the user on the webpage if the trigger operation is detected;
确定模块203,用于若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容;A determination module 203, configured to determine the content selected by the user on the webpage based on the selection operation if the selection operation is detected;
保存模块204,用于将所述用户选中的内容保存在一预设文档中。The saving module 204 is configured to save the content selected by the user in a preset file.
作为一种可选的实施方式,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。As an optional implementation manner, a sign indicating that the content selected by the user is saved in the preset file is displayed on the preset button.
作为一种可选的实施方式,所述第一检测模块201,具体用于:As an optional implementation manner, the first detection module 201 is specifically configured to:
检测是否有点击所述预设按钮的点击操作;或detect whether there is a click operation of clicking the preset button; or
检测是否有鼠标指针在所述预设按钮上的悬停操作。Detect whether there is a hovering operation of the mouse pointer on the preset button.
作为一种可选的实施方式,所述电子设备,还包括:As an optional implementation manner, the electronic device further includes:
跳转模块,用于所述将所述用户选中的内容保存在一预设文档中之后,跳转执行所述检测是否有用户在所述网页上进行的划选操作。The jumping module is used for jumping to execute the detecting whether there is a selection operation performed by the user on the webpage after saving the content selected by the user in a preset file.
作为一种可选的实施方式,在所述用户选中的内容为第一文本内容时,所述保存模块204,包括:As an optional implementation manner, when the content selected by the user is the first text content, the saving module 204 includes:
调整单元,用于基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容;an adjusting unit, configured to adjust the first text format of the first text content to the preset text format based on the preset text format corresponding to the preset document, and obtain the document in the preset text format first text content;
保存单元,用于将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中。A saving unit, configured to save the first text content in the preset text format in the preset document.
作为一种可选的实施方式,所述调整单元,具体用于:As an optional implementation manner, the adjustment unit is specifically used for:
检测在所述预设文档中是否已经保存有第二文本内容;若检测到所述第二文本内容,则将所述第二文本内容的第二文本格式确定为所述预设文本格式;基于所述预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容。Detecting whether the second text content has been saved in the preset document; if the second text content is detected, determining the second text format of the second text content as the preset text format; based on In the preset text format, the first text format of the first text content is adjusted to the preset text format to obtain the first text content in the preset text format.
作为一种可选的实施方式,所述电子设备,还包括:As an optional implementation manner, the electronic device further includes:
检测模块,用于所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,检测是否有用于打开所述预设文档的打开操作;A detection module, configured to detect whether there is an opening operation for opening the preset document after the first text content having the preset text format is saved in the preset document;
打开模块,用于若检测到所述打开操作,则打开所述预设文档,以将具有所述预设文本格式的所述第一文本内容展示出来。The opening module is configured to open the preset document if the opening operation is detected, so as to display the first text content in the preset text format.
由于本实施例所介绍的电子设备为实施本申请实施例中网页内容收藏方法所采用的装置,故而基于本申请实施例中所介绍的网页内容收藏方法,本领域所属技术人员能够了解本实施例的电子设备的具体实施方式以及其各种变化形式,所以在此对于该电子设备如何实现本申请实施例中的网页内容收藏方法不再详细介绍。只要本领域所属技术人员实施本申请实施例中网页内容收藏方法所采用的装置,都属于本申请所欲保护的范围。Since the electronic equipment introduced in this embodiment is the device used to implement the method for storing webpage content in the embodiment of this application, based on the method for storing webpage content introduced in the embodiment of this application, those skilled in the art can understand this embodiment The specific implementation of the electronic device and its various variations, so how the electronic device implements the method for storing webpage content in the embodiment of the present application will not be described in detail here. As long as a person skilled in the art implements the device used by the web page content collection method in the embodiment of the present application, it all falls within the scope of protection intended by the present application.
本申请实施例中提供的技术方案,至少具有如下技术效果或优点:The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
1、在本申请实施例中,在用户通过浏览器浏览一网页时,检测是否有用于触发浏览器界面上一预设按钮的触发操作,若检测到触发操作,则检测是否有用户在网页上进行的划选操作,若检测到划选操作,则基于划选操作在网页上确定用户选中的内容,将用户选中的内容保存在一预设文档中。可见,在用户触发该预设按钮(“收藏”按钮)后,用户在浏览网页遇到想要收藏的内容时,仅需通过划选操作选中想要收藏的内容,即可实现对该内容进行收藏。所以,有效地解决了现有技术中用户在浏览网页遇到想要收藏的内容时,需要多个操作步骤才能收藏该内容,操作繁琐的技术问题。实现了用户在浏览网页遇到想要收藏的内容时,可以方便、快捷地收藏该内容,提高了收藏效率的技术效果。1. In the embodiment of the present application, when a user browses a webpage through a browser, it is detected whether there is a trigger operation for triggering a preset button on the browser interface, and if a trigger operation is detected, it is detected whether there is a user on the webpage If the selection operation is performed, if the selection operation is detected, the content selected by the user is determined on the webpage based on the selection operation, and the content selected by the user is saved in a preset file. It can be seen that after the user triggers the preset button ("Favorite" button), when the user encounters the content he wants to collect when browsing the webpage, he only needs to select the content he wants to collect through the selection operation, and then the content can be realized. collect. Therefore, it effectively solves the technical problem in the prior art that when users encounter content they want to bookmark while browsing the webpage, multiple operation steps are required to bookmark the content, and the operation is cumbersome. The technical effect that the user can conveniently and quickly collect the content when encountering the content that he wants to collect when browsing the webpage is realized, and the collection efficiency is improved.
2、在本申请实施例中,在将用户选中的内容保存在一预设文档中之后,跳转执行检测是否有用户在所述网页上进行的划选操作,以在检测到用户的下一次划选操作时,能够基于用户的下一次划选操作,将用户下一次选中的内容保存所述预设文件中,无需用户再次触发该预设按钮,从而进一步提高了收藏效率。2. In the embodiment of the present application, after the content selected by the user is saved in a preset file, the jump is performed to detect whether there is a selection operation performed by the user on the web page, so that the next time the user is detected During the selection operation, the content selected by the user next time can be saved in the preset file based on the user's next selection operation, without the need for the user to trigger the preset button again, thereby further improving the collection efficiency.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网关、代理服务器、系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the gateway, proxy server, and system according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
本发明公开了,A1、一种网页内容收藏方法,其特征在于,包括:The invention discloses, A1, a method for collecting webpage content, characterized in that it includes:
在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作;When a user browses a webpage through a browser, detect whether there is a trigger operation for triggering a preset button on the browser interface;
若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作;If the trigger operation is detected, it is detected whether there is a selection operation performed by the user on the web page;
若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容;If the selection operation is detected, then based on the selection operation, determine the content selected by the user on the web page;
将所述用户选中的内容保存在一预设文档中。The content selected by the user is saved in a preset file.
A2、如A1所述的方法,其特征在于,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。A2. The method according to A1, characterized in that a sign indicating that the content selected by the user is saved in the preset file is displayed on the preset button.
A3、如A1所述的方法,其特征在于,所述检测是否有用于触发所述浏览器界面上一预设按钮的触发操作,包括:A3, the method as described in A1, is characterized in that, whether the detection has a trigger operation for triggering a preset button on the browser interface, including:
检测是否有点击所述预设按钮的点击操作;或detect whether there is a click operation of clicking the preset button; or
检测是否有鼠标指针在所述预设按钮上的悬停操作。Detect whether there is a hovering operation of the mouse pointer on the preset button.
A4、如A1所述的方法,其特征在于,所述将所述用户选中的内容保存在一预设文档中之后,还包括:A4. The method as described in A1, characterized in that, after saving the content selected by the user in a preset file, it further includes:
跳转执行所述检测是否有用户在所述网页上进行的划选操作。Jumping to perform the detection whether there is a selection operation performed by the user on the web page.
A5、如A1所述的方法,其特征在于,在所述用户选中的内容为第一文本内容时,所述将所述用户选中的内容保存在一预设文档中,包括:A5. The method as described in A1, wherein when the content selected by the user is the first text content, storing the content selected by the user in a preset file includes:
基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容;Adjusting the first text format of the first text content to the preset text format based on the preset text format corresponding to the preset document to obtain the first text content in the preset text format;
将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中。saving the first text content in the preset text format in the preset document.
A6、如A5所述的方法,其特征在于,所述基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容,包括:A6. The method as described in A5, wherein, based on the preset text format corresponding to the preset document, the first text format of the first text content is adjusted to the preset text format to obtain The first text content having the preset text format includes:
检测在所述预设文档中是否已经保存有第二文本内容;Detecting whether the second text content has been saved in the preset document;
若检测到所述第二文本内容,则将所述第二文本内容的第二文本格式确定为所述预设文本格式;If the second text content is detected, determining the second text format of the second text content as the preset text format;
基于所述预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容。Based on the preset text format, the first text format of the first text content is adjusted to the preset text format to obtain the first text content in the preset text format.
A7、如A5所述的方法,其特征在于,所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,还包括:A7. The method as described in A5, wherein after saving the first text content with the preset text format in the preset document, further comprising:
检测是否有用于打开所述预设文档的打开操作;Detecting whether there is an open operation for opening the preset document;
若检测到所述打开操作,则打开所述预设文档,以将具有所述预设文本格式的所述第一文本内容展示出来。If the opening operation is detected, the preset document is opened to display the first text content in the preset text format.
B8、一种电子设备,其特征在于,包括:B8, an electronic device, is characterized in that, comprising:
第一检测模块,用于在用户通过浏览器浏览一网页时,检测是否有用于触发所述浏览器界面上一预设按钮的触发操作;The first detection module is used to detect whether there is a trigger operation for triggering a preset button on the browser interface when the user browses a webpage through the browser;
第二检测模块,用于若检测到所述触发操作,则检测是否有用户在所述网页上进行的划选操作;The second detection module is used to detect whether there is a selection operation performed by the user on the webpage if the trigger operation is detected;
确定模块,用于若检测到所述划选操作,则基于所述划选操作,在所述网页上确定所述用户选中的内容;A determination module, configured to determine the content selected by the user on the webpage based on the selection operation if the selection operation is detected;
保存模块,用于将所述用户选中的内容保存在一预设文档中。The saving module is used to save the content selected by the user in a preset file.
B9、如B8所述的电子设备,其特征在于,在所述预设按钮上显示有用于表示将所述用户选中的内容保存在所述预设文档中的标识。B9. The electronic device according to B8, characterized in that, on the preset button, a sign indicating that the content selected by the user is saved in the preset file is displayed.
B10、如B8所述的方法,其特征在于,所述第一检测模块,具体用于:B10, the method as described in B8, is characterized in that, described first detection module is specifically used for:
检测是否有点击所述预设按钮的点击操作;或detect whether there is a click operation of clicking the preset button; or
检测是否有鼠标指针在所述预设按钮上的悬停操作。Detect whether there is a hovering operation of the mouse pointer on the preset button.
B11、如B8所述的电子设备,其特征在于,所述电子设备,还包括:B11, the electronic equipment as described in B8, is characterized in that, described electronic equipment also comprises:
跳转模块,用于所述将所述用户选中的内容保存在一预设文档中之后,跳转执行所述检测是否有用户在所述网页上进行的划选操作。The jumping module is used for jumping to execute the detecting whether there is a selection operation performed by the user on the webpage after saving the content selected by the user in a preset file.
B12、如B8所述的电子设备,其特征在于,在所述用户选中的内容为第一文本内容时,所述保存模块,包括:B12, the electronic device as described in B8, is characterized in that, when the content selected by the user is the first text content, the preservation module includes:
调整单元,用于基于所述预设文档对应的预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容;an adjusting unit, configured to adjust the first text format of the first text content to the preset text format based on the preset text format corresponding to the preset document, and obtain the document in the preset text format first text content;
保存单元,用于将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中。A saving unit, configured to save the first text content in the preset text format in the preset document.
B13、如B12所述的电子设备,其特征在于,所述调整单元,具体用于:B13. The electronic device as described in B12, wherein the adjustment unit is specifically used for:
检测在所述预设文档中是否已经保存有第二文本内容;若检测到所述第二文本内容,则将所述第二文本内容的第二文本格式确定为所述预设文本格式;基于所述预设文本格式,将所述第一文本内容的第一文本格式调整为所述预设文本格式,获得具有所述预设文本格式的所述第一文本内容。Detecting whether the second text content has been saved in the preset document; if the second text content is detected, determining the second text format of the second text content as the preset text format; based on In the preset text format, the first text format of the first text content is adjusted to the preset text format to obtain the first text content in the preset text format.
B14、如B12所述的电子设备,其特征在于,所述电子设备,还包括:B14, the electronic equipment as described in B12, is characterized in that, described electronic equipment also comprises:
检测模块,用于所述将具有所述预设文本格式的所述第一文本内容保存在所述预设文档中之后,检测是否有用于打开所述预设文档的打开操作;A detection module, configured to detect whether there is an opening operation for opening the preset document after the first text content having the preset text format is saved in the preset document;
打开模块,用于若检测到所述打开操作,则打开所述预设文档,以将具有所述预设文本格式的所述第一文本内容展示出来。The opening module is configured to open the preset document if the opening operation is detected, so as to display the first text content in the preset text format.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510639947.1A CN105260433A (en) | 2015-09-30 | 2015-09-30 | Webpage content collecting method and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510639947.1A CN105260433A (en) | 2015-09-30 | 2015-09-30 | Webpage content collecting method and electronic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105260433A true CN105260433A (en) | 2016-01-20 |
Family
ID=55100124
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510639947.1A Pending CN105260433A (en) | 2015-09-30 | 2015-09-30 | Webpage content collecting method and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105260433A (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106202223A (en) * | 2016-06-28 | 2016-12-07 | 北京小米移动软件有限公司 | Content collection method, device and for collecting the device of content in application program |
| CN106649525A (en) * | 2016-10-19 | 2017-05-10 | 北京小米移动软件有限公司 | Method and device for displaying webpage information |
| CN107967249A (en) * | 2017-12-25 | 2018-04-27 | 重庆宝力优特科技有限公司 | A kind of word storage method and device |
| CN108182432A (en) * | 2017-12-28 | 2018-06-19 | 北京百度网讯科技有限公司 | Information processing method and device |
| CN110032687A (en) * | 2019-01-28 | 2019-07-19 | 阿里巴巴集团控股有限公司 | A kind for the treatment of method and apparatus of web page contents |
| CN113010814A (en) * | 2021-03-22 | 2021-06-22 | 掌阅科技股份有限公司 | Webpage content processing method, computing device and computer storage medium |
| WO2022184024A1 (en) * | 2021-03-01 | 2022-09-09 | 北京字跳网络技术有限公司 | Electronic document processing method and apparatus, terminal, and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101079059A (en) * | 2007-03-27 | 2007-11-28 | 腾讯科技(深圳)有限公司 | System, method and browser for keeping web page content |
| CN102411469A (en) * | 2010-09-17 | 2012-04-11 | Lg电子株式会社 | Method for displaying Internet web pages and mobile terminal using the method |
| CN103870191A (en) * | 2012-12-18 | 2014-06-18 | 腾讯科技(深圳)有限公司 | Method and electronic equipment for saving webpage |
| CN104252308A (en) * | 2013-06-28 | 2014-12-31 | 深圳市腾讯计算机系统有限公司 | Method and device for storing webpage content |
| CN104346465A (en) * | 2014-11-07 | 2015-02-11 | 北京奇虎科技有限公司 | Method and device for saving web page elements, and browser client |
| CN104615700A (en) * | 2015-01-27 | 2015-05-13 | 北京奇虎科技有限公司 | Method for collecting webpage objects in browser, browser client side and system |
-
2015
- 2015-09-30 CN CN201510639947.1A patent/CN105260433A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101079059A (en) * | 2007-03-27 | 2007-11-28 | 腾讯科技(深圳)有限公司 | System, method and browser for keeping web page content |
| CN102411469A (en) * | 2010-09-17 | 2012-04-11 | Lg电子株式会社 | Method for displaying Internet web pages and mobile terminal using the method |
| CN103870191A (en) * | 2012-12-18 | 2014-06-18 | 腾讯科技(深圳)有限公司 | Method and electronic equipment for saving webpage |
| CN104252308A (en) * | 2013-06-28 | 2014-12-31 | 深圳市腾讯计算机系统有限公司 | Method and device for storing webpage content |
| CN104346465A (en) * | 2014-11-07 | 2015-02-11 | 北京奇虎科技有限公司 | Method and device for saving web page elements, and browser client |
| CN104615700A (en) * | 2015-01-27 | 2015-05-13 | 北京奇虎科技有限公司 | Method for collecting webpage objects in browser, browser client side and system |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106202223A (en) * | 2016-06-28 | 2016-12-07 | 北京小米移动软件有限公司 | Content collection method, device and for collecting the device of content in application program |
| CN106649525A (en) * | 2016-10-19 | 2017-05-10 | 北京小米移动软件有限公司 | Method and device for displaying webpage information |
| CN107967249A (en) * | 2017-12-25 | 2018-04-27 | 重庆宝力优特科技有限公司 | A kind of word storage method and device |
| CN108182432A (en) * | 2017-12-28 | 2018-06-19 | 北京百度网讯科技有限公司 | Information processing method and device |
| US10963760B2 (en) | 2017-12-28 | 2021-03-30 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method and apparatus for processing information |
| CN110032687A (en) * | 2019-01-28 | 2019-07-19 | 阿里巴巴集团控股有限公司 | A kind for the treatment of method and apparatus of web page contents |
| CN110032687B (en) * | 2019-01-28 | 2023-08-01 | 创新先进技术有限公司 | Webpage content processing method and device |
| WO2022184024A1 (en) * | 2021-03-01 | 2022-09-09 | 北京字跳网络技术有限公司 | Electronic document processing method and apparatus, terminal, and storage medium |
| CN115061601A (en) * | 2021-03-01 | 2022-09-16 | 北京字跳网络技术有限公司 | Electronic document processing method and device, terminal and storage medium |
| CN115061601B (en) * | 2021-03-01 | 2024-05-07 | 北京字跳网络技术有限公司 | Electronic document processing method, device, terminal and storage medium |
| CN113010814A (en) * | 2021-03-22 | 2021-06-22 | 掌阅科技股份有限公司 | Webpage content processing method, computing device and computer storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105260433A (en) | Webpage content collecting method and electronic device | |
| CN102081647B (en) | Method and device for displaying pop-up advertisement | |
| CN102799371B (en) | Extended data input device and method | |
| CN103870187B (en) | Method for controlling terminal with touch screen and terminal | |
| US20140289597A1 (en) | Method and device for displaying preview screen of hyperlink | |
| CN102999342B (en) | The full frame browsing method of picture and device thereof in a kind of webpage | |
| CN105224175A (en) | The method of content and electronic equipment on a kind of marking of web pages | |
| CN105335071A (en) | Method and device for displaying page elements | |
| CN103744932A (en) | Page processing method and device | |
| CN105243058A (en) | Webpage content translation method and electronic apparatus | |
| WO2014059677A1 (en) | Method for processing user interface, and electronic device | |
| CN105279245A (en) | Method for collecting contents on webpage and electronic device | |
| CN105183724A (en) | Translation method and electronic device | |
| CN105653578A (en) | Browser operation method and electronic equipment | |
| CN105138273B (en) | A kind of method to make marks and electronic equipment | |
| CN106155654B (en) | Method and device for shielding webpage operation and electronic equipment | |
| US20130111333A1 (en) | Scaling objects while maintaining object structure | |
| JP2015049593A (en) | Electronic device, method and program | |
| CN105242848A (en) | Method for translating texts on web page and electronic device | |
| CN103279275B (en) | Method for analyzing document content and handheld electronic device | |
| CN105243057A (en) | Method for translating web page contents and electronic device. | |
| CN105354187A (en) | Method for translating webpage contents and electronic device | |
| CN107562450A (en) | A kind of cross-platform method for visualizing of local chronicle resource | |
| JP2014149736A (en) | Information processor, and computer program | |
| CN105320751A (en) | Method for making mark on webpage and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into 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: 20160120 |