CN109063079B - Webpage labeling method and electronic equipment - Google Patents
Webpage labeling method and electronic equipment Download PDFInfo
- Publication number
- CN109063079B CN109063079B CN201810824401.7A CN201810824401A CN109063079B CN 109063079 B CN109063079 B CN 109063079B CN 201810824401 A CN201810824401 A CN 201810824401A CN 109063079 B CN109063079 B CN 109063079B
- Authority
- CN
- China
- Prior art keywords
- webpage
- source document
- related information
- web page
- target content
- 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.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明涉及互联网技术领域,尤其涉及一种网页标注方法及电子设备。The invention relates to the field of Internet technologies, and in particular, to a web page labeling method and electronic equipment.
背景技术Background technique
随着互联网技术的发展,越来越多的用户在电子设备上浏览网页,用户在浏览网页的过程中,如果看到一些感兴趣的网页内容,则希望与其他用户分享。但是,用户经常会遇到这种情况:网页中的内容非常多、重点不明确,或者网页的内容非常简短、不够详细,在此情况下,如果能够在网页中做一些标注,无疑会提高网页的展示和分享效果。With the development of Internet technology, more and more users browse web pages on electronic devices. During the process of browsing web pages, if a user sees some interesting web page content, he hopes to share it with other users. However, users often encounter this situation: the content of the webpage is very large, the focus is not clear, or the content of the webpage is very short and not detailed enough. In this case, if you can make some annotations in the webpage, it will undoubtedly improve the webpage. display and sharing effects.
现有技术中,需要在电子设备中安装特定的浏览器,或者安装特定的浏览器插件,才可以对浏览器中显示的网页添加标注,灵活性较低。In the prior art, it is necessary to install a specific browser or a specific browser plug-in in the electronic device before adding a mark to the webpage displayed in the browser, which is less flexible.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种网页标注方法及电子设备,以解决现有技术中需要安装特定浏览器或浏览器插件才可以标注网页,所导致的灵活性较低的问题。Embodiments of the present invention provide a web page labeling method and electronic device, so as to solve the problem of low flexibility caused by the need to install a specific browser or browser plug-in to label a page in the prior art.
为解决上述技术问题,本发明实施例是这样实现的:In order to solve the above-mentioned technical problems, the embodiments of the present invention are implemented as follows:
第一方面,本发明实施例还提供了一种网页标注方法,应用于电子设备,所述方法包括:In a first aspect, an embodiment of the present invention further provides a web page labeling method, which is applied to an electronic device, and the method includes:
生成第一网页中目标内容对应的第一源文档;generating a first source document corresponding to the target content in the first web page;
为所述第一源文档添加监听事件和所述监听事件对应的响应事件,得到第二源文档,其中,所述监听事件用于监听用户触发的预设事件,所述响应事件用于在监听到预设事件时为用户提供标注内容输入接口;Adding a monitoring event and a response event corresponding to the monitoring event to the first source document, to obtain a second source document, wherein the monitoring event is used to monitor a preset event triggered by the user, and the response event is used to monitor Provide the user with an annotation content input interface when the preset event arrives;
根据所述第二源文档生成与所述第二源文档对应的第二网页;generating a second web page corresponding to the second source document according to the second source document;
当监听到用户针对所述第二网页触发的所述预设事件时,显示所述标注内容输入接口;When monitoring the preset event triggered by the user for the second web page, displaying the annotation content input interface;
当接收到用户在所述标注内容输入接口中输入的标注内容后,将所述标注内容添加到所述第二网页上。After receiving the marked content input by the user in the marked content input interface, the marked content is added to the second webpage.
第二方面,本发明实施例还提供了一种电子设备,所述电子设备包括:In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
第一生成模块,用于生成第一网页中目标内容对应的第一源文档;a first generating module, configured to generate a first source document corresponding to the target content in the first web page;
第二生成模块,用于为所述第一源文档添加监听事件和所述监听事件对应的响应事件,得到第二源文档,其中,所述监听事件用于监听用户触发的预设事件,所述响应事件用于在监听到预设事件时为用户提供标注内容输入接口;The second generation module is configured to add a monitoring event and a response event corresponding to the monitoring event to the first source document to obtain a second source document, wherein the monitoring event is used to monitor a preset event triggered by a user, and the The above-mentioned response event is used to provide the user with an annotation content input interface when the preset event is monitored;
第三生成模块,用于根据所述第二源文档生成与所述第二源文档对应的第二网页;a third generating module, configured to generate a second web page corresponding to the second source document according to the second source document;
显示模块,用于在监听到用户针对所述第二网页触发的所述预设事件的情况下,显示所述标注内容输入接口;a display module, configured to display the annotation content input interface in the case of listening to the preset event triggered by the user for the second webpage;
添加模块,用于在接收到用户在所述标注内容输入接口中输入的标注内容后,将所述标注内容添加到所述第二网页上。The adding module is configured to add the marked content to the second webpage after receiving the marked content input by the user in the marked content input interface.
第三方面,本发明实施例还提供了一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的网页标注程序,所述网页标注程序被所述处理器执行时实现上述网页标注方法的步骤。In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a webpage labeling program stored on the memory and running on the processor, the webpage labeling program being When the processor executes, the steps of the above web page labeling method are implemented.
第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储网页标注程序,所述网页标注程序被处理器执行时实现上述网页标注方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a web page tagging program is stored, and the web page tagging program implements the steps of the foregoing web page tagging method when the web page tagging program is executed by a processor.
本发明实施例中,在需要对网页中的网页内容进行标注时,可以生成与原网页的网页内容相关的源文档,并为该源文档添加监听事件和响应事件,生成新的源文档,之后对新的源文档进行解析,在电子设备上绘制新的网页,由于新的网页对应的源文档中包含监听事件和响应事件,因此用户可以在新的网页上进行内容标注。与现有技术相比,本发明实施例中,无需专门在电子设备中安装特定浏览器或特定浏览器插件,就可以实现在网页中添加标注,灵活性较高。In the embodiment of the present invention, when the webpage content in the webpage needs to be marked, a source document related to the webpage content of the original webpage can be generated, and a monitoring event and a response event can be added to the source document to generate a new source document, and then a new source document can be generated. The new source document is parsed, and a new web page is drawn on the electronic device. Since the source document corresponding to the new web page contains listening events and response events, the user can mark the content on the new web page. Compared with the prior art, in the embodiment of the present invention, it is not necessary to install a specific browser or a specific browser plug-in in the electronic device, so that the annotation can be added to the webpage, and the flexibility is high.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是本发明的一个实施例的网页标注方法的流程图;1 is a flowchart of a method for labeling a webpage according to an embodiment of the present invention;
图2是本发明的一个实施例的网页标注方法的场景图;2 is a scene diagram of a web page labeling method according to an embodiment of the present invention;
图3是本发明的另一个实施例的网页标注方法的场景图;3 is a scene diagram of a web page labeling method according to another embodiment of the present invention;
图4是本发明的另一个实施例的网页标注方法的场景图;4 is a scene diagram of a web page labeling method according to another embodiment of the present invention;
图5是本发明的一个实施例的电子设备的结构示意图;5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图6是实现本发明各个实施例的一种移动终端的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明具体实施例及相应的附图对本发明技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本发明实施例提供了一种网页标注方法及电子设备。Embodiments of the present invention provide a web page labeling method and electronic device.
下面首先对本发明实施例提供的一种网页标注处理方法进行介绍。The following first introduces a web page tagging processing method provided by an embodiment of the present invention.
需要说明的是,本发明实施例提供的网页标注方法适用于电子设备,该电子设备可以包括:移动终端和计算机设备,在实际应用中,该移动终端可以包括:智能手机、平板电脑、智能手表、手环和个人数字助理等等,该计算机设备可以包括:台式电脑、笔记本电脑和桌面机等等,本发明实施例对此不作限定。It should be noted that the web page labeling method provided in the embodiment of the present invention is applicable to electronic devices, and the electronic devices may include: mobile terminals and computer devices. In practical applications, the mobile terminals may include: smart phones, tablet computers, smart watches , a wristband, a personal digital assistant, etc., the computer device may include: a desktop computer, a notebook computer, a desktop computer, etc., which is not limited in this embodiment of the present invention.
图1是本发明的一个实施例的网页标注方法的流程图,如图1所示,该方法可以包括以下步骤:步骤101、步骤102、步骤103、步骤104和步骤105,其中,Fig. 1 is a flowchart of a method for labeling a webpage according to an embodiment of the present invention. As shown in Fig. 1, the method may include the following steps:
在步骤101中,生成第一网页中目标内容对应的第一源文档。In
本发明实施例中,目标内容可以为第一网页中的全部内容,也可以为第一网页中的部分内容。源文档可以为HTML文档。In this embodiment of the present invention, the target content may be the entire content of the first web page, or may be part of the content of the first web page. The source document can be an HTML document.
本发明实施例中,上述步骤101具体可以包括以下步骤:步骤1011和步骤1012(图中未示出),其中,In this embodiment of the present invention, the
在步骤1011中,获取第一网页的网页相关信息,其中,该网页相关信息包括下述至少一项:第一网页的网址、第一网页的目标内容的图像和第一网页的目标内容的文本。In step 1011, webpage-related information of the first webpage is obtained, wherein the webpage-related information includes at least one of the following: a website address of the first webpage, an image of the target content of the first webpage, and a text of the target content of the first webpage .
本发明实施例中,第一网页的目标内容的图像中可以包括第一网页的全部内容,也可以仅包括第一网页的部分内容。第一网页的目标内容的文本中可以包括第一网页的全部内容,也可以仅包括第一网页的部分内容。In this embodiment of the present invention, the image of the target content of the first web page may include the entire content of the first web page, or may only include part of the content of the first web page. The text of the target content of the first web page may include the entire content of the first web page, or may only include part of the content of the first web page.
本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为两个不同的电子设备时,可以使用电子设备的拍照功能或扫描功能,获取第一网页的网页相关信息。In this embodiment of the present invention, when the electronic device that displays the first webpage and the electronic device that obtains webpage-related information are two different electronic devices, the photographing function or scanning function of the electronic device can be used to obtain the webpage-related information of the first webpage. information.
本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为同一个电子设备时,可以通过与用户的交互(例如,用户在电子设备上进行相关操作),获取第一网页的网页相关信息。In this embodiment of the present invention, when the electronic device that displays the first webpage and the electronic device that obtains the relevant information of the webpage are the same electronic device, the user can interact with the user (for example, the user performs related operations on the electronic device) to obtain the information. Web page related information of the first web page.
在步骤1012中,根据网页相关信息得到该网页相关信息对应的第一源文档。In step 1012, a first source document corresponding to the webpage-related information is obtained according to the webpage-related information.
本发明实施例中,第一源文档可以为第一网页的原始源文档,也可以为与第一网页的原始源文档不同的文档。In this embodiment of the present invention, the first source document may be the original source document of the first webpage, or may be a document different from the original source document of the first webpage.
在一个例子中,当用户浏览第一网页时,发现第一网页中的网页内容很有趣,希望对第一网页中的内容做一些标注,在这种情况下,用户可以使用电子设备获取第一网页的网页相关信息,基于获取到的网页相关信息,生成用户感兴趣的网页内容对应的源文档,即第一源文档。In one example, when the user browses the first web page, he finds that the content of the first web page is very interesting, and wishes to make some annotations on the content of the first web page. In this case, the user can use an electronic device to obtain the first The webpage-related information of the webpage, based on the obtained webpage-related information, generates a source document corresponding to the webpage content that the user is interested in, that is, the first source document.
可选地,在一个实施方式中,当网页相关信息包括:第一网页的网址时,上述步骤1011具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: the website address of the first webpage, the above step 1011 may specifically include at least one of the following steps:
对第一网页的地址栏进行扫描,得到第一网页的网址;Scan the address bar of the first webpage to obtain the URL of the first webpage;
对第一网页中的二维码进行扫描,得到第一网页的网址;Scan the QR code in the first webpage to obtain the URL of the first webpage;
接收用户输入的第一网页的网址。Receive the URL of the first web page entered by the user.
考虑到电子设备的拍照功能和扫描功能越来越强大,以及越来越多的用户青睐使用电子设备的拍照功能和扫描功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为两个不同的电子设备时,可以使用电子设备的扫描功能,对其他电子设备上显示的第一网页进行扫描,具体的,可以扫描第一网页的地址栏或者网页中的二维码,来提取第一网页的网址。需要说明的是,本发明实施例中提到的二维码均指的是指向第一网页的二维码,而不是其他用途的二维码。Considering that the photographing function and scanning function of the electronic device are becoming more and more powerful, and more and more users prefer to use the photographing function and scanning function of the electronic device, in this embodiment of the present invention, when the electronic device displaying the first webpage and the scanning function When the electronic device that obtains webpage-related information is two different electronic devices, the scanning function of the electronic device can be used to scan the first webpage displayed on other electronic devices. Specifically, the address bar or the address bar of the first webpage can be scanned. The QR code in the webpage to extract the URL of the first webpage. It should be noted that, the two-dimensional codes mentioned in the embodiments of the present invention all refer to two-dimensional codes pointing to the first webpage, rather than two-dimensional codes for other purposes.
在一个例子中,电子设备分别为计算机设备和移动终端,如图2所示的应用场景中包括:计算机设备20和移动终端22,其中,计算机设备20上显示有第一网页21,用户可以使用移动终端22的扫描功能,对计算机设备20上显示的第一网页21的地址栏进行扫描,得到第一网页21的网址。In an example, the electronic devices are a computer device and a mobile terminal, respectively. The application scenario shown in FIG. 2 includes: a
考虑到大多数的浏览器都提供网页内容的选择、复制和粘贴功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为同一个电子设备时,用户可以选中第一网页的网址进行复制,将复制的网址提供给电子设备。Considering that most browsers provide functions for selecting, copying, and pasting web page content, in this embodiment of the present invention, when the electronic device displaying the first web page and the electronic device acquiring the relevant information of the web page are the same electronic device , the user can select the URL of the first web page to copy, and provide the copied URL to the electronic device.
在一个例子中,电子设备为移动终端,如图3所示的应用场景中包括:移动终端30,其中,移动终端30上显示有第一网页31,用户可以长按移动终端30上显示的第一网页31的网址,进行网址的复制,之后将复制得到的网址提供给移动终端30。In one example, the electronic device is a mobile terminal, and the application scenario shown in FIG. 3 includes: a
可选地,在一个实施方式中,当网页相关信息包括:第一网页的网址时,上述步骤1012具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: the website address of the first webpage, the above step 1012 may specifically include at least one of the following steps:
基于第一网页的网址,向服务器发送网络请求;Send a network request to the server based on the URL of the first web page;
接收服务器针对网络请求返回的原始源文档;Receive the original source document returned by the server for the network request;
基于原始源文档,生成第一源文档。Based on the original source document, a first source document is generated.
本发明实施例中,原始源文档为第一网页的源文档,第一源文档的内容可以与原始源文档的完全内容相同,也可以为原始源文档的部分内容。In this embodiment of the present invention, the original source document is the source document of the first web page, and the content of the first source document may be the same as the complete content of the original source document, or may be partial content of the original source document.
可选地,在一个实施方式中,当网页相关信息包括:第一网页的目标内容的图像时,上述步骤1011具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: an image of the target content of the first webpage, the above step 1011 may specifically include at least one of the following steps:
对第一网页中的目标内容进行拍照,得到至少一幅图像;photographing the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图,得到至少一幅图像;Taking a screenshot of the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图并对至少一个截图进行编辑,得到至少一幅图像。Taking screenshots of the target content in the first webpage and editing at least one screenshot to obtain at least one image.
考虑到电子设备的拍照功能和扫描功能越来越强大,以及越来越多的用户青睐使用电子设备的拍照功能和扫描功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为两个不同的电子设备时,可以使用电子设备的拍照功能,对其他电子设备上显示的第一网页进行拍照,此时可以获得一幅或多幅包含第一网页中网页内容的图像。Considering that the photographing function and scanning function of the electronic device are becoming more and more powerful, and more and more users prefer to use the photographing function and scanning function of the electronic device, in this embodiment of the present invention, when the electronic device displaying the first webpage and the scanning function When two different electronic devices are used to obtain information about web pages, the photographing function of the electronic devices can be used to take pictures of the first web page displayed on other electronic devices. An image of web page content in a web page.
考虑到大多数的电子设备都具备截图功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为同一个电子设备时,用户可以通过电子设备的截图功能,对第一网页中的网页内容进行截图,此时可以获得一幅或多幅包含第一网页中网页内容的截图图像。Considering that most electronic devices have a screenshot function, in this embodiment of the present invention, when the electronic device displaying the first web page and the electronic device acquiring the relevant information of the web page are the same electronic device, the user can The screenshot function is to take a screenshot of the webpage content in the first webpage, and at this time, one or more screenshot images including the webpage content in the first webpage can be obtained.
考虑到大多数的电子设备都具备截图功能和图像编辑功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为同一个电子设备时,用户可以通过电子设备的截图功能,对第一网页中的网页内容进行截图,用户还可以对截图所得到的图像进行二次编辑(例如,在图片上编辑文本),此时可以获得一幅或多幅包含第一网页中网页内容的图像。Considering that most electronic devices have a screenshot function and an image editing function, in this embodiment of the present invention, when the electronic device displaying the first web page and the electronic device acquiring the relevant information of the web page are the same electronic device, the user can Through the screenshot function of the electronic device, the content of the webpage in the first webpage is screenshotted, and the user can also perform secondary editing on the image obtained by the screenshot (for example, editing text on the picture), and at this time, one or more pictures can be obtained. Contains an image of the web page content in the first web page.
可选地,在一个实施方式中,当网页相关信息包括:第一网页的目标内容的图像时,上述步骤1012具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: an image of the target content of the first webpage, the above step 1012 may specifically include at least one of the following steps:
针对目标内容的图像,创建对应的元素节点,其中,一幅图像对应一个元素节点;Create a corresponding element node for the image of the target content, where one image corresponds to one element node;
为元素节点创建预设类型的样式,得到第一源文档。Create a preset type of style for the element node, and get the first source document.
本发明实施例中,当网页相关信息包括:第一网页的目标内容的图像时,可以基于第一网页的目标内容的图像,创建HTML格式的文档,具体的,为每一幅图像创建一个对应的元素节点,为每个元素节点创建预设类型的样式,从而得到第一源文档;其中,预设类型的样式通常为HTML默认的样式,第一源文档与第一网页的原始源文档不相同。In this embodiment of the present invention, when the webpage-related information includes: an image of the target content of the first webpage, a document in HTML format can be created based on the image of the target content of the first webpage. Specifically, a corresponding image is created for each image. element node, create a preset type style for each element node, so as to obtain the first source document; wherein, the preset type style is usually the HTML default style, and the first source document is different from the original source document of the first web page. same.
可选地,在一个实施方式中,当网页相关信息包括:第一网页的目标内容的文本时,上述步骤1011具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: the text of the target content of the first webpage, the above step 1011 may specifically include at least one of the following steps:
对第一网页中的目标内容进行扫描,得到目标内容的文本;Scan the target content in the first web page to obtain the text of the target content;
接收用户输入的目标内容的文本。Receives the text of the target content entered by the user.
考虑到电子设备的拍照功能和扫描功能越来越强大,以及越来越多的用户青睐使用电子设备的拍照功能和扫描功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为两个不同的电子设备时,可以使用电子设备的扫描功能,对其他电子设备上显示的第一网页的网页内容进行扫描,提取其中的文本。Considering that the photographing function and scanning function of the electronic device are becoming more and more powerful, and more and more users prefer to use the photographing function and scanning function of the electronic device, in this embodiment of the present invention, when the electronic device displaying the first webpage and the scanning function When two different electronic devices are used to obtain web page related information, the scanning function of the electronic devices can be used to scan the web content of the first web page displayed on other electronic devices to extract the text therein.
考虑到大多数的浏览器都提供网页内容的选择、复制和粘贴功能,因此,本发明实施例中,当显示第一网页的电子设备和获取网页相关信息的电子设备,为同一个电子设备时,用户可以选中第一网页的全部或部分内容进行复制,将复制的网页内容提供给电子设备。Considering that most browsers provide functions for selecting, copying, and pasting web page content, in this embodiment of the present invention, when the electronic device displaying the first web page and the electronic device acquiring the relevant information of the web page are the same electronic device , the user can select all or part of the content of the first web page to copy, and provide the copied web page content to the electronic device.
可选地,在一个实施方式中,当网页相关信息包括:第一网页的目标内容的文本时,上述步骤1012具体可以包括下述至少一个步骤:Optionally, in one embodiment, when the webpage-related information includes: the text of the target content of the first webpage, the above step 1012 may specifically include at least one of the following steps:
针对目标内容的文本,创建对应的元素节点,其中,文本中的一段文字对应一个元素节点;For the text of the target content, create a corresponding element node, wherein a piece of text in the text corresponds to an element node;
为元素节点创建预设类型的样式,得到第一源文档。Create a preset type of style for the element node, and get the first source document.
本发明实施例中,当网页相关信息包括:第一网页的目标内容的文本时,可以基于第一网页的目标内容的文本,创建HTML格式的文档,具体的,为文本中的一段文字创建一个对应的元素节点,为每个元素节点创建预设类型的样式,从而得到第一源文档;其中,预设类型的样式通常为HTML默认的样式,第一源文档与第一网页的原始源文档不相同。In this embodiment of the present invention, when the web page related information includes: the text of the target content of the first web page, a document in HTML format may be created based on the text of the target content of the first web page. Specifically, a document is created for a piece of text in the text. For the corresponding element node, a style of a preset type is created for each element node, thereby obtaining the first source document; wherein, the style of the preset type is usually the HTML default style, the first source document and the original source document of the first webpage Are not the same.
可见,本发明实施例中,可以提供多种生成第一源文档的方式,能够满足多种应用场景下的需求,灵活性较高。It can be seen that, in the embodiment of the present invention, various ways of generating the first source document can be provided, which can meet the requirements in various application scenarios and have high flexibility.
在步骤102中,为第一源文档添加监听事件和监听事件对应的响应事件,得到第二源文档。In
本发明实施例中,监听事件用于监听用户触发的预设事件,响应事件用于在监听到预设事件时为用户提供标注内容输入接口。In the embodiment of the present invention, the monitoring event is used to monitor the preset event triggered by the user, and the response event is used to provide the user with an input interface for marking content when the preset event is monitored.
本发明实施例中,通过向第一源文档添加监听事件和响应事件,得到第二源文档,使得第二源文档对应的网页支持用户的编辑行为,从而实现对网页的标注。In the embodiment of the present invention, the second source document is obtained by adding a monitoring event and a response event to the first source document, so that the webpage corresponding to the second source document supports the user's editing behavior, thereby realizing the marking of the webpage.
本发明实施例中,预设事件可以包括下述至少一项:点击事件、长按事件和光标事件;标注内容输入接口可以包括:文本输入框或语音输入图标。In this embodiment of the present invention, the preset event may include at least one of the following: a click event, a long press event, and a cursor event; the annotation content input interface may include: a text input box or a voice input icon.
在步骤103中,根据第二源文档生成与第二源文档对应的第二网页。In
本发明实施例中,可以解析第二源文档,并根据解析结果绘制第二网页。。In this embodiment of the present invention, the second source document may be parsed, and the second web page may be drawn according to the parsing result. .
在步骤104中,当监听到用户针对第二网页触发的预设事件时,显示标注内容输入接口。In
在一个例子中,当标注内容输入接口为文本输入框时,用户可以在该文本输入框中输入标注内容。In one example, when the annotation content input interface is a text input box, the user can input annotation content in the text input box.
在一个例子中,当标注内容输入接口为语音输入图标时,用户可以通过按压该语音输入图标来输入标注内容对应的语音。In one example, when the annotation content input interface is a voice input icon, the user can input the voice corresponding to the annotation content by pressing the voice input icon.
在步骤105中,当接收到用户在标注内容输入接口中输入的标注内容后,将标注内容添加到第二网页上。In
本发明实施例中,当用户在标注内容输入接口中输入的标注内容为文本时,可以直接将该文本添加到第二网页上;当用户在标注内容输入接口中输入的标注内容为语音时,可以首先将该语音转换为文本,之后将该文本添加到第二网页上。In this embodiment of the present invention, when the annotation content input by the user in the annotation content input interface is text, the text can be directly added to the second web page; when the annotation content input by the user in the annotation content input interface is speech, The speech can be first converted to text, and then the text can be added to the second web page.
本发明实施例中,可以将标注内容添加到第二网页的任意位置上。In this embodiment of the present invention, the marked content may be added to any position on the second webpage.
本发明实施例中,为了直观地体现标注内容与第二网页中被标注内容的对应关系,便于用户有针对性地查看网页内容,此时,在上述步骤105之前,还可以增加以下步骤:获取预设事件的触发位置;相应的,上述步骤105具体可以包括以下步骤:In this embodiment of the present invention, in order to intuitively reflect the corresponding relationship between the marked content and the marked content in the second webpage and facilitate the user to view the webpage content in a targeted manner, at this time, before the
当接收到用户在标注内容输入接口中输入的标注内容后,将该标注内容添加到第二网页中的上述触发位置上。After receiving the marked content input by the user in the marked content input interface, the marked content is added to the above-mentioned trigger position in the second webpage.
为了理解,下面结合图4所示的应用场景图对本发明实施例的技术方案进行描述,如图4所示,该应用场景中包括:移动终端40,其中,移动终端40上显示有第二网页41,当用户点击第二网页41上的一位置时,该位置处弹出“标准内容输入框”42(即标注内容输入接口),用户在该标准内容输入框42中输入文字“这段文字很赞!”后,“这段文字很赞!”这段文本会被添加到第二网页41中用户点击的位置处,从而实现对网页的标注。For understanding, the technical solution of the embodiment of the present invention will be described below with reference to the application scenario diagram shown in FIG. 4 . As shown in FIG. 4 , the application scenario includes: a
由上述实施例可见,该实施例中,在需要对网页中的网页内容进行标注时,可以生成与原网页的网页内容相关的源文档,并为该源文档添加监听事件和响应事件,生成新的源文档,之后对新的源文档进行解析,在电子设备上绘制新的网页,由于新的网页对应的源文档中包含监听事件和响应事件,因此用户可以在新的网页上进行内容标注。与现有技术相比,本发明实施例中,无需专门在电子设备中安装特定浏览器或特定浏览器插件,就可以实现在网页中添加标注,灵活性较高。It can be seen from the above embodiment that in this embodiment, when the webpage content in the webpage needs to be marked, a source document related to the webpage content of the original webpage can be generated, and a monitoring event and a response event can be added to the source document to generate a new one. After that, the new source document is parsed, and a new web page is drawn on the electronic device. Since the source document corresponding to the new web page contains listening events and response events, the user can mark the content on the new web page. Compared with the prior art, in the embodiment of the present invention, it is not necessary to install a specific browser or a specific browser plug-in in the electronic device, so that the annotation can be added to the webpage, and the flexibility is high.
在本发明提供的另一个实施例中,为了便于用户后续对带标注内容的网页进行访问,此时,网页标注方法还可以在上述步骤105之后,增加以下步骤:,In another embodiment provided by the present invention, in order to facilitate the user to access the webpage with marked content later, at this time, the webpage marking method can also add the following steps after the above step 105:
基于添加有标注内容的第二网页,生成第三源文档;存储第三源文档;输出第三源文档的访问地址。Generate a third source document based on the second web page to which the marked content is added; store the third source document; and output the access address of the third source document.
本发明实施例中,第三源文档为带标注内容的第二网页对应的源文档。In the embodiment of the present invention, the third source document is a source document corresponding to the second webpage with marked content.
本发明实施例中,在第二网页标注完毕后,可以创建新的元素节点,将用户输入的标注内容作为新创建的元素节点的文本节点,之后将该元素节点添加到预设事件的触发位置所在节点处,并为该元素节点创建预设类型的样式(通常为HTML默认的样式),从而得到第三源文档。In the embodiment of the present invention, after the second webpage is marked, a new element node may be created, the marked content input by the user is used as the text node of the newly created element node, and then the element node is added to the trigger position of the preset event where the node is located, and create a preset type style (usually the HTML default style) for the element node, thereby obtaining the third source document.
本发明实施例中,可以将第三源文档存储至电子设备的本地,也可以将第三源文档上传至服务器。In this embodiment of the present invention, the third source document may be stored locally on the electronic device, or the third source document may be uploaded to the server.
本发明实施例中,当第三源文档存储在电子设备的本地时,该电子设备可以生成第三源文档的访问地址,并输出,以便用户可以通过该访问地址,查看带标注内容的第二网页,其中,访问地址通常为URL地址。In this embodiment of the present invention, when the third source document is stored locally on the electronic device, the electronic device can generate and output the access address of the third source document, so that the user can view the second document with marked content through the access address. A web page, wherein the access address is usually a URL address.
本发明实施例中,当第三源文档存储在服务器时,该电子设备可以从服务器获取第三源文档的访问地址,并输出,以便用户可以通过该访问地址,查看带标注内容的第二网页,其中,访问地址通常为URL地址。In this embodiment of the present invention, when the third source document is stored in the server, the electronic device can obtain the access address of the third source document from the server and output it, so that the user can view the second webpage with marked content through the access address , where the access address is usually a URL address.
由上述实施例可见,该实施例中,可以针对带标注内容的网页生成相应的源文档,并提供相应的访问地址,以便用户可以长期访问该带标注内容的网页。It can be seen from the above embodiment that in this embodiment, a corresponding source document can be generated for a webpage with marked content, and a corresponding access address can be provided, so that the user can access the webpage with marked content for a long time.
图5是本发明的一个实施例的电子设备的结构示意图,如图5所示,电子设备500,可以包括:第一生成模块501、第二生成模块502、第三生成模块503、显示模块504和添加模块505,其中,FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 5 , the
第一生成模块501,用于生成第一网页中目标内容对应的第一源文档;The
第二生成模块502,用于为所述第一源文档添加监听事件和所述监听事件对应的响应事件,得到第二源文档,其中,所述监听事件用于监听用户触发的预设事件,所述响应事件用于在监听到预设事件时为用户提供标注内容输入接口;The
第三生成模块503,用于根据所述第二源文档生成与所述第二源文档对应的第二网页;a
显示模块504,用于在监听到用户针对所述第二网页触发的所述预设事件的情况下,显示所述标注内容输入接口;A
添加模块505,用于在接收到用户在所述标注内容输入接口中输入的标注内容后,将所述标注内容添加到所述第二网页上。The adding
由上述实施例可见,该实施例中,在需要对网页中的网页内容进行标注时,可以生成与原网页的网页内容相关的源文档,并为该源文档添加监听事件和响应事件,生成新的源文档,之后对新的源文档进行解析,在电子设备上绘制新的网页,由于新的网页对应的源文档中包含监听事件和响应事件,因此用户可以在新的网页上进行内容标注。与现有技术相比,本发明实施例中,无需专门在电子设备中安装特定浏览器或特定浏览器插件,就可以实现在网页中添加标注,灵活性较高。It can be seen from the above embodiment that in this embodiment, when the webpage content in the webpage needs to be marked, a source document related to the webpage content of the original webpage can be generated, and a monitoring event and a response event can be added to the source document to generate a new one. After that, the new source document is parsed, and a new web page is drawn on the electronic device. Since the source document corresponding to the new web page contains listening events and response events, the user can mark the content on the new web page. Compared with the prior art, in the embodiment of the present invention, it is not necessary to install a specific browser or a specific browser plug-in in the electronic device, so that the annotation can be added to the webpage, and the flexibility is high.
可选地,作为一个实施例,所述第一生成模块501,可以包括:Optionally, as an embodiment, the
网页相关信息获取子模块,用于获取第一网页的网页相关信息,其中,所述网页相关信息包括下述至少一项:所述第一网页的网址、所述第一网页的目标内容的图像和所述第一网页的目标内容的文本;The webpage-related information acquisition sub-module is used to obtain webpage-related information of the first webpage, wherein the webpage-related information includes at least one of the following: a website address of the first webpage, an image of the target content of the first webpage and the text of the target content of the first web page;
第一源文档生成子模块,用于根据所述网页相关信息得到所述网页相关信息对应的第一源文档。The first source document generation submodule is configured to obtain the first source document corresponding to the webpage-related information according to the webpage-related information.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的网址;Optionally, as an embodiment, the web page related information includes: the URL of the first web page;
所述网页相关信息获取子模块,具体用于下述至少一项:The webpage-related information acquisition submodule is specifically used for at least one of the following:
对第一网页的地址栏进行扫描,得到所述第一网页的网址;Scan the address bar of the first webpage to obtain the website address of the first webpage;
对第一网页中的二维码进行扫描,得到所述第一网页的网址,其中,所述二维码用于指向所述第一网页;Scan the two-dimensional code in the first webpage to obtain the website address of the first webpage, wherein the two-dimensional code is used to point to the first webpage;
接收用户输入的第一网页的网址。Receive the URL of the first web page entered by the user.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的网址;Optionally, as an embodiment, the web page related information includes: the URL of the first web page;
所述第一源文档生成子模块,具体用于:The first source document generation submodule is specifically used for:
基于所述第一网页的网址,向服务器发送网络请求;Send a network request to the server based on the URL of the first webpage;
接收所述服务器针对所述网络请求返回的原始源文档;receiving the original source document returned by the server for the network request;
基于所述原始源文档,生成第一源文档。Based on the original source document, a first source document is generated.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的图像;Optionally, as an embodiment, the webpage-related information includes: an image of the target content of the first webpage;
所述网页相关信息获取子模块,具体用于下述至少一项:The webpage-related information acquisition submodule is specifically used for at least one of the following:
对第一网页中的目标内容进行拍照,得到至少一幅图像;photographing the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图,得到至少一幅图像;Taking a screenshot of the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图并对至少一个截图进行编辑,得到至少一幅图像。Taking screenshots of the target content in the first webpage and editing at least one screenshot to obtain at least one image.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的图像;Optionally, as an embodiment, the webpage-related information includes: an image of the target content of the first webpage;
所述第一源文档生成子模块,具体用于:The first source document generation submodule is specifically used for:
针对所述目标内容的图像,创建对应的元素节点,其中,一幅图像对应一个元素节点;For the image of the target content, create a corresponding element node, wherein one image corresponds to one element node;
为所述元素节点创建预设类型的样式,得到第一源文档。A style of a preset type is created for the element node to obtain a first source document.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的文本;Optionally, as an embodiment, the webpage related information includes: the text of the target content of the first webpage;
所述网页相关信息获取子模块,具体用于下述至少一项:The webpage-related information acquisition submodule is specifically used for at least one of the following:
对第一网页中的目标内容进行扫描,得到所述目标内容的文本;Scanning the target content in the first web page to obtain the text of the target content;
接收用户输入的目标内容的文本。Receives the text of the target content entered by the user.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的文本;Optionally, as an embodiment, the webpage related information includes: the text of the target content of the first webpage;
所述第一源文档生成子模块,具体用于:The first source document generation submodule is specifically used for:
针对所述目标内容的文本,创建对应的元素节点,其中,所述文本中的一段文字对应一个元素节点;Create a corresponding element node for the text of the target content, wherein a piece of text in the text corresponds to an element node;
为所述元素节点创建预设类型的样式,得到第一源文档。A style of a preset type is created for the element node to obtain a first source document.
可选地,作为一个实施例,所述电子设备500,还可以包括:Optionally, as an embodiment, the
获取模块,用于获取所述预设事件的触发位置;an acquisition module for acquiring the trigger position of the preset event;
所述添加模块,可以包括:The adding module may include:
标注内容添加子模块,用于在接收到用户在所述标注内容输入接口中输入的标注内容后,将所述标注内容添加到所述第二网页中的所述触发位置上。An annotation content adding sub-module is configured to add the annotation content to the trigger position in the second webpage after receiving the annotation content input by the user in the annotation content input interface.
当本发明实施例中的电子设备为移动终端时,如图6所示,图6是实现本发明各个实施例的一种移动终端的硬件结构示意图,该移动终端600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609、处理器610、以及电源611等部件。本领域技术人员可以理解,图6中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。When the electronic device in the embodiment of the present invention is a mobile terminal, as shown in FIG. 6 , FIG. 6 is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The
其中,处理器610,用于生成第一网页中目标内容对应的第一源文档;为所述第一源文档添加监听事件和所述监听事件对应的响应事件,得到第二源文档,其中,所述监听事件用于监听用户触发的预设事件,所述响应事件用于在监听到预设事件时为用户提供标注内容输入接口;根据所述第二源文档生成与所述第二源文档对应的第二网页;当监听到用户针对所述第二网页触发的所述预设事件时,显示所述标注内容输入接口;当接收到用户在所述标注内容输入接口中输入的标注内容后,将所述标注内容添加到所述第二网页上。The
本发明实施例中,在需要对网页中的网页内容进行标注时,可以生成与原网页的网页内容相关的源文档,并为该源文档添加监听事件和响应事件,生成新的源文档,之后对新的源文档进行解析,在电子设备上绘制新的网页,由于新的网页对应的源文档中包含监听事件和响应事件,因此用户可以在新的网页上进行内容标注。与现有技术相比,本发明实施例中,无需专门在电子设备中安装特定浏览器或特定浏览器插件,就可以实现在网页中添加标注,灵活性较高。In the embodiment of the present invention, when the webpage content in the webpage needs to be marked, a source document related to the webpage content of the original webpage can be generated, and a monitoring event and a response event can be added to the source document to generate a new source document, and then a new source document can be generated. The new source document is parsed, and a new web page is drawn on the electronic device. Since the source document corresponding to the new web page contains listening events and response events, the user can mark the content on the new web page. Compared with the prior art, in the embodiment of the present invention, it is not necessary to install a specific browser or a specific browser plug-in in the electronic device, so that the annotation can be added to the webpage, and the flexibility is high.
可选地,作为一个实施例,所述生成第一网页中目标内容对应的第一源文档的步骤,包括:Optionally, as an embodiment, the step of generating the first source document corresponding to the target content in the first web page includes:
获取第一网页的网页相关信息,其中,所述网页相关信息包括下述至少一项:所述第一网页的网址、所述第一网页的目标内容的图像和所述第一网页的目标内容的文本;Obtain webpage-related information of the first webpage, wherein the webpage-related information includes at least one of the following: a URL of the first webpage, an image of target content of the first webpage, and target content of the first webpage the text;
根据所述网页相关信息得到所述网页相关信息对应的第一源文档。The first source document corresponding to the webpage-related information is obtained according to the webpage-related information.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的网址;Optionally, as an embodiment, the web page related information includes: the URL of the first web page;
所述获取第一网页的网页相关信息的步骤,包括下述至少一项:The step of acquiring webpage-related information of the first webpage includes at least one of the following:
对第一网页的地址栏进行扫描,得到所述第一网页的网址;Scan the address bar of the first webpage to obtain the website address of the first webpage;
对第一网页中的二维码进行扫描,得到所述第一网页的网址,其中,所述二维码用于指向所述第一网页;Scan the two-dimensional code in the first webpage to obtain the website address of the first webpage, wherein the two-dimensional code is used to point to the first webpage;
接收用户输入的第一网页的网址。Receive the URL of the first web page entered by the user.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的网址;Optionally, as an embodiment, the web page related information includes: the URL of the first web page;
所述根据所述网页相关信息得到所述网页相关信息对应的第一源文档的步骤,包括:The step of obtaining the first source document corresponding to the webpage-related information according to the webpage-related information includes:
基于所述第一网页的网址,向服务器发送网络请求;Send a network request to the server based on the URL of the first webpage;
接收所述服务器针对所述网络请求返回的原始源文档;receiving the original source document returned by the server for the network request;
基于所述原始源文档,生成第一源文档。Based on the original source document, a first source document is generated.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的图像;Optionally, as an embodiment, the webpage-related information includes: an image of the target content of the first webpage;
所述获取第一网页的网页相关信息的步骤,包括下述至少一项:The step of acquiring webpage-related information of the first webpage includes at least one of the following:
对第一网页中的目标内容进行拍照,得到至少一幅图像;photographing the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图,得到至少一幅图像;Taking a screenshot of the target content in the first webpage to obtain at least one image;
对第一网页中的目标内容进行截图并对至少一个截图进行编辑,得到至少一幅图像。Taking screenshots of the target content in the first webpage and editing at least one screenshot to obtain at least one image.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的图像;Optionally, as an embodiment, the webpage-related information includes: an image of the target content of the first webpage;
所述根据所述网页相关信息得到所述网页相关信息对应的第一源文档的步骤,包括:The step of obtaining the first source document corresponding to the webpage-related information according to the webpage-related information includes:
针对所述目标内容的图像,创建对应的元素节点,其中,一幅图像对应一个元素节点;For the image of the target content, create a corresponding element node, wherein one image corresponds to one element node;
为所述元素节点创建预设类型的样式,得到第一源文档。A style of a preset type is created for the element node to obtain a first source document.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的文本;Optionally, as an embodiment, the webpage related information includes: the text of the target content of the first webpage;
所述获取第一网页的网页相关信息的步骤,包括下述至少一项:The step of acquiring webpage-related information of the first webpage includes at least one of the following:
对第一网页中的目标内容进行扫描,得到所述目标内容的文本;Scanning the target content in the first web page to obtain the text of the target content;
接收用户输入的目标内容的文本。Receives the text of the target content entered by the user.
可选地,作为一个实施例,所述网页相关信息包括:所述第一网页的目标内容的文本;Optionally, as an embodiment, the webpage related information includes: the text of the target content of the first webpage;
所述根据所述网页相关信息得到所述网页相关信息对应的第一源文档的步骤,包括:The step of obtaining the first source document corresponding to the webpage-related information according to the webpage-related information includes:
针对所述目标内容的文本,创建对应的元素节点,其中,所述文本中的一段文字对应一个元素节点;Create a corresponding element node for the text of the target content, wherein a piece of text in the text corresponds to an element node;
为所述元素节点创建预设类型的样式,得到第一源文档。A style of a preset type is created for the element node to obtain a first source document.
可选地,作为一个实施例,在所述将所述标注内容添加到所述第二网页上的步骤之前,还包括:Optionally, as an embodiment, before the step of adding the marked content to the second webpage, the method further includes:
获取所述预设事件的触发位置;obtaining the trigger position of the preset event;
所述将所述标注内容添加到所述第二网页上的步骤,包括:The step of adding the marked content to the second webpage includes:
将所述标注内容添加到所述第二网页中的所述触发位置上。adding the marked content to the trigger position in the second web page.
应理解的是,本发明实施例中,射频单元601可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器610处理;另外,将上行的数据发送给基站。通常,射频单元601包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元601还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the
移动终端通过网络模块602为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides the user with wireless broadband Internet access through the
音频输出单元603可以将射频单元601或网络模块602接收的或者在存储器609中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元603还可以提供与移动终端600执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元603包括扬声器、蜂鸣器以及受话器等。The
输入单元604用于接收音频或视频信号。输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)6041和麦克风6042,图形处理器6041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元606上。经图形处理器6041处理后的图像帧可以存储在存储器609(或其它存储介质)中或者经由射频单元601或网络模块602进行发送。麦克风6042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元601发送到移动通信基站的格式输出。The
移动终端600还包括至少一种传感器605,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板6061的亮度,接近传感器可在移动终端600移动到耳边时,关闭显示面板6061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器605还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The
显示单元606用于显示由用户输入的信息或提供给用户的信息。显示单元606可包括显示面板6061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板6061。The
用户输入单元607可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元607包括触控面板6071以及其他输入设备6072。触控面板6071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板6071上或在触控面板6071附近的操作)。触控面板6071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板6071。除了触控面板6071,用户输入单元607还可以包括其他输入设备6072。具体地,其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The
进一步的,触控面板6071可覆盖在显示面板6061上,当触控面板6071检测到在其上或附近的触摸操作后,传送给处理器610以确定触摸事件的类型,随后处理器610根据触摸事件的类型在显示面板6061上提供相应的视觉输出。虽然在图6中,触控面板6071与显示面板6061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板6071与显示面板6061集成而实现移动终端的输入和输出功能,具体此处不做限定。Further, the
接口单元608为外部装置与移动终端600连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元608可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端600内的一个或多个元件或者可以用于在移动终端600和外部装置之间传输数据。The
存储器609可用于存储软件程序以及各种数据。存储器609可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器609可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The
处理器610是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器609内的软件程序和/或模块,以及调用存储在存储器609内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。The
移动终端600还可以包括给各个部件供电的电源611(比如电池),优选的,电源611可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The
另外,移动终端600包括一些未示出的功能模块,在此不再赘述。In addition, the
优选的,本发明实施例还提供一种移动终端,包括处理器610,存储器609,存储在存储器609上并可在所述处理器610上运行的网页标注程序,该网页标注程序被处理器610执行时实现上述网页标注方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present invention further provides a mobile terminal, including a
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有网页标注程序,该网页标注程序被处理器执行时实现上述网页标注方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention further provide a computer-readable storage medium, where a web page labeling program is stored on the computer-readable storage medium. When the page labeling program is executed by a processor, each process of the above web page labeling method embodiments can be achieved, and can achieve the same In order to avoid repetition, the technical effect will not be repeated here. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk, or an optical disk.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810824401.7A CN109063079B (en) | 2018-07-25 | 2018-07-25 | Webpage labeling method and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810824401.7A CN109063079B (en) | 2018-07-25 | 2018-07-25 | Webpage labeling method and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109063079A CN109063079A (en) | 2018-12-21 |
| CN109063079B true CN109063079B (en) | 2020-11-06 |
Family
ID=64836055
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810824401.7A Active CN109063079B (en) | 2018-07-25 | 2018-07-25 | Webpage labeling method and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109063079B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110377500B (en) * | 2019-06-14 | 2024-06-14 | 平安科技(深圳)有限公司 | Method, device, terminal equipment and medium for testing website pages |
| CN110888810B (en) * | 2019-11-19 | 2020-10-30 | 广东润联信息技术有限公司 | Method and device for automatic identification and marking, computer equipment and storage medium |
| CN113779438B (en) * | 2021-08-23 | 2024-05-31 | 深圳价值在线信息科技股份有限公司 | Webpage text information processing method and device and terminal equipment |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101739415A (en) * | 2008-11-25 | 2010-06-16 | 华中师范大学 | Browser-oriented webpage labeling system |
| CN102360272A (en) * | 2011-11-04 | 2012-02-22 | 南京芒冠光电科技股份有限公司 | Dynamic transparent tagging and mouse operating system |
| CN102609401A (en) * | 2011-12-26 | 2012-07-25 | 北京大学 | Webpage annotation method |
| CN106502506A (en) * | 2016-11-01 | 2017-03-15 | 上海爱数信息技术股份有限公司 | The mask method of document, system and electronic equipment in webpage |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090307618A1 (en) * | 2008-06-05 | 2009-12-10 | Microsoft Corporation | Annotate at multiple levels |
| US8676814B2 (en) * | 2012-02-16 | 2014-03-18 | Yahoo! Inc. | Automatic face annotation of images contained in media content |
-
2018
- 2018-07-25 CN CN201810824401.7A patent/CN109063079B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101739415A (en) * | 2008-11-25 | 2010-06-16 | 华中师范大学 | Browser-oriented webpage labeling system |
| CN102360272A (en) * | 2011-11-04 | 2012-02-22 | 南京芒冠光电科技股份有限公司 | Dynamic transparent tagging and mouse operating system |
| CN102609401A (en) * | 2011-12-26 | 2012-07-25 | 北京大学 | Webpage annotation method |
| CN106502506A (en) * | 2016-11-01 | 2017-03-15 | 上海爱数信息技术股份有限公司 | The mask method of document, system and electronic equipment in webpage |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109063079A (en) | 2018-12-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107943390B (en) | Character copying method and mobile terminal | |
| CN108132752B (en) | A text editing method and mobile terminal | |
| CN108287739A (en) | An operation guidance method and mobile terminal | |
| CN109614061B (en) | Display method and terminal | |
| CN109739402B (en) | Fast application processing method and terminal equipment | |
| CN109240577B (en) | Screen capturing method and terminal | |
| CN109710349B (en) | Screen capturing method and mobile terminal | |
| CN110674662A (en) | Scanning method and terminal equipment | |
| WO2020156118A1 (en) | Management method and terminal apparatus | |
| WO2021175143A1 (en) | Picture acquisition method and electronic device | |
| CN111274842A (en) | Coded image recognition method and electronic device | |
| CN110795002A (en) | A screenshot method and terminal device | |
| CN111698550A (en) | Information display method and device, electronic equipment and medium | |
| CN108616772A (en) | A kind of barrage display methods, terminal and server | |
| CN107885799A (en) | Info web display methods and device | |
| WO2020192322A1 (en) | Display method and terminal device | |
| CN108170723B (en) | Webpage resource acquisition method, terminal equipment, server and system | |
| WO2021197154A1 (en) | Audio processing method, server, electronic device and computer-readable storage medium | |
| CN109063079B (en) | Webpage labeling method and electronic equipment | |
| WO2020220893A1 (en) | Screenshot method and mobile terminal | |
| CN107948278B (en) | Information transmission method, terminal equipment and system | |
| CN107967652B (en) | A kind of information sharing method sends lateral terminal, receives lateral terminal and server | |
| CN110231899A (en) | Display methods and terminal device | |
| CN108256108A (en) | A kind of processing method and terminal for showing content | |
| CN109672845B (en) | Video call method and device and mobile terminal |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |