Movatterモバイル変換


[0]ホーム

URL:


CN104899024B - A kind of screenshot method and device - Google Patents

A kind of screenshot method and device
Download PDF

Info

Publication number
CN104899024B
CN104899024BCN201510250780.XACN201510250780ACN104899024BCN 104899024 BCN104899024 BCN 104899024BCN 201510250780 ACN201510250780 ACN 201510250780ACN 104899024 BCN104899024 BCN 104899024B
Authority
CN
China
Prior art keywords
target area
screenshot
type
data
current
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.)
Expired - Fee Related
Application number
CN201510250780.XA
Other languages
Chinese (zh)
Other versions
CN104899024A (en
Inventor
成军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510250780.XApriorityCriticalpatent/CN104899024B/en
Publication of CN104899024ApublicationCriticalpatent/CN104899024A/en
Application grantedgrantedCritical
Publication of CN104899024BpublicationCriticalpatent/CN104899024B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The invention belongs to intelligent terminal technical field, it is related to a kind of screenshot method and device.When the screenshot method is included in preset screenshot event and is triggered, current screenshot is obtained;Each target area in the current screenshot is scanned, and determines the type of each target area, the type of the target area includes literal type and/or type of network address;Parsing obtains each target area in the coordinate in the current screenshot and the data content in each target area;Coordinate, type and the data content of each target area are stored in the corresponding current data structure of the current screenshot.Type, coordinate and the data content of each target area in current screenshot are stored in the corresponding current data structure of the current screenshot by this method, to simplify the access process of screenshot, improve the access efficiency of screenshot.

Description

Translated fromChinese
一种截图方法及装置A screenshot method and device

技术领域technical field

本发明属于智能终端技术领域,涉及一种截图方法及装置。The invention belongs to the technical field of intelligent terminals, and relates to a screenshot method and device.

背景技术Background technique

随着移动通信技术的快速发展,智能手机、平板电脑等智能终端已经广泛应用于工作、生活的各个领域。With the rapid development of mobile communication technology, intelligent terminals such as smartphones and tablet computers have been widely used in various fields of work and life.

在智能终端的可视化操作系统中,截图是一项很常用的功能。现有的截图方法只能保存图片格式的信息,而用户真正需要使用的可能是截图区域中的文字信息和控件信息,使得用户在使用截图中的文字信息和控件信息时,需要人工地还原截图中的文字信息和控件信息。例如,用户截取了某个网址信息对应的图片,在访问该网址信息对应的网页时用户需要手动地将所述网址信息输入到浏览器中。因此现有的截图方法导致截图的访问过程繁琐,且效率低下,无法满足用户需求。In the visual operating system of smart terminals, taking screenshots is a very common function. The existing screenshot method can only save the information in the image format, but what the user really needs to use may be the text information and control information in the screenshot area, so that the user needs to restore the screenshot manually when using the text information and control information in the screenshot Text information and control information in . For example, a user intercepts a picture corresponding to a certain URL information, and the user needs to manually input the URL information into a browser when accessing a web page corresponding to the URL information. Therefore, the existing screenshot method leads to cumbersome and inefficient access to screenshots, which cannot meet user needs.

发明内容Contents of the invention

本发明的目的是提出一种截图的方法及系统,以简化截图的访问过程,提高截图的访问效率。The object of the present invention is to propose a screenshot method and system, so as to simplify the screenshot access process and improve the screenshot access efficiency.

一方面,本发明实施例提供一种截图方法,包括:On the one hand, an embodiment of the present invention provides a screenshot method, including:

在预设的截图事件被触发时,获取当前截图;Get the current screenshot when the preset screenshot event is triggered;

扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型;scanning each target area in the current screenshot, and determining the type of each target area, where the type of the target area includes text type and/or network address type;

解析获得所述每个目标区域在所述当前截图中的坐标,以及所述每个目标区域中的数据内容;Analyzing and obtaining the coordinates of each target area in the current screenshot, and the data content in each target area;

将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。The coordinates, type and data content of each target area are stored in the current data structure corresponding to the current screenshot.

又一方面,本发明实施例提供一种访问截图的方法,包括:In yet another aspect, an embodiment of the present invention provides a method for accessing screenshots, including:

在截图被打开时,获得所述截图对应的数据结构;When the screenshot is opened, obtain a data structure corresponding to the screenshot;

在所述截图被用户点击时,获取被点击位置在所述截图中的坐标;When the screenshot is clicked by the user, obtain the coordinates of the clicked position in the screenshot;

在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员;When it is determined according to the obtained coordinates that the clicked position belongs to an area member of the data structure, acquiring a type member and a data member corresponding to the area member to which the clicked position belongs;

依据获取的类型成员和数据成员,响应所述点击操作。According to the obtained type member and data member, respond to the click operation.

另一方面,本发明实施例提供一种截图装置,包括:On the other hand, an embodiment of the present invention provides a screenshot device, including:

截图获取单元,用于在预设的截图事件被触发时,获取当前截图;A screenshot acquiring unit, configured to acquire the current screenshot when a preset screenshot event is triggered;

区域确定单元,用于扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型;an area determining unit, configured to scan each target area in the current screenshot, and determine the type of each target area, where the type of the target area includes text type and/or network address type;

坐标获得单元,用于解析获得所述每个目标区域在所述当前截图中的坐标;a coordinate obtaining unit, configured to analyze and obtain the coordinates of each target area in the current screenshot;

数据获得单元,用于获得所述每个目标区域中的数据内容;a data obtaining unit, configured to obtain data content in each target area;

截图存储单元,用于将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。The screenshot storage unit is configured to store the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot.

再一方面,本发明实施例提供一种访问截图的装置,包括:In another aspect, an embodiment of the present invention provides a device for accessing screenshots, including:

数据结构获取单元,用于在截图被打开时,获得所述截图对应的数据结构;A data structure acquisition unit, configured to obtain a data structure corresponding to the screenshot when the screenshot is opened;

坐标获取单元,用于在所述截图被用户点击时,获取被点击位置在所述截图中的坐标;a coordinate acquiring unit, configured to acquire the coordinates of the clicked position in the screenshot when the screenshot is clicked by the user;

数据获取单元,用于在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员;A data acquisition unit, configured to acquire the type member and data member corresponding to the area member to which the clicked position belongs when it is determined according to the acquired coordinates that the clicked position belongs to the area member of the data structure;

点击响应单元,用于依据获取的类型成员和数据成员,响应所述点击操作。The click response unit is configured to respond to the click operation according to the obtained type member and data member.

本发明实施例提供的截图方法及装置,简化了截图的访问过程,提高了截图的访问效率。该截图方法中,在预设的截图事件被触发时,获取当前截图,并将当前截图中的每个目标区域的类型、坐标以及数据内容存储于所述当前截图对应的当前数据结构中,从而在用户访问截图时根据截图对应的数据结构简单快捷地获取截图中的每个目标区域的类型、坐标以及数据内容,简化了截图的访问过程,提高了截图的访问效率。The screenshot method and device provided by the embodiments of the present invention simplify the screenshot access process and improve the screenshot access efficiency. In the screenshot method, when a preset screenshot event is triggered, the current screenshot is obtained, and the type, coordinates and data content of each target area in the current screenshot are stored in the current data structure corresponding to the current screenshot, so that When the user accesses the screenshot, the type, coordinates, and data content of each target area in the screenshot are simply and quickly obtained according to the data structure corresponding to the screenshot, which simplifies the access process of the screenshot and improves the access efficiency of the screenshot.

附图说明Description of drawings

此处所说明的附图用来提供对本发明实施例的进一步理解,构成本发明实施例的一部分,并不构成对本发明实施例的限定。在附图中:The drawings described here are used to provide further understanding of the embodiments of the present invention, constitute a part of the embodiments of the present invention, and do not limit the embodiments of the present invention. In the attached picture:

图1是本发明第一实施例中提供的一种截图方法的实现流程图;Fig. 1 is an implementation flow chart of a screenshot method provided in the first embodiment of the present invention;

图2是本发明第二实施例中提供的一种访问截图的方法的实现流程图;Fig. 2 is an implementation flowchart of a method for accessing screenshots provided in the second embodiment of the present invention;

图3是本发明第三实施例中提供的一种截图装置的结构示意图;Fig. 3 is a schematic structural diagram of a screenshot device provided in the third embodiment of the present invention;

图4是本发明第四实施例中提供的一种访问截图的装置的结构示意图。Fig. 4 is a schematic structural diagram of a device for accessing screenshots provided in a fourth embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图及具体实施例对本发明实施例进行更加详细与完整的说明。可以理解的是,此处所描述的具体实施例仅用于解释本发明实施例,而非对本发明实施例的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明实施例相关的部分而非全部内容。The embodiments of the present invention will be described in more detail and complete below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the embodiments of the present invention, rather than to limit the embodiments of the present invention. In addition, it should be noted that, for the convenience of description, only the part related to the embodiment of the present invention is shown in the drawings but not the whole content.

第一实施例:First embodiment:

图1是本发明第一实施例中提供的一种截图方法的实现流程图,该方法可以由截图装置执行,其中该装置可以由软件和/或硬件实现,可作为智能终端的一部分被内置在智能终端内部。如图1所示,该实现流程包括:Fig. 1 is an implementation flowchart of a screenshot method provided in the first embodiment of the present invention, the method can be executed by a screenshot device, wherein the device can be implemented by software and/or hardware, and can be built in as a part of the smart terminal Inside the smart terminal. As shown in Figure 1, the implementation process includes:

步骤11、在预设的截图事件被触发时,获取当前截图。Step 11. Acquire the current screenshot when the preset screenshot event is triggered.

在用户启动智能手机、平板电脑等智能终端的截图应用程序时,预设的截图事件被触发,此时获取当前截图。When a user starts a screenshot application program of a smart terminal such as a smart phone or a tablet computer, a preset screenshot event is triggered, and the current screenshot is acquired at this time.

步骤12、扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型。Step 12: Scan each target area in the current screenshot, and determine the type of each target area, where the type of the target area includes text type and/or network address type.

其中,目标区域的类型包括文字类型和/或网络地址类型,即目标区域的类型可以是文字类型或网络地址类型,也可以同时包括文件类型和网络地址类型。示例性的,截图应用程序扫描当前截图,可以解析获得当前截图上的每个文字区域并将获得的每个文字区域作为当前截图中的目标区域,也可以解析获得当前截图上的每个网络地址区域并将获得的每个网络地址区域作为当前截图中的目标区域,还可以解析获得当前截图上的每个文字区域和每个网络地址区域并将获得的每个文字区域和每个网络地址区域作为当前截图中的目标区域。例如在截取网页时,可以解析网页对应的标签信息,将网页的href(Hypertext,Reference,超文本引用)标签视为网络地址类型,将网页的标题视为文字类型。Wherein, the type of the target area includes a text type and/or a network address type, that is, the type of the target area can be a text type or a network address type, and can also include a file type and a network address type at the same time. Exemplarily, the screenshot application scans the current screenshot, can parse and obtain each text area on the current screenshot and use each obtained text area as a target area in the current screenshot, and can also parse and obtain each network address on the current screenshot area and each obtained network address area as the target area in the current screenshot, and can also parse and obtain each text area and each network address area on the current screenshot and obtain each text area and each network address area as the target area in the current screenshot. For example, when intercepting a web page, the tag information corresponding to the web page can be parsed, and the href (Hypertext, Reference, hypertext reference) tag of the web page is regarded as a network address type, and the title of the web page is regarded as a text type.

并且,在获得目标区域的同时还获得每个目标区域的类型。Moreover, the type of each target area is also obtained while the target area is obtained.

步骤13、解析获得所述每个目标区域在所述当前截图中的坐标,以及所述每个目标区域中的数据内容。Step 13, analyzing and obtaining the coordinates of each target area in the current screenshot, and the data content in each target area.

可选的,所述解析获得所述每个目标区域在所述当前截图中的坐标,包括:获得所述每个目标区域构成的矩形的四个顶点在所述当前截图中的坐标,并将获得的所述四个顶点的坐标作为所述每个目标区域的坐标。通过目标区域构成的矩形的四个顶点在当前截图中的坐标,能够准确确定目标区域的位置和面积。Optionally, the parsing to obtain the coordinates of each target area in the current screenshot includes: obtaining the coordinates of the four vertices of the rectangle formed by each target area in the current screenshot, and The obtained coordinates of the four vertices are used as the coordinates of each target area. The position and area of the target area can be accurately determined through the coordinates of the four vertices of the rectangle formed by the target area in the current screenshot.

需要说明的是,对于每个目标区域也可以获得该目标区域中至少一点在当前截图中的坐标,并将所述至少一点在当前截图中的坐标作为该目标区域在当前截图中的坐标。It should be noted that, for each target area, the coordinates of at least one point in the current screenshot may also be obtained, and the coordinates of the at least one point in the current screenshot are used as the coordinates of the target area in the current screenshot.

示例性的,对于每个目标区域,若该目标区域的类型为文字,则该目标区域中的数据内容即该目标区域内的所有文字;若该目标区域的类型为网络地址,则该目标区域中的数据内容及该目标区域内的网络地址。Exemplarily, for each target area, if the type of the target area is text, then the data content in the target area is all the text in the target area; if the type of the target area is a network address, then the data content in the target area The data content in and the network address in the target area.

步骤14、将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。Step 14, storing the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot.

智能终端中预定义了一个数据结构,用来存储当前截图的上下文信息。该数据结构包括区域成员(Bound)、类型成员(Type)和数据成员(Data),其中区域成员用于描述每个目标区域的位置,类型成员用于描述每个目标区域的类型,数据成员用来描述每个目标区域存储的数据,如文字或网络地址等。A data structure is predefined in the smart terminal to store the context information of the current screenshot. The data structure includes area members (Bound), type members (Type) and data members (Data), where the area members are used to describe the location of each target area, the type members are used to describe the type of each target area, and the data members are used to describe the location of each target area. To describe the data stored in each target area, such as text or network address, etc.

可选的,所述将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中,包括:将所述每个目标区域的坐标存储于所述当前数据结构的区域成员中,将所述每个目标区域的类型存储于所述当前数据结构的类型成员中,并将所述每个目标区域的数据内容存储于所述当前数据结构的数据成员中。由于当前截图对应的当前数据结构中各成员存储的均是字节信息,压缩后非常小,通常在1KB以下,即当前数据结构占用的本地存储空间很小,可以忽略不计。Optionally, storing the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot includes: storing the coordinates of each target area in the current data structure In the area member of the structure, the type of each target area is stored in the type member of the current data structure, and the data content of each target area is stored in the data member of the current data structure. Since each member of the current data structure corresponding to the current screenshot stores byte information, it is very small after compression, usually below 1KB, that is, the local storage space occupied by the current data structure is very small and can be ignored.

本发明实施例提供的截图方法,在预设的截图事件被触发时,获取当前截图,并将当前截图中的每个目标区域的类型、坐标以及数据内容存储于所述当前截图对应的当前数据结构中,从而在用户访问截图时根据截图对应的数据结构简单快捷地获取截图中的每个目标区域的类型、坐标以及数据内容,简化了截图的访问过程,提高了截图的访问效率。The screenshot method provided by the embodiment of the present invention acquires the current screenshot when a preset screenshot event is triggered, and stores the type, coordinates and data content of each target area in the current screenshot in the current data corresponding to the current screenshot. structure, so that when the user accesses the screenshot, the type, coordinates, and data content of each target area in the screenshot can be obtained simply and quickly according to the data structure corresponding to the screenshot, which simplifies the access process of the screenshot and improves the access efficiency of the screenshot.

第二实施例second embodiment

图2是本发明第二实施例中提供的一种访问截图的方法的实现流程图,该方法可以由访问截图的装置执行,其中该装置可以由软件和/或硬件实现,可作为智能终端的一部分被内置在智能终端内部。如图2所示,该实现流程包括:Fig. 2 is an implementation flowchart of a method for accessing screenshots provided in the second embodiment of the present invention, the method can be executed by a device for accessing screenshots, wherein the device can be implemented by software and/or hardware, and can be used as a smart terminal Part of it is built into the smart terminal. As shown in Figure 2, the implementation process includes:

步骤21、在截图被打开时,获得所述截图对应的数据结构。Step 21. Obtain the data structure corresponding to the screenshot when the screenshot is opened.

在用户打开截图时,图片工具读取截图的同时,还读取截图对应的数据结构。其中数据结构中的区域成员存储有截图的每个目标区域的坐标,对于每个目标区域,该目标区域的区域成员对应的类型成员存储有该目标区域的类型,该目标区域的区域成员对应的数据成员存储有该目标区域的数据内容。When the user opens the screenshot, the picture tool also reads the data structure corresponding to the screenshot while reading the screenshot. The area member in the data structure stores the coordinates of each target area of the screenshot, and for each target area, the type member corresponding to the area member of the target area stores the type of the target area, and the area member of the target area corresponds to The data member stores the data content of the target area.

步骤22、在所述截图被用户点击时,获取被点击位置在所述截图中的坐标。Step 22. When the screenshot is clicked by the user, acquire the coordinates of the clicked position in the screenshot.

在用户点击截图上的某个位置时,获取被点击位置在所述截图中的坐标。When the user clicks a certain position on the screenshot, the coordinates of the clicked position in the screenshot are acquired.

步骤23、在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员。Step 23: When it is determined according to the acquired coordinates that the clicked position belongs to an area member of the data structure, acquire the type member and data member corresponding to the area member to which the clicked position belongs.

示例性的,根据获取的坐标确定所述被点击位置是否属于数据结构的区域成员,即确定获取的坐标是否属于某个区域成员对应的坐标范围内。在被点击位置属于某个区域成员时,获取被点击位置所属的区域成员,以及该区域成员对应的类型成员和数据成员,即,在被点击位置在截图的某个目标区域内时,获取该目标区域的类型以及该目标区域中的数据内容。Exemplarily, it is determined whether the clicked position belongs to an area member of the data structure according to the acquired coordinates, that is, it is determined whether the acquired coordinates belong to a coordinate range corresponding to a certain area member. When the clicked position belongs to a certain area member, obtain the area member to which the clicked position belongs, and the type member and data member corresponding to the area member, that is, when the clicked position is within a certain target area of the screenshot, obtain the The type of target area and the data content in that target area.

需要说明的是,在根据获取的坐标确定所述被点击位置不属于所述数据结构的区域成员时,则按照点击图片来响应步骤21中的点击操作。It should be noted that, when it is determined according to the obtained coordinates that the clicked position does not belong to the area member of the data structure, the click operation in step 21 is responded to according to the click picture.

步骤24、依据获取的类型成员和数据成员,响应所述点击操作。Step 24: Respond to the click operation according to the acquired type member and data member.

可选的,所述依据获取的类型成员和数据成员,响应所述点击操作,包括:在获取的类型成员为网络地址类型时,通过预设的浏览器访问所述数据成员对应的网络地址;在获取的类型成员为文字类型时,依据用户操作复制所述数据成员对应的文字。Optionally, responding to the click operation according to the obtained type member and data member includes: when the obtained type member is a network address type, accessing the network address corresponding to the data member through a preset browser; When the obtained type member is a text type, the text corresponding to the data member is copied according to the user operation.

具体的,在被点击位置属于网络地址区域时,可使用浏览器打开网络地址;在被点击位置属于文字区域时,可对被点击位置所在目标区域内的文字进行复制等行为。Specifically, when the clicked position belongs to the network address area, the browser can be used to open the network address; when the clicked position belongs to the text area, actions such as copying the text in the target area where the clicked position is located can be performed.

本发明实施例提供的访问截图的方法,在用户访问截图时根据截图对应的数据结构简单快捷地获取截图中的每个目标区域的类型、坐标以及数据内容,简化了截图的访问过程,提高了截图的访问效率。The method for accessing the screenshot provided by the embodiment of the present invention can simply and quickly obtain the type, coordinates and data content of each target area in the screenshot according to the data structure corresponding to the screenshot when the user accesses the screenshot, which simplifies the access process of the screenshot and improves the Access efficiency of screenshots.

第三实施例third embodiment

图3是本发明第三实施例中提供的一种截图装置的结构示意图,该装置可以内置在智能终端内部。如图3所示,所述截图装置可以包括截图获取单元31、区域确定单元32、坐标获得单元33、数据获得单元34和截图存储单元35。Fig. 3 is a schematic structural diagram of a screenshot device provided in a third embodiment of the present invention, and the device can be built into a smart terminal. As shown in FIG. 3 , the screenshot device may include a screenshot acquisition unit 31 , an area determination unit 32 , a coordinate acquisition unit 33 , a data acquisition unit 34 and a screenshot storage unit 35 .

其中,截图获取单元31用于在预设的截图事件被触发时,获取当前截图;Wherein, the screenshot acquiring unit 31 is configured to acquire the current screenshot when a preset screenshot event is triggered;

区域确定单元33用于扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型;The area determination unit 33 is configured to scan each target area in the current screenshot, and determine the type of each target area, the type of the target area includes text type and/or network address type;

坐标获得单元33用于解析获得所述每个目标区域在所述当前截图中的坐标;The coordinate obtaining unit 33 is used to analyze and obtain the coordinates of each target area in the current screenshot;

数据获得单元34用于获得所述每个目标区域中的数据内容;The data obtaining unit 34 is used to obtain the data content in each target area;

截图存储单元35用于将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。The screenshot storage unit 35 is configured to store the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot.

可选的,所述坐标获得单元33具体用于:Optionally, the coordinate obtaining unit 33 is specifically used for:

获得所述每个目标区域构成的矩形的四个顶点在所述当前截图中的坐标,并将获得的所述四个顶点的坐标作为所述每个目标区域的坐标。Obtain the coordinates of the four vertices of the rectangle formed by each target area in the current screenshot, and use the obtained coordinates of the four vertices as the coordinates of each target area.

可选的,所述截图存储单元35具体用于:Optionally, the screenshot storage unit 35 is specifically used for:

所述每个目标区域的坐标存储于所述当前数据结构的区域成员中,将所述每个目标区域的类型存储于所述当前数据结构的类型成员中,并将所述每个目标区域的数据内容存储于所述当前数据结构的数据成员中。The coordinates of each target area are stored in the area member of the current data structure, the type of each target area is stored in the type member of the current data structure, and the The data content is stored in the data member of the current data structure.

本发明实施例提供的截图装置,截图获取单元获取当前截图,区域确定单元确定当前截图中的每个目标区域及每个目标区域的类型,坐标获得单元确定每个目标区域在当前截图中的坐标,数据获得单元获得每个目标区域的文字和/或网络地址和截图存储单元将当前截图的坐标、类型、内容存储到当前数据结构中,简化了截图的访问过程,提高了截图的访问效率。In the screenshot device provided by the embodiment of the present invention, the screenshot acquiring unit acquires the current screenshot, the area determining unit determines each target area in the current screenshot and the type of each target area, and the coordinate obtaining unit determines the coordinates of each target area in the current screenshot The data acquisition unit obtains the text and/or network address of each target area and the screenshot storage unit stores the coordinates, type and content of the current screenshot into the current data structure, which simplifies the access process of the screenshot and improves the access efficiency of the screenshot.

第四实施例Fourth embodiment

图4是本发明第四实施例中提供的一种访问截图的装置的结构示意图,该装置可以内置在智能终端内部。如图4所示,所述访问截图的装置可以包括数据结构获取单元41、坐标获取单元42、数据获取单元43和点击响应单元44。Fig. 4 is a schematic structural diagram of a device for accessing screenshots provided in a fourth embodiment of the present invention, and the device may be built in a smart terminal. As shown in FIG. 4 , the device for accessing screenshots may include a data structure acquisition unit 41 , a coordinate acquisition unit 42 , a data acquisition unit 43 and a click response unit 44 .

其中,数据结构获取单元41用于在截图被打开时,获得所述截图对应的数据结构;Wherein, the data structure obtaining unit 41 is used to obtain the data structure corresponding to the screenshot when the screenshot is opened;

坐标获取单元42用于在所述截图被用户点击时,获取被点击位置在所述截图中的坐标;The coordinate obtaining unit 42 is used for obtaining the coordinates of the clicked position in the screenshot when the screenshot is clicked by the user;

数据获取单元43用于在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员;The data acquisition unit 43 is configured to acquire the type member and data member corresponding to the area member to which the clicked position belongs when it is determined according to the acquired coordinates that the clicked position belongs to the area member of the data structure;

点击响应单元44用于依据获取的类型成员和数据成员,响应所述点击操作。The click response unit 44 is configured to respond to the click operation according to the acquired type member and data member.

可选的,所述点击响应单元44包括:Optionally, the click response unit 44 includes:

网址访问子单元,用于在获取的类型成员为网络地址类型时,通过预设的浏览器访问所述数据成员对应的网络地址;The URL access subunit is used to access the network address corresponding to the data member through a preset browser when the obtained type member is a network address type;

文字复制子单元,用于在获取的类型成员为文字类型时,依据用户操作复制所述数据成员对应的文字。The text copy subunit is used to copy the text corresponding to the data member according to the user operation when the obtained type member is a text type.

本发明实施例提供的访问截图的装置,在用户访问截图时,不需要用户手动地还原截图的内容,在截图上直接控件位置区域,可以直接操作截图时上下文的数据,如点击截图上某个网络地址区域,可直接链接到相关网页地址,因此该装置简化了截图的访问过程,提高了截图的访问效率。The device for accessing the screenshot provided by the embodiment of the present invention does not require the user to manually restore the content of the screenshot when the user accesses the screenshot, and directly controls the position area on the screenshot, and can directly operate the context data when the screenshot is taken, such as clicking on a certain screenshot on the screenshot The network address area can be directly linked to the address of the relevant webpage, so the device simplifies the access process of screenshots and improves the access efficiency of screenshots.

上所述仅为本发明实施例的优选实施例,并不用于限制本发明实施例,对于本领域技术人员而言,本发明实施例可以有各种改动和变化。凡在本发明实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。The above descriptions are only preferred embodiments of the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, various modifications and changes may be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.

Claims (9)

Translated fromChinese
1.一种截图方法,其特征在于,包括:1. A screenshot method, characterized in that, comprising:在预设的截图事件被触发时,获取当前截图;Get the current screenshot when the preset screenshot event is triggered;扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型,其中,目标区域的类型由目标区域包含的数据内容决定;Scanning each target area in the current screenshot, and determining the type of each target area, the type of the target area includes text type and/or network address type, wherein, the type of the target area is contained in the target area data content determination;解析获得所述每个目标区域在所述当前截图中的坐标,以及所述每个目标区域中的数据内容;其中所述数据内容至少包括以下之一:若所述目标区域的类型为文字,则所述目标区域中的数据内容即所述目标区域内的所有文字;若所述目标区域的类型为网络地址,则所述目标区域中的数据内容即所述目标区域内的网络地址;Analyzing and obtaining the coordinates of each target area in the current screenshot, and the data content in each target area; wherein the data content includes at least one of the following: if the type of the target area is text, Then the data content in the target area is all the characters in the target area; if the type of the target area is a network address, then the data content in the target area is the network address in the target area;将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。The coordinates, type and data content of each target area are stored in the current data structure corresponding to the current screenshot.2.根据权利要求1所述的方法,其特征在于,所述解析获得所述每个目标区域在所述当前截图中的坐标,包括:2. The method according to claim 1, wherein the parsing to obtain the coordinates of each target area in the current screenshot comprises:获得所述每个目标区域构成的矩形的四个顶点在所述当前截图中的坐标,并将获得的所述四个顶点的坐标作为所述每个目标区域的坐标。Obtain the coordinates of the four vertices of the rectangle formed by each target area in the current screenshot, and use the obtained coordinates of the four vertices as the coordinates of each target area.3.根据权利要求1所述的方法,其特征在于,所述将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中,包括:3. The method according to claim 1, wherein the storing the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot comprises:将所述每个目标区域的坐标存储于所述当前数据结构的区域成员中,将所述每个目标区域的类型存储于所述当前数据结构的类型成员中,并将所述每个目标区域的数据内容存储于所述当前数据结构的数据成员中。storing the coordinates of each target area in the area member of the current data structure, storing the type of each target area in the type member of the current data structure, and storing each target area The data content of is stored in the data member of the current data structure.4.一种访问截图的方法,其特征在于,包括:4. A method for accessing screenshots, comprising:在截图被打开时,获得所述截图对应的数据结构;其中,所述数据结构中的区域成员存储有所述截图的每个目标区域的坐标,所述目标区域的区域成员对应的类型成员存储有每个目标区域的类型,所述目标区域的区域成员对应的数据成员存储有每个目标区域的数据内容;When the screenshot is opened, the data structure corresponding to the screenshot is obtained; wherein, the area member in the data structure stores the coordinates of each target area of the screenshot, and the type member corresponding to the area member of the target area stores There is a type of each target area, and the data members corresponding to the area members of the target area store the data content of each target area;在所述截图被用户点击时,获取被点击位置在所述截图中的坐标;When the screenshot is clicked by the user, obtain the coordinates of the clicked position in the screenshot;在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员;When it is determined according to the obtained coordinates that the clicked position belongs to an area member of the data structure, acquiring a type member and a data member corresponding to the area member to which the clicked position belongs;依据获取的类型成员和数据成员,响应所述点击操作;其中所述响应所述点击操作包括:在获取的类型成员为网络地址类型时,通过预设的浏览器访问所述数据成员对应的网络地址;在获取的类型成员为文字类型时,依据用户操作复制所述数据成员对应的文字。Responding to the click operation according to the obtained type member and data member; wherein the responding to the click operation includes: when the obtained type member is a network address type, accessing the network corresponding to the data member through a preset browser address; when the obtained type member is a text type, copy the text corresponding to the data member according to the user operation.5.一种截图装置,其特征在于,包括:5. A screenshot device, characterized in that, comprising:截图获取单元,用于在预设的截图事件被触发时,获取当前截图;A screenshot acquiring unit, configured to acquire the current screenshot when a preset screenshot event is triggered;区域确定单元,用于扫描所述当前截图中的每个目标区域,并确定所述每个目标区域的类型,所述目标区域的类型包括文字类型和/或网络地址类型,其中,目标区域的类型由目标区域包含的数据内容决定;an area determining unit, configured to scan each target area in the current screenshot, and determine the type of each target area, where the type of the target area includes text type and/or network address type, wherein the target area The type is determined by the data content contained in the target area;坐标获得单元,用于解析获得所述每个目标区域在所述当前截图中的坐标;a coordinate obtaining unit, configured to analyze and obtain the coordinates of each target area in the current screenshot;数据获得单元,用于获得所述每个目标区域中的数据内容;其中所述数据内容至少包括以下之一:若所述目标区域的类型为文字,则所述目标区域中的数据内容即所述目标区域内的所有文字;若所述目标区域的类型为网络地址,则所述目标区域中的数据内容即所述目标区域内的网络地址;A data obtaining unit, configured to obtain the data content in each target area; wherein the data content includes at least one of the following: if the type of the target area is text, then the data content in the target area is the All characters in the target area; if the type of the target area is a network address, then the data content in the target area is the network address in the target area;截图存储单元,用于将所述每个目标区域的坐标、类型和数据内容存储于所述当前截图对应的当前数据结构中。The screenshot storage unit is configured to store the coordinates, type and data content of each target area in the current data structure corresponding to the current screenshot.6.根据权利要求5所述的装置,其特征在于,所述坐标获得单元具体用于:6. The device according to claim 5, wherein the coordinate obtaining unit is specifically used for:获得所述每个目标区域构成的矩形的四个顶点在所述当前截图中的坐标,并将获得的所述四个顶点的坐标作为所述每个目标区域的坐标。Obtain the coordinates of the four vertices of the rectangle formed by each target area in the current screenshot, and use the obtained coordinates of the four vertices as the coordinates of each target area.7.根据权利要求5所述的装置,其特征在于,所述截图存储单元具体用于:7. The device according to claim 5, wherein the screenshot storage unit is specifically used for:所述每个目标区域的坐标存储于所述当前数据结构的区域成员中,将所述每个目标区域的类型存储于所述当前数据结构的类型成员中,并将所述每个目标区域的数据内容存储于所述当前数据结构的数据成员中。The coordinates of each target area are stored in the area member of the current data structure, the type of each target area is stored in the type member of the current data structure, and the The data content is stored in the data member of the current data structure.8.一种访问截图的装置,其特征在于,包括:8. A device for accessing screenshots, comprising:数据结构获取单元,用于在截图被打开时,获得所述截图对应的数据结构;其中,所述数据结构中的区域成员存储有所述截图的每个目标区域的坐标,所述目标区域的区域成员对应的类型成员存储有每个目标区域的类型,所述目标区域的区域成员对应的数据成员存储有每个目标区域的数据内容;A data structure acquiring unit, configured to obtain a data structure corresponding to the screenshot when the screenshot is opened; wherein, the area member in the data structure stores the coordinates of each target area of the screenshot, and the target area of the target area The type member corresponding to the area member stores the type of each target area, and the data member corresponding to the area member of the target area stores the data content of each target area;坐标获取单元,用于在所述截图被用户点击时,获取被点击位置在所述截图中的坐标;a coordinate acquiring unit, configured to acquire the coordinates of the clicked position in the screenshot when the screenshot is clicked by the user;数据获取单元,用于在根据获取的坐标确定所述被点击位置属于所述数据结构的区域成员时,获取所述被点击位置所属的区域成员对应的类型成员和数据成员;A data acquisition unit, configured to acquire the type member and data member corresponding to the area member to which the clicked position belongs when it is determined according to the acquired coordinates that the clicked position belongs to the area member of the data structure;点击响应单元,用于依据获取的类型成员和数据成员,响应所述点击操作;其中所述响应所述点击操作包括:在获取的类型成员为网络地址类型时,通过预设的浏览器访问所述数据成员对应的网络地址;在获取的类型成员为文字类型时,依据用户操作复制所述数据成员对应的文字。The click response unit is configured to respond to the click operation according to the obtained type member and data member; wherein the responding to the click operation includes: when the obtained type member is a network address type, accessing the all through a preset browser The network address corresponding to the data member; when the obtained type member is a text type, copy the text corresponding to the data member according to the user operation.9.根据权利要求8所述的装置,其特征在于,所述点击响应单元包括:9. The device according to claim 8, wherein the click response unit comprises:网址访问子单元,用于在获取的类型成员为网络地址类型时,通过预设的浏览器访问所述数据成员对应的网络地址;The URL access subunit is used to access the network address corresponding to the data member through a preset browser when the obtained type member is a network address type;文字复制子单元,用于在获取的类型成员为文字类型时,依据用户操作复制所述数据成员对应的文字。The text copy subunit is used to copy the text corresponding to the data member according to the user operation when the obtained type member is a text type.
CN201510250780.XA2015-05-152015-05-15A kind of screenshot method and deviceExpired - Fee RelatedCN104899024B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510250780.XACN104899024B (en)2015-05-152015-05-15A kind of screenshot method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510250780.XACN104899024B (en)2015-05-152015-05-15A kind of screenshot method and device

Publications (2)

Publication NumberPublication Date
CN104899024A CN104899024A (en)2015-09-09
CN104899024Btrue CN104899024B (en)2018-11-20

Family

ID=54031702

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510250780.XAExpired - Fee RelatedCN104899024B (en)2015-05-152015-05-15A kind of screenshot method and device

Country Status (1)

CountryLink
CN (1)CN104899024B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105302442A (en)*2015-10-302016-02-03深圳市艾酷通信软件有限公司Image information processing method and terminal
CN105718166A (en)*2016-01-212016-06-29努比亚技术有限公司Display interface skip device and method
CN110008110B (en)*2019-01-282022-07-22创新先进技术有限公司User interface testing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1941961A (en)*2006-10-132007-04-04康佳集团股份有限公司Method for processing picture in embedded terminal
CN102682102A (en)*2012-04-302012-09-19上海量明科技发展有限公司Desktop saving method, client and system
CN104090762A (en)*2014-07-102014-10-08福州瑞芯微电子有限公司Screenshot processing device and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7124414B2 (en)*2002-10-312006-10-17International Business Machines CorporationMethod, system and program product for routing requests in a distributed system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1941961A (en)*2006-10-132007-04-04康佳集团股份有限公司Method for processing picture in embedded terminal
CN102682102A (en)*2012-04-302012-09-19上海量明科技发展有限公司Desktop saving method, client and system
CN104090762A (en)*2014-07-102014-10-08福州瑞芯微电子有限公司Screenshot processing device and method

Also Published As

Publication numberPublication date
CN104899024A (en)2015-09-09

Similar Documents

PublicationPublication DateTitle
US12182221B2 (en)Method and terminal device for extracting web page content
CN108182060B (en)Hybrid application point burying method, mobile terminal and system
WO2020253389A1 (en)Page translation method and apparatus, medium, and electronic device
CN102737067B (en)Method and system for outputting webpage
CN105138542B (en) A method for converting a PC-side WEB page into a mobile-side WEB page
US20110078593A1 (en)Web browser transmission server and method of controlling operation of same
CN110489312A (en)Data correlation method and device for control trigger data acquisition
US11080322B2 (en)Search methods, servers, and systems
WO2016107465A1 (en)Method, device, and system for implementing card-type desktop
CN104424205A (en)Context menu implementing method and device of page-embedded client
WO2015154666A1 (en)Method for displaying webpage fragment on desktop and system for capturing webpage fragment to desktop for display
CN111475751B (en) Page image processing method, device, server and storage medium
JP2014219974A (en)Method and device for acquiring partial contents of web page
CN106776082A (en)The method of attaching and device of text
CN107590228A (en)A kind of page content processing method and mobile terminal
CN112035205A (en)Data processing method, device, equipment and storage medium
CN104899024B (en)A kind of screenshot method and device
JP2019133283A (en)Information processing apparatus, program, communication system and image processing method
CN115934653B (en)Method and device for adding external OFD page content in OFD file
US20160224553A1 (en)Search methods and terminals
CN107391148B (en) View element storage method, device, electronic device and computer storage medium
CN117093386B (en)Page screenshot method, device, computer equipment and storage medium
RU2634221C2 (en)Method and device for drawing presentation of electronic document on screen
KR20180044009A (en)System and method for providing hyperlink-information
CN111428452A (en)Comment data storage method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP01Change in the name or title of a patent holder
CP01Change in the name or title of a patent holder

Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20181120


[8]ページ先頭

©2009-2025 Movatter.jp