WO2014180331A1 - Method, device and system for realizing webpage screenshot - Google Patents

Method, device and system for realizing webpage screenshot Download PDF

Info

Publication number
WO2014180331A1
WO2014180331A1 PCT/CN2014/077067 CN2014077067W WO2014180331A1 WO 2014180331 A1 WO2014180331 A1 WO 2014180331A1 CN 2014077067 W CN2014077067 W CN 2014077067W WO 2014180331 A1 WO2014180331 A1 WO 2014180331A1
Authority
WO
WIPO (PCT)
Prior art keywords
web page
screenshot
webpage
user
information
Prior art date
Application number
PCT/CN2014/077067
Other languages
French (fr)
Chinese (zh)
Inventor
宋军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2014180331A1 publication Critical patent/WO2014180331A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a method, device, and system for implementing a screenshot of a webpage. Background technique
  • the current terminal side is usually implemented by the following methods when performing webpage screenshots: 1. By installing ActiveX or Applet control in the operating system, the user experience is poor; 2. The terminal triggers the background screenshot system to open the browsing on the server side. The screenshot is implemented, but the background screenshot system cannot obtain the user session. The page after the user logs in cannot be processed normally. Only the screenshot of the page before the user logs in can be obtained. 3. By calling the special client screen capture software on the terminal. To implement the screenshot, the client screen capture software generally implements the screenshot through the system call and can only store the screenshot locally, without the function of interacting with the server. Summary of the invention
  • an embodiment of the present invention provides a method, device, and system for implementing a screenshot of a webpage.
  • the technical solution adopted by the present invention is applied to a terminal, and the method includes:
  • the webpage When the webpage is opened and the screen capture plugin is launched, the webpage is truncated by the screen capture plugin.
  • the manner of opening the webpage comprises: opening the webpage by a browser or directly opening the webpage.
  • the embedding the screen capture plugin in the browser comprises: displaying a startup icon of the screen capture plugin in a toolbar of the browser for use;
  • the embedding the screen capture plugin in the webpage includes: displaying a startup icon of the screen capture plugin at any position of the webpage for use;
  • the form of writing the screenshot plugin includes a webpage script.
  • the method further includes:
  • the method further includes:
  • the uploading the information of the user, the address of the webpage, and the screenshot of the webpage to the server side including:
  • the verification result is all valid, the information of the user, the address of the webpage, and the coded webpage screenshot are uploaded to the server side.
  • the method further includes:
  • the information of the user, the address of the webpage, and the decoded screenshot of the webpage are stored in association with each other.
  • the embodiment of the invention further provides a terminal, where the terminal includes:
  • a detection module configured to detect an operation
  • Screen capture module configured to embed a screen capture plugin in a browser or in a webpage, when the detection module checks When the webpage is opened and the screen capture plugin is launched, the webpage is screenshotd by using the screen capture plugin.
  • the manner in which the terminal provides the user with opening the webpage includes: opening the webpage by using a browser or directly opening the webpage.
  • the terminal further includes: a plug-in icon display module configured to: when the screen capture plug-in is embedded in the browser, display a startup icon of the screen capture plug-in in the toolbar of the browser for the user to use; when the screen capture plug-in is embedded in the webpage Displaying a startup icon of the screen capture plugin at any position of the webpage for the user to use;
  • a plug-in icon display module configured to: when the screen capture plug-in is embedded in the browser, display a startup icon of the screen capture plug-in in the toolbar of the browser for the user to use; when the screen capture plug-in is embedded in the webpage Displaying a startup icon of the screen capture plugin at any position of the webpage for the user to use;
  • the form of writing the screenshot plugin includes a webpage script.
  • the terminal further includes:
  • the terminal further includes:
  • a local storage module configured to locally save the address of the webpage and a screenshot of the webpage for the user;
  • the uploading module is configured to upload the information of the user, the address of the webpage, and the screenshot of the webpage to the server side.
  • the uploading module includes:
  • An encoding module configured to encode a screenshot of the webpage
  • a validity verification module configured to verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage, respectively;
  • the sending module is configured to upload the information of the user, the address of the webpage, and the screenshot of the encoded webpage to the server side when the verification result is all valid.
  • the embodiment of the invention further provides a server, the server comprising:
  • a receiving module configured to receive information about a user uploaded by the terminal side, an address of the webpage, and a screenshot of the webpage;
  • a decoding module configured to decode a received screenshot of the webpage
  • a saving module configured to take the user's information, the address of the webpage, and the decoded webpage screenshot Save the corresponding.
  • the embodiment of the present invention further provides a system for implementing a screenshot of a webpage, where the system includes: a terminal and a server;
  • the terminal is the terminal according to the above claims;
  • the server is a server as claimed in the preceding claims.
  • the present invention has at least the following advantages:
  • the method, device and system for realizing a screenshot of a webpage according to the present invention are compared with the existing webpage screenshot control.
  • the screenshot operation of the present invention is implemented by a webpage script, and does not require the user to install any control, for example:
  • the difference between the present invention and the existing background screenshot system is that: the invention does not need to open a browser on the server side to implement the screenshot, and the page that needs the user login session can be correctly processed, and the background screenshot system cannot obtain the user session, The page after the user logs in cannot be processed normally, and only the screenshot of the page before the user logs in can be obtained.
  • the invention provides a screenshot plug-in, and does not need the client software to bring a screen capture program; after the screenshot of the invention is completed, the screenshot can be encoded and uploaded, etc., without limitation and The screenshots are stored locally; in addition, the present invention implements a screenshot of the webpage through the screenshot plug-in, without using the system call to implement the screenshot as the screenshot program that comes with the client software.
  • FIG. 1 is a flowchart of a method for implementing a screenshot of a webpage according to a first embodiment of the present invention
  • FIG. 2 is a schematic diagram of a terminal composition for implementing a screenshot of a webpage according to a third embodiment of the present invention
  • FIG. 3 is a schematic diagram of a server composition for implementing a screenshot of a webpage according to a fourth embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for implementing a screenshot of a webpage according to an application example of the present invention
  • FIG. 5 is a specific flowchart of step S110 in FIG. 4;
  • step S120 in FIG. 4 is a specific flowchart of step S120 in FIG. 4;
  • FIG. 7 is a specific flowchart of step S130 in FIG. 4;
  • FIG. 8 is a schematic structural diagram of a system for implementing a screenshot of a webpage according to an application example of the present invention.
  • FIG. 9 is a schematic diagram of a specific composition of the terminal application unit 210 in FIG. 8;
  • FIG. 10 is a schematic diagram showing the specific composition of the server side control unit 220 in FIG. BEST MODE FOR CARRYING OUT THE INVENTION
  • the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
  • a method for implementing a screenshot of a webpage includes a process performed on the terminal side and on the server side, wherein, as shown in FIG. 1, the process performed on the terminal side is as follows:
  • Step S101 embedding a screen capture plugin in the browser.
  • the startup icon of the screen capture plug-in is displayed in the toolbar of the browser for the user to use.
  • Step S102 When the user opens any webpage through the browser and starts the screen capture plugin, the webpage is screenshotd by using the screen capture plugin.
  • the process performed on the terminal side may further include step S103 and step S104, but step S103 and step S104 and step S101 and step S102 are two embedding cases of the plug-in described in parallel, without distinguishing the order of time.
  • Step S103 embedding a screen capture plugin in a webpage.
  • the startup icon of the screen capture plug-in is displayed at any position of the webpage for the user to use.
  • the screen capture plugin can be written in the form of a webpage script, such as: a javascript web script, which can be directly embedded in the HTML (Hyper Text Mark-up Language) code of the webpage, or can be written according to different code of the webpage. Corresponding web scripts to enable embedding of different web pages.
  • Step S104 When the user opens the webpage and launches the screen capture plugin thereon, the webpage is screenshotd by using the screen capture plugin.
  • the embodiment further expands a scheme in which the terminal side interacts with the server side, and continues the above steps S101 S102 or steps S103-104, and the process performed on the terminal side is further include: Step S105: locally save a screenshot of the webpage for the user; and/or upload the information of the user together with the screenshot of the webpage to the server side.
  • the saving of the webpage address may be added. Specifically, the address of the webpage and the screenshot of the webpage are saved locally for the user; and/or the user's information, the webpage is The address is uploaded to the server side along with the screenshot of the web page.
  • the information of the user, the address of the webpage, and the screenshot of the webpage are uploaded to the server side, and specifically includes the following process:
  • A1 Encode the screenshot of the web page.
  • A2 Verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage, respectively. Since the browser stores the relevant session information of the user, and can determine whether the user has logged in, and verify the validity of the user information, the following settings can be made: The logged-in user information is a valid user, and the unregistered user information Invalid user; when verifying the validity of the webpage address, it can judge whether the webpage path entered by the user, such as a URL (Uniform Resource Locator), conforms to the standard format, etc.; when verifying the validity of the screenshot of the webpage You can determine the validity of the screenshot file by judging whether the size of the screenshot file meets the requirements, or whether the screenshot of the web page is successfully encoded. For the above three kinds of information, the present invention does not exclude other methods of validity verification.
  • A3 When the result of the verification is all valid, the information of the user, the address of the webpage, and the screenshot of the encoded webpage are uploaded to the server side.
  • the manner of obtaining the information of the user may be the prior art.
  • the method may include: when the user takes a screenshot of the webpage, prompting the user to input the account information, the information of the user is the account information of the user; or When the user operates using the mobile terminal, the identifier corresponding to the mobile terminal used by the user is used as the information of the user.
  • step S105 when the information of the user is uploaded to the content on the server side together with the screenshot of the webpage, it can be understood that the corresponding server performs subsequent operations, and the server side performs the following operations.
  • Step S106 The server side receives the information of the user uploaded by the terminal side and the screenshot of the webpage, decodes the received screenshot of the webpage, and performs the screenshot of the user and the decoded webpage screenshot. Corresponding to save.
  • the content of the step S106 is corresponding to the optimized step S105
  • the content of the user uploaded by the terminal, the address of the webpage, and the screenshot of the webpage are decoded, and the received screenshot of the webpage is decoded. And storing the information of the user, the address of the webpage, and the decoded screenshot of the webpage.
  • a terminal for implementing a screenshot of a webpage, the terminal embedding a screen capture plugin in a browser or in a webpage, the terminal includes:
  • a detection module configured to detect an operation
  • the screen capture module is configured to: when the detection module detects that the webpage is opened and the screen capture plugin is started, the screen capture is performed by using the screen capture plugin.
  • the startup icon of the screen capture plug-in is displayed in the toolbar of the browser for the user to use.
  • the terminal also inserts a screen capture plug-in in the webpage, and the screen capture module is configured to take a screenshot of the webpage when the user opens the webpage and launches the screen capture plug-in on the webpage.
  • the startup icon of the screen capture plug-in is displayed at any position of the webpage for the user to use.
  • the screen capture plugin can be written in a webpage script, for example: a javascript web script, which can be directly embedded in the HTML code of the webpage, or a corresponding webpage script can be written according to different code of the webpage to realize embedding of different webpages.
  • a terminal that implements a screenshot of a webpage, as shown in FIG. 2, is different from the second embodiment in that, in addition to the screen capture module 100, the screen capture plug-in 10 of the embodiment includes:
  • the local storage module 200 is configured to locally save a screenshot of the webpage for the user; and/or, the uploading module 300 is configured to upload the information of the user together with the screenshot of the webpage to the server side.
  • the saving of the webpage address may be added.
  • the screen capture plugin in the screen capture plugin:
  • the local storage module 200 is configured to locally save the address of the webpage and a screenshot of the webpage for the user; and/or,
  • the uploading module 300 is configured to upload the information of the user, the address of the webpage, and the screenshot of the webpage to the server side.
  • the uploading module 300 specifically includes:
  • the encoding module 301 is configured to encode a screenshot of the webpage.
  • the validity verification module 302 is configured to separately verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage. Since the browser stores the relevant session information of the user, and can determine whether the user has logged in, and verify the validity of the user information, the following settings can be made: The logged-in user information is a valid user, and the unregistered user information Invalid user; when verifying the validity of the webpage address, it can judge whether the webpage path entered by the user, such as the URL, conforms to the standard format, etc. When verifying the validity of the screenshot of the webpage, it can judge whether the size of the screenshot file is consistent Request, or determine whether the screenshot of the web page is successfully encoded to determine its validity. For the above three kinds of information, the present invention does not exclude other methods of validity verification.
  • the sending module 303 is configured to upload the information of the user, the address of the webpage, and the coded webpage screenshot to the server side when the verification result is all valid.
  • the terminal further includes:
  • the plug-in icon display module 20 is configured to display a startup icon of the screenshot plug-in in the toolbar of the browser for the user to use when the screen capture plug-in is embedded in the browser; when the screen capture plug-in is embedded in the webpage, any of the webpages are embedded in the webpage
  • the location displays the launch icon of the screenshot plugin for the user to use.
  • the embodiment provides a server for implementing a screenshot of a webpage.
  • the server includes:
  • the receiving module 500 is configured to receive information about a user uploaded by the terminal side, an address of the webpage, and the a screenshot of the web page;
  • the decoding module 600 is configured to decode the received screenshot of the webpage
  • the saving module 700 is configured to store the information of the user, the address of the webpage, and the screenshot of the decoded webpage.
  • screen capture plug-in in the embodiment of the present invention is not limited to being applied to a specific webpage or webpage application, and the screen capture plug-in provided by the user may be provided by the user, including but not limited to a browser plug-in or a page plug-in. Enable screenshots and upload processing for any web page or web application.
  • the present invention provides a screenshot mode of a browser plug-in toolbar.
  • the user can drag the webpage start icon provided by the present invention to the browser toolbar, and the user can open all webpages or webpage applications by using the browser, and can use the webpage screenshot startup icon provided by the present invention in the browser toolbar to implement the screenshot. And subsequent processing.
  • the webpage screenshot start icon provided by the present invention automatically appears on the webpage in which the page plug-in code is embedded, and the user can click the icon to implement the screenshot and subsequent processing of the webpage.
  • the method for implementing webpage screenshots and related devices of the present invention compared with the existing webpage screenshot control, the screenshot operation of the present invention is implemented by a webpage script, and does not require the user to install any controls, such as: ActiveX or Applet.
  • the difference between the present invention and the existing background screenshot system is that the present invention does not need to open a browser on the server side to implement the screenshot, and can correctly process the page that requires the user to log in to the session, and the background screenshot system cannot obtain the user session.
  • the page after the user logs in cannot be processed normally, and only the screenshot of the page before the user logs in can be obtained.
  • the invention provides a screenshot plug-in, and does not need the client software to bring a screen capture program; after the screenshot of the invention is completed, the screenshot can be encoded and uploaded, etc., without limitation and The screenshots are stored locally; in addition, the present invention implements a screenshot of the webpage through the screenshot plug-in, without using the system call to implement the screenshot as the screenshot program that comes with the client software.
  • a webpage screenshot method provided by the application example is applied to a network system. As shown in FIG. 4, the method includes the following steps: Step S110: Generate a webpage screenshot on the terminal side.
  • step S110 includes the following process:
  • step S111 Obtain user input information or an opened page.
  • the information is generally obtained by the terminal application from the URL information input by the user or the opened web page.
  • step S112 Generate a screenshot of the webpage and encode the image.
  • the generated webpage screenshot supports the image formats including but not limited to jpg, bmp, png, gif, etc.
  • the generated webpage screenshots are encoded, and the support includes but not limited to Base64 encoding.
  • step S113 Generate a correspondence between user information, a webpage address, and a screenshot of a webpage.
  • the acquired user information, the URL information, the webpage screenshot information, and the like are formed in a corresponding relationship.
  • Step S120 uploading a screenshot of the webpage.
  • step S120 includes the following process:
  • step S121 Image upload preprocessing.
  • the validity of the acquired user information, URL information, web page screenshot, etc. is verified.
  • step S122 Initiating an image upload request to the server side.
  • the obtained user information, the URL information, the webpage screenshot information, and the like are used as parameters to initiate a request for uploading a picture to the service side.
  • Step S130 The server side processes the screenshot of the webpage.
  • the step S130 includes the following process:
  • the server side decodes the uploaded encoded picture. In the step S131, the server side decodes the encoded screenshot.
  • the server side stores the decoded picture, and saves the correspondence between the user information, the webpage information, and the screenshot of the webpage.
  • the service side stores the screenshots of the already decoded webpage, including but not limited to a storage device such as a database or a hard disk.
  • This application example also provides a webpage screenshot system, as shown in FIG. 8, including:
  • the terminal application unit 210 is configured to generate a screenshot of the webpage and upload it.
  • the terminal application unit 210 includes the following components: a webpage image capturing unit 211 configured to intercept a webpage and generate a image by using a pure webpage script; a picture encoding unit 212, configured to encode the generated picture;
  • the terminal side interface unit 213 is configured to establish an interface with the server side and upload a picture.
  • the server side control unit 220 is configured to process the image upload request and store information such as pictures. More specifically, as shown in FIG. 10, the server-side control unit 220 includes the following components: a server-side interface unit 221 configured to establish an interface with the terminal side and transmit a response message; and a picture decoding unit 222 configured to perform encoding The picture is decoded;
  • the storage service unit 223 is configured to store the decoded picture, and the correspondence between the user information, the webpage address, and the picture.
  • the webpage screenshot method and related device provided by the invention ensure the consistency of the user experience by generating a screenshot of the webpage on the user side, and the invention does not need to install any control, and can realize the screenshot in the webpage, thereby improving the user's ease of use. Sex.
  • the present invention is to be understood as being limited and not limited by the accompanying drawings.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a method, device and system for realizing webpage screenshot. The method comprises: embedding a screenshot plug-in unit in a browser or a webpage; and when the webpage is opened and the screenshot plug-in unit is started, performing screenshot on the webpage by using the screenshot plug-in unit.

Description

一种实现网页截图的方法、 设备及系统 技术领域  Method, device and system for realizing screenshot of webpage
本发明涉及网络技术领域, 尤其涉及一种实现网页截图的方法、 设备及系 统。 背景技术  The present invention relates to the field of network technologies, and in particular, to a method, device, and system for implementing a screenshot of a webpage. Background technique
随着 3G/4G在全球的部署, 智能终端技术的不断发展, 推动了移动互联网 的发展大潮, 在这波大潮中, 互联网厂家、 终端厂家凭着对传统互联网应用及 终端资源的掌控, 并凭借其创新能力, 纷纷结合自己的优点推出丰富的应用。  With the global deployment of 3G/4G and the continuous development of intelligent terminal technology, the development of mobile Internet has been promoted. In this wave, Internet manufacturers and terminal manufacturers rely on traditional Internet applications and terminal resources. Its innovative ability, combined with its own advantages, launched a wealth of applications.
此外, 终端、 用户体验和网络技术融合, 已成为被业界证实的必然趋势。 目前的终端侧在进行网页截图时通常是通过以下方法实现的: 1、通过在操作系 统中安装 ActiveX或 Applet控件来实现, 用户体验较差; 2、 通过终端触发后 台截图系统在服务器侧打开浏览器来实现截图, 但是后台截图系统由于无法获 取用户会话, 对于用户登录后的页面, 不能正常处理, 只能获取到用户登录前 的页面截图; 3、 通过在终端上调用专门的客户端截屏软件来实现截图, 而客户 端截屏软件一般是通过系统调用来实现截图且只能将截图存放在本地, 不具备 与服务器交互的功能。 发明内容  In addition, the convergence of terminals, user experience and network technologies has become an inevitable trend confirmed by the industry. The current terminal side is usually implemented by the following methods when performing webpage screenshots: 1. By installing ActiveX or Applet control in the operating system, the user experience is poor; 2. The terminal triggers the background screenshot system to open the browsing on the server side. The screenshot is implemented, but the background screenshot system cannot obtain the user session. The page after the user logs in cannot be processed normally. Only the screenshot of the page before the user logs in can be obtained. 3. By calling the special client screen capture software on the terminal. To implement the screenshot, the client screen capture software generally implements the screenshot through the system call and can only store the screenshot locally, without the function of interacting with the server. Summary of the invention
为解决上述技术问题, 本发明实施例提供一种实现网页截图的方法、 设备 及系统。  To solve the above technical problem, an embodiment of the present invention provides a method, device, and system for implementing a screenshot of a webpage.
本发明釆用的技术方案是, 应用于终端, 所述方法包括:  The technical solution adopted by the present invention is applied to a terminal, and the method includes:
在浏览器中或网页中嵌入截屏插件;  Embed a screen capture plugin in a browser or in a web page;
当打开网页并启动所述截屏插件时, 利用所述截屏插件对所述网页进行截 图。  When the webpage is opened and the screen capture plugin is launched, the webpage is truncated by the screen capture plugin.
优选地, 打开网页的方式包括: 通过浏览器打开所述网页或者直接打开所 述网页。 优选地, 所述在浏览器中嵌入截屏插件, 包括: 在浏览器的工具栏中显示 截屏插件的启动图标, 供使用; Preferably, the manner of opening the webpage comprises: opening the webpage by a browser or directly opening the webpage. Preferably, the embedding the screen capture plugin in the browser comprises: displaying a startup icon of the screen capture plugin in a toolbar of the browser for use;
所述在网页中嵌入截屏插件, 包括: 在所述网页的任意位置显示截屏插件 的启动图标, 供使用;  The embedding the screen capture plugin in the webpage includes: displaying a startup icon of the screen capture plugin at any position of the webpage for use;
所述截屏插件的编写形式包括网页脚本。  The form of writing the screenshot plugin includes a webpage script.
优选地, 所述方法还包括:  Preferably, the method further includes:
在本地保存所述网页的截图;  Save a screenshot of the webpage locally;
和 /或, 将用户的信息与所述网页的截图一并上传到服务器侧。  And / or, upload the user's information to the server side along with the screenshot of the web page.
优选地, 所述方法还包括:  Preferably, the method further includes:
在本地保存所述网页的地址及所述网页的截图;  Saving the address of the webpage and a screenshot of the webpage locally;
和 /或, 将用户的信息、 所述网页的地址与所述网页的截图一并上传到服务 器侧。  And/or, uploading the user's information, the address of the webpage, and the screenshot of the webpage to the server side.
优选地, 所述将用户的信息、 所述网页的地址及所述网页的截图一并上传 到服务器侧, 包括:  Preferably, the uploading the information of the user, the address of the webpage, and the screenshot of the webpage to the server side, including:
对所述网页的截图进行编码;  Encoding the screenshot of the webpage;
对用户的信息、 所述网页的地址、 以及所述网页的截图的有效性分别进行 验证;  Verifying the user's information, the address of the web page, and the validity of the screenshot of the web page, respectively;
当验证结果为全部有效时, 将该用户的信息、 所述网页的地址与编码后的 网页截图一并上传给服务器侧。  When the verification result is all valid, the information of the user, the address of the webpage, and the coded webpage screenshot are uploaded to the server side.
优选地, 当终端侧将用户的信息、 网页的地址及网页的截图一并上传到服 务器侧之后, 所述方法还包括:  Preferably, after the terminal side uploads the user's information, the address of the webpage, and the screenshot of the webpage to the server side, the method further includes:
在服务器侧接收终端侧上传的用户的信息、网页的地址与所述网页的截图; 对接收到的所述网页的截图进行解码;  Receiving, on the server side, information of the user uploaded by the terminal side, an address of the webpage, and a screenshot of the webpage; and decoding the received screenshot of the webpage;
将该用户的信息、 所述网页的地址与解码后的网页截图进行对应保存。 本发明实施例还提供一种终端, 所述终端包括:  The information of the user, the address of the webpage, and the decoded screenshot of the webpage are stored in association with each other. The embodiment of the invention further provides a terminal, where the terminal includes:
检测模块, 配置为检测操作;  a detection module configured to detect an operation;
截屏模块, 配置为在浏览器中或者在网页中嵌入截屏插件, 当检测模块检 测到打开网页并启动该截屏插件时, 利用所述截屏插件对所述网页进行截图。 优选地, 该终端为用户提供打开网页的方式包括: 通过浏览器打开所述网 页或者直接打开所述网页。 Screen capture module, configured to embed a screen capture plugin in a browser or in a webpage, when the detection module checks When the webpage is opened and the screen capture plugin is launched, the webpage is screenshotd by using the screen capture plugin. Preferably, the manner in which the terminal provides the user with opening the webpage includes: opening the webpage by using a browser or directly opening the webpage.
优选地, 该终端还包括: 插件图标显示模块, 配置为当在浏览器中嵌入截 屏插件时, 在浏览器的工具栏中显示截屏插件的启动图标, 供用户使用; 当在 网页中嵌入截屏插件时, 在该网页的任意位置显示截屏插件的启动图标, 供用 户使用;  Preferably, the terminal further includes: a plug-in icon display module configured to: when the screen capture plug-in is embedded in the browser, display a startup icon of the screen capture plug-in in the toolbar of the browser for the user to use; when the screen capture plug-in is embedded in the webpage Displaying a startup icon of the screen capture plugin at any position of the webpage for the user to use;
所述截屏插件的编写形式包括网页脚本。  The form of writing the screenshot plugin includes a webpage script.
优选地, 所述终端还包括:  Preferably, the terminal further includes:
本地存储模块, 配置为在本地为该用户保存所述网页的截图; 和 /或, 上传模块,配置为将该用户的信息与所述网页的截图一并上传到服务器侧。 优选地, 所述终端还包括:  a local storage module configured to locally save a screenshot of the webpage for the user; and/or an uploading module configured to upload the information of the user to the server side together with the screenshot of the webpage. Preferably, the terminal further includes:
本地存储模块, 配置为在本地为该用户保存所述网页的地址及所述网页的 截图; 和 /或,  a local storage module, configured to locally save the address of the webpage and a screenshot of the webpage for the user; and/or,
上传模块, 配置为将该用户的信息、 所述网页的地址与所述网页的截图一 并上传到服务器侧。  The uploading module is configured to upload the information of the user, the address of the webpage, and the screenshot of the webpage to the server side.
优选地, 所述上传模块, 包括:  Preferably, the uploading module includes:
编码模块, 配置为对所述网页的截图进行编码;  An encoding module configured to encode a screenshot of the webpage;
有效性验证模块, 配置为对该用户的信息、 所述网页的地址、 以及所述网 页的截图的有效性分别进行验证;  a validity verification module configured to verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage, respectively;
发送模块, 配置为当验证结果为全部有效时, 将该用户的信息、 所述网页 的地址与编码后的网页截图一并上传给服务器侧。  The sending module is configured to upload the information of the user, the address of the webpage, and the screenshot of the encoded webpage to the server side when the verification result is all valid.
本发明实施例还提供一种服务器, 该服务器包括:  The embodiment of the invention further provides a server, the server comprising:
接收模块, 配置为接收终端侧上传的用户的信息、 网页的地址与所述网页 的截图;  a receiving module, configured to receive information about a user uploaded by the terminal side, an address of the webpage, and a screenshot of the webpage;
解码模块, 配置为对接收到的所述网页的截图进行解码;  a decoding module, configured to decode a received screenshot of the webpage;
保存模块, 配置为将该用户的信息、 所述网页的地址与解码后的网页截图 进行对应保存。 a saving module configured to take the user's information, the address of the webpage, and the decoded webpage screenshot Save the corresponding.
本发明实施例还提供一种实现网页截图的系统, 所述系统包括: 终端及服 务器; 其中,  The embodiment of the present invention further provides a system for implementing a screenshot of a webpage, where the system includes: a terminal and a server;
所述终端为上述权利要求所述的终端;  The terminal is the terminal according to the above claims;
所述服务器为上述权利要求所述的服务器。  The server is a server as claimed in the preceding claims.
釆用上述技术方案, 本发明至少具有下列优点:  With the above technical solution, the present invention has at least the following advantages:
本发明所述实现网页截图的方法、 设备及系统, 与现有的网页截图控件相 比, 本发明的截图操作由网页脚本实现, 不需要用户安装任何控件, 例如: The method, device and system for realizing a screenshot of a webpage according to the present invention are compared with the existing webpage screenshot control. The screenshot operation of the present invention is implemented by a webpage script, and does not require the user to install any control, for example:
ActiveX 或 Applet。 本发明与现有的后台截图系统相比区别在于: 本发明无需 在服务器侧打开浏览器来实现截图, 且对于需要用户登录会话的页面能够正确 处理, 而后台截图系统由于无法获取用户会话, 对于用户登录后的页面也不能 正常处理, 只能获取到用户登录前的页面截图。 本发明与客户端截屏软件的区 别在于: 本发明提供了一种截图插件, 而无需客户端软件自带截屏程序; 本发 明截图完成后还可以对截图进行编码上传等处理, 而不局限与将截图存放在本 地; 另外本发明通过截图插件来实现对网页截图, 而不用向客户端软件自带的 截屏程序那样通过系统调用来实现截图。 附图说明 ActiveX or Applet. The difference between the present invention and the existing background screenshot system is that: the invention does not need to open a browser on the server side to implement the screenshot, and the page that needs the user login session can be correctly processed, and the background screenshot system cannot obtain the user session, The page after the user logs in cannot be processed normally, and only the screenshot of the page before the user logs in can be obtained. The difference between the present invention and the client screen capture software is: the invention provides a screenshot plug-in, and does not need the client software to bring a screen capture program; after the screenshot of the invention is completed, the screenshot can be encoded and uploaded, etc., without limitation and The screenshots are stored locally; in addition, the present invention implements a screenshot of the webpage through the screenshot plug-in, without using the system call to implement the screenshot as the screenshot program that comes with the client software. DRAWINGS
图 1 为本发明第一实施例的实现网页截图的方法流程图;  1 is a flowchart of a method for implementing a screenshot of a webpage according to a first embodiment of the present invention;
图 2 为本发明第三实施例的实现网页截图的终端组成示意图;  FIG. 2 is a schematic diagram of a terminal composition for implementing a screenshot of a webpage according to a third embodiment of the present invention; FIG.
图 3 为本发明第四实施例实现网页截图的服务器组成示意图;  3 is a schematic diagram of a server composition for implementing a screenshot of a webpage according to a fourth embodiment of the present invention;
图 4 为本发明应用实例的实现网页截图的方法流程图;  4 is a flowchart of a method for implementing a screenshot of a webpage according to an application example of the present invention;
图 5 为图 4中的步骤 S110的具体流程图;  FIG. 5 is a specific flowchart of step S110 in FIG. 4;
图 6 为图 4中的步骤 S120的具体流程图;  6 is a specific flowchart of step S120 in FIG. 4;
图 7 为图 4中的步骤 S130的具体流程图;  FIG. 7 is a specific flowchart of step S130 in FIG. 4;
图 8 为本发明应用实例的实现网页截图的系统组成示意图;  FIG. 8 is a schematic structural diagram of a system for implementing a screenshot of a webpage according to an application example of the present invention; FIG.
图 9 为图 8中的终端应用单元 210的具体组成示意图; 图 10 为图 8中的服务器侧控制单元 220的具体组成示意图。 具体实施方式 合附图及较佳实施例, 对本发明进行详细说明如后。 9 is a schematic diagram of a specific composition of the terminal application unit 210 in FIG. 8; FIG. 10 is a schematic diagram showing the specific composition of the server side control unit 220 in FIG. BEST MODE FOR CARRYING OUT THE INVENTION The present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
本发明第一实施例、  A first embodiment of the present invention,
一种实现网页截图的方法, 包括在终端侧以及在服务器侧执行的过程, 其 中, 如图 1所示, 在终端侧执行的过程如下:  A method for implementing a screenshot of a webpage includes a process performed on the terminal side and on the server side, wherein, as shown in FIG. 1, the process performed on the terminal side is as follows:
步骤 S101, 在浏览器中嵌入截屏插件。  Step S101, embedding a screen capture plugin in the browser.
具体的, 当在浏览器中嵌入截屏插件时, 在浏览器的工具栏中显示截屏插 件的启动图标, 供用户使用。  Specifically, when the screen capture plug-in is embedded in the browser, the startup icon of the screen capture plug-in is displayed in the toolbar of the browser for the user to use.
步骤 S102, 当用户通过浏览器打开任一网页并启动该截屏插件时, 利用所 述截屏插件对所述网页进行截图。  Step S102: When the user opens any webpage through the browser and starts the screen capture plugin, the webpage is screenshotd by using the screen capture plugin.
与此同时, 在终端侧执行的过程还可以包括步骤 S103和步骤 S104, 但是 步骤 S103和步骤 S104与步骤 S101和步骤 S102是并列描述的插件的两种嵌入 情况, 不区分时间上的先后顺序。  At the same time, the process performed on the terminal side may further include step S103 and step S104, but step S103 and step S104 and step S101 and step S102 are two embedding cases of the plug-in described in parallel, without distinguishing the order of time.
步骤 S103, 在某个网页中嵌入截屏插件。  Step S103, embedding a screen capture plugin in a webpage.
具体的, 当在网页中嵌入截屏插件时, 在该网页的任意位置显示截屏插件 的启动图标, 供用户使用。 该截屏插件的编写形式可以为网页脚本, 比如: javascript 网页脚本, 该网页脚本可以直接嵌入网页的 HTML ( Hyper Text Mark-up Language, 超文本标记语言 )代码中, 也可以根据网页的不同代码编 写相应的网页脚本, 以实现对不同网页的嵌入。  Specifically, when the screen capture plug-in is embedded in the webpage, the startup icon of the screen capture plug-in is displayed at any position of the webpage for the user to use. The screen capture plugin can be written in the form of a webpage script, such as: a javascript web script, which can be directly embedded in the HTML (Hyper Text Mark-up Language) code of the webpage, or can be written according to different code of the webpage. Corresponding web scripts to enable embedding of different web pages.
步骤 S104, 当用户打开所述网页并启动其上的截屏插件时, 利用所述截屏 插件对所述网页进行截图。  Step S104: When the user opens the webpage and launches the screen capture plugin thereon, the webpage is screenshotd by using the screen capture plugin.
除了上述单純在终端侧实现的截图方案之外, 优选的, 本实施例还扩展一 个终端侧与服务器侧交互的方案, 延续上述步骤 S101 S102 或者步骤 S103-104, 在终端侧执行的过程还包括: 步骤 S105, 在本地为该用户保存所述网页的截图; 和 /或, 将该用户的信息 与所述网页的截图一并上传到服务器侧。 In addition to the above-mentioned screenshot scheme implemented on the terminal side, preferably, the embodiment further expands a scheme in which the terminal side interacts with the server side, and continues the above steps S101 S102 or steps S103-104, and the process performed on the terminal side is further include: Step S105: locally save a screenshot of the webpage for the user; and/or upload the information of the user together with the screenshot of the webpage to the server side.
若对步骤 S105进行优化, 可以加上对网页地址的保存, 具体的, 在本地为该用户保存所述网页的地址及所述网页的截图; 和 /或, 将该用户 的信息、 所述网页的地址与所述网页的截图一并上传到服务器侧。  If the step S105 is optimized, the saving of the webpage address may be added. Specifically, the address of the webpage and the screenshot of the webpage are saved locally for the user; and/or the user's information, the webpage is The address is uploaded to the server side along with the screenshot of the web page.
优选地, 所述将该用户的信息、 所述网页的地址与所述网页的截图一并上 传到服务器侧, 具体包括如下过程:  Preferably, the information of the user, the address of the webpage, and the screenshot of the webpage are uploaded to the server side, and specifically includes the following process:
A1 : 对所述网页的截图进行编码。  A1: Encode the screenshot of the web page.
A2: 对该用户的信息、 所述网页的地址、 以及所述网页的截图的有效性分 别进行验证。 由于浏览器中存储有该用户的相关会话信息, 从中可以判断该用 户是否已登录, 而验证用户信息的有效性时, 可以做如下设置: 已登录的用户 信息为有效用户, 未登录的用户信息为无效用户; 在验证网页地址的有效性时, 可以通过判断用户输入的网页路径, 比如 URL ( Uniform Resource Locator, 统 一资源定位符), 是否符合标准的格式等; 在验证网页截图的有效性时, 可以通 过判断截图文件的大小是否符合要求, 或者判断网页截图是否编码成功来确定 其有效性。 对于与上述三种信息, 本发明也不排除有其他的有效性验证方式。  A2: Verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage, respectively. Since the browser stores the relevant session information of the user, and can determine whether the user has logged in, and verify the validity of the user information, the following settings can be made: The logged-in user information is a valid user, and the unregistered user information Invalid user; when verifying the validity of the webpage address, it can judge whether the webpage path entered by the user, such as a URL (Uniform Resource Locator), conforms to the standard format, etc.; when verifying the validity of the screenshot of the webpage You can determine the validity of the screenshot file by judging whether the size of the screenshot file meets the requirements, or whether the screenshot of the web page is successfully encoded. For the above three kinds of information, the present invention does not exclude other methods of validity verification.
A3: 当睑证结果为全部有效时, 将该用户的信息、 所述网页的地址与编码 后的网页截图一并上传给服务器侧。  A3: When the result of the verification is all valid, the information of the user, the address of the webpage, and the screenshot of the encoded webpage are uploaded to the server side.
优选地, 获取用户的信息的方式可以为现有技术, 比如, 可以包括: 当用 户对网页进行截图时, 提示用户输入账户信息, 则用户的信息即为用户的账户 信息; 或者, 还可以为, 当用户使用移动终端进行操作时, 将用户所使用的移 动终端对应的标识作为用户的信息。  Preferably, the manner of obtaining the information of the user may be the prior art. For example, the method may include: when the user takes a screenshot of the webpage, prompting the user to input the account information, the information of the user is the account information of the user; or When the user operates using the mobile terminal, the identifier corresponding to the mobile terminal used by the user is used as the information of the user.
优选地, 当执行完步骤 S105之后,将该用户的信息与所述网页的截图一并 上传到服务器侧的内容时, 可以理解的, 相应的服务器端会进行后续的操作, 服务器侧执行的如下过程:  Preferably, after the step S105 is performed, when the information of the user is uploaded to the content on the server side together with the screenshot of the webpage, it can be understood that the corresponding server performs subsequent operations, and the server side performs the following operations. Process:
步骤 S106, 服务器侧接收终端侧上传的用户的信息与所述网页的截图, 对 接收到的所述网页的截图进行解码, 将该用户的信息与解码后的网页截图进行 对应保存。 Step S106: The server side receives the information of the user uploaded by the terminal side and the screenshot of the webpage, decodes the received screenshot of the webpage, and performs the screenshot of the user and the decoded webpage screenshot. Corresponding to save.
具体的, 若针对优化后的步骤 S105, 步骤 S106中的内容相应的为: 接收 终端侧上传的用户的信息、 网页的地址与所述网页的截图, 对接收到的所述网 页的截图进行解码, 将该用户的信息、 所述网页的地址与解码后的网页截图进 行对应保存。 本发明第二实施例、  Specifically, if the content of the step S106 is corresponding to the optimized step S105, the content of the user uploaded by the terminal, the address of the webpage, and the screenshot of the webpage are decoded, and the received screenshot of the webpage is decoded. And storing the information of the user, the address of the webpage, and the decoded screenshot of the webpage. A second embodiment of the present invention,
一种实现网页截图的终端, 所述终端在浏览器中或者在网页中嵌入截屏插 件, 所述终端包括:  A terminal for implementing a screenshot of a webpage, the terminal embedding a screen capture plugin in a browser or in a webpage, the terminal includes:
检测模块, 配置为检测操作;  a detection module configured to detect an operation;
截屏模块, 配置为当检测模块检测到当打开网页并启动该截屏插件时, 利 用所述截屏插件对所述网页进行截图。  The screen capture module is configured to: when the detection module detects that the webpage is opened and the screen capture plugin is started, the screen capture is performed by using the screen capture plugin.
具体的, 当在浏览器中嵌入截屏插件时, 在浏览器的工具栏中显示截屏插 件的启动图标, 供用户使用。  Specifically, when the screen capture plug-in is embedded in the browser, the startup icon of the screen capture plug-in is displayed in the toolbar of the browser for the user to use.
可选的, 该终端在网页中也嵌入截屏插件, 那么截屏模块, 配置为当用户 打开所述网页并启动其上的截屏插件时, 对所述网页进行截图。  Optionally, the terminal also inserts a screen capture plug-in in the webpage, and the screen capture module is configured to take a screenshot of the webpage when the user opens the webpage and launches the screen capture plug-in on the webpage.
具体的, 当在网页中嵌入截屏插件时, 在该网页的任意位置显示截屏插件 的启动图标, 供用户使用。 该截屏插件的编写形式可以为网页脚本, 比如: javascript网页脚本, 该网页脚本可以直接嵌入网页的 HTML代码中,也可以根 据网页的不同代码编写相应的网页脚本, 以实现对不同网页的嵌入。 本发明第三实施例、  Specifically, when the screen capture plug-in is embedded in the webpage, the startup icon of the screen capture plug-in is displayed at any position of the webpage for the user to use. The screen capture plugin can be written in a webpage script, for example: a javascript web script, which can be directly embedded in the HTML code of the webpage, or a corresponding webpage script can be written according to different code of the webpage to realize embedding of different webpages. A third embodiment of the present invention,
一种实现网页截图的终端, 如图 2所示, 与第二实施例的区别在于, 本实 施例的截屏插件 10除了包含截屏模块 100之外, 还包括:  A terminal that implements a screenshot of a webpage, as shown in FIG. 2, is different from the second embodiment in that, in addition to the screen capture module 100, the screen capture plug-in 10 of the embodiment includes:
本地存储模块 200, 配置为在本地为该用户保存所述网页的截图; 和 /或, 上传模块 300, 配置为将该用户的信息与所述网页的截图一并上传到服务 器侧。 优选的, 若对本地存储模块 200和上传模块 300的功能进行优化, 可以加 上对网页地址的保存, 具体的, 在该截屏插件中: The local storage module 200 is configured to locally save a screenshot of the webpage for the user; and/or, the uploading module 300 is configured to upload the information of the user together with the screenshot of the webpage to the server side. Preferably, if the functions of the local storage module 200 and the uploading module 300 are optimized, the saving of the webpage address may be added. Specifically, in the screen capture plugin:
本地存储模块 200, 配置为在本地为该用户保存所述网页的地址及所述网 页的截图; 和 /或,  The local storage module 200 is configured to locally save the address of the webpage and a screenshot of the webpage for the user; and/or,
上传模块 300, 配置为将该用户的信息、 所述网页的地址与所述网页的截 图一并上传到服务器侧。  The uploading module 300 is configured to upload the information of the user, the address of the webpage, and the screenshot of the webpage to the server side.
优选地, 上传模块 300, 具体包括:  Preferably, the uploading module 300 specifically includes:
编码模块 301, 配置为对所述网页的截图进行编码.  The encoding module 301 is configured to encode a screenshot of the webpage.
有效性验证模块 302, 配置为对该用户的信息、 所述网页的地址、 以及所 述网页的截图的有效性分别进行验证。 由于浏览器中存储有该用户的相关会话 信息, 从中可以判断该用户是否已登录, 而验证用户信息的有效性时, 可以做 如下设置: 已登录的用户信息为有效用户, 未登录的用户信息为无效用户; 在 验证网页地址的有效性时, 可以通过判断用户输入的网页路径, 比如 URL, 是 否符合标准的格式等; 在验证网页截图的有效性时, 可以通过判断截图文件的 大小是否符合要求, 或者判断网页截图是否编码成功来确定其有效性。 对于与 上述三种信息, 本发明也不排除有其他的有效性验证方式。  The validity verification module 302 is configured to separately verify the information of the user, the address of the webpage, and the validity of the screenshot of the webpage. Since the browser stores the relevant session information of the user, and can determine whether the user has logged in, and verify the validity of the user information, the following settings can be made: The logged-in user information is a valid user, and the unregistered user information Invalid user; when verifying the validity of the webpage address, it can judge whether the webpage path entered by the user, such as the URL, conforms to the standard format, etc. When verifying the validity of the screenshot of the webpage, it can judge whether the size of the screenshot file is consistent Request, or determine whether the screenshot of the web page is successfully encoded to determine its validity. For the above three kinds of information, the present invention does not exclude other methods of validity verification.
发送模块 303, 配置为当验证结果为全部有效时, 将该用户的信息、 所述 网页的地址与编码后的网页截图一并上传给服务器侧。  The sending module 303 is configured to upload the information of the user, the address of the webpage, and the coded webpage screenshot to the server side when the verification result is all valid.
优选的, 该终端还包括:  Preferably, the terminal further includes:
插件图标显示模块 20, 配置为当在浏览器中嵌入截屏插件时, 在浏览器的 工具栏中显示截屏插件的启动图标,供用户使用; 当在网页中嵌入截屏插件时, 在该网页的任意位置显示截屏插件的启动图标, 供用户使用。 本发明第四实施例、  The plug-in icon display module 20 is configured to display a startup icon of the screenshot plug-in in the toolbar of the browser for the user to use when the screen capture plug-in is embedded in the browser; when the screen capture plug-in is embedded in the webpage, any of the webpages are embedded in the webpage The location displays the launch icon of the screenshot plugin for the user to use. A fourth embodiment of the present invention,
为了配合上述第三实施例的所述终端工作以实现网页截图, 本实施例提供 一种实现网页截图的服务器, 如图 3所示, 该服务器包括:  In order to cooperate with the terminal of the third embodiment to implement a screenshot of a webpage, the embodiment provides a server for implementing a screenshot of a webpage. As shown in FIG. 3, the server includes:
接收模块 500, 配置为接收终端侧上传的用户的信息、 网页的地址与所述 网页的截图; The receiving module 500 is configured to receive information about a user uploaded by the terminal side, an address of the webpage, and the a screenshot of the web page;
解码模块 600, 配置为对接收到的所述网页的截图进行解码;  The decoding module 600 is configured to decode the received screenshot of the webpage;
保存模块 700, 配置为将该用户的信息、 所述网页的地址与解码后的网页 截图进行对应保存。  The saving module 700 is configured to store the information of the user, the address of the webpage, and the screenshot of the decoded webpage.
本领域技术人员应该知道, 本发明实施例中的截屏插件并不限于应用到特 定网页或网页应用中, 用户可以通过本发明实施例提供的截屏插件, 包括但不 限于浏览器插件或页面插件, 实现对任意网页或网页应用的截图及上传处理。  It should be understood by those skilled in the art that the screen capture plug-in in the embodiment of the present invention is not limited to being applied to a specific webpage or webpage application, and the screen capture plug-in provided by the user may be provided by the user, including but not limited to a browser plug-in or a page plug-in. Enable screenshots and upload processing for any web page or web application.
本发明实施例的截屏插件作为浏览器插件时, 包括但不限于工具栏式, 作 为优选实施例, 本发明提供了一种浏览器插件工具栏的截图方式。 用户可以将 本发明提供的网页截图启动图标拖动到浏览器工具栏, 用户用该浏览器打开所 有的网页或网页应用, 均可以使用浏览器工具栏中本发明提供的网页截图启动 图标实现截图及后续处理。  When the screen capture plug-in of the embodiment of the present invention is used as a browser plug-in, including but not limited to a toolbar type, as a preferred embodiment, the present invention provides a screenshot mode of a browser plug-in toolbar. The user can drag the webpage start icon provided by the present invention to the browser toolbar, and the user can open all webpages or webpage applications by using the browser, and can use the webpage screenshot startup icon provided by the present invention in the browser toolbar to implement the screenshot. And subsequent processing.
本发明实施例的截屏插件作为页面插件时,在嵌入了页面插件代码的网页, 会自动出现本发明提供的网页截图启动图标, 用户可以点击该图标, 实现对本 网页的截图及后续处理。  When the screen capture plug-in of the embodiment of the present invention is used as a page plug-in, the webpage screenshot start icon provided by the present invention automatically appears on the webpage in which the page plug-in code is embedded, and the user can click the icon to implement the screenshot and subsequent processing of the webpage.
本发明所述实现网页截图的方法及相关设备,与现有的网页截图控件相比, 本发明的截图操作由网页脚本实现, 不需要用户安装任何控件, 例如: ActiveX 或 Applet。 本发明与现有的后台截图系统相比区别在于: 本发明无需在服务器 侧打开浏览器来实现截图, 且对于需要用户登录会话的页面能够正确处理, 而 后台截图系统由于无法获取用户会话,对于用户登录后的页面也不能正常处理, 只能获取到用户登录前的页面截图。 本发明与客户端截屏软件的区别在于: 本 发明提供了一种截图插件, 而无需客户端软件自带截屏程序; 本发明截图完成 后还可以对截图进行编码上传等处理, 而不局限与将截图存放在本地; 另外本 发明通过截图插件来实现对网页截图, 而不用向客户端软件自带的截屏程序那 样通过系统调用来实现截图。  The method for implementing webpage screenshots and related devices of the present invention, compared with the existing webpage screenshot control, the screenshot operation of the present invention is implemented by a webpage script, and does not require the user to install any controls, such as: ActiveX or Applet. The difference between the present invention and the existing background screenshot system is that the present invention does not need to open a browser on the server side to implement the screenshot, and can correctly process the page that requires the user to log in to the session, and the background screenshot system cannot obtain the user session. The page after the user logs in cannot be processed normally, and only the screenshot of the page before the user logs in can be obtained. The difference between the present invention and the client screen capture software is: the invention provides a screenshot plug-in, and does not need the client software to bring a screen capture program; after the screenshot of the invention is completed, the screenshot can be encoded and uploaded, etc., without limitation and The screenshots are stored locally; in addition, the present invention implements a screenshot of the webpage through the screenshot plug-in, without using the system call to implement the screenshot as the screenshot program that comes with the client software.
基于上述实施例, 介绍本发明的一个应用实例, 本应用实例提供的一种网 页截图方法, 应用在网络系统中, 如图 4所示, 该方法包括如下步骤: 步骤 S110、 在终端侧生成网页截图。 An application example of the present invention is described based on the foregoing embodiment. A webpage screenshot method provided by the application example is applied to a network system. As shown in FIG. 4, the method includes the following steps: Step S110: Generate a webpage screenshot on the terminal side.
更为具体的, 如图 5所示, 步骤 S110包括如下过程:  More specifically, as shown in FIG. 5, step S110 includes the following process:
S111 : 获取用户输入信息或打开的页面。 在该步骤 S111中, 一般由终端应 用从用户输入的 URL信息或打开的 Web页面获取信息。  S111: Obtain user input information or an opened page. In the step S111, the information is generally obtained by the terminal application from the URL information input by the user or the opened web page.
S112: 生成网页截图并对图片进行编码。 在该步骤 S112中, 生成的网页截 图, 支持包括但不限于 jpg、 bmp、 png、 gif等图片格式; 同时, 对生成的网页 截图进行编码, 支持包括但不限于 Base64编码。  S112: Generate a screenshot of the webpage and encode the image. In the step S112, the generated webpage screenshot supports the image formats including but not limited to jpg, bmp, png, gif, etc. At the same time, the generated webpage screenshots are encoded, and the support includes but not limited to Base64 encoding.
S113: 生成用户信息、 网页地址及网页截图的对应关系。 在该步骤 S113 中, 将获取的用户信息、 URL信息, 网页截图信息等形成相互对应关系。  S113: Generate a correspondence between user information, a webpage address, and a screenshot of a webpage. In the step S113, the acquired user information, the URL information, the webpage screenshot information, and the like are formed in a corresponding relationship.
步骤 S120、 网页截图上传。  Step S120, uploading a screenshot of the webpage.
更为具体的, 如图 6所示, 该步骤 S120包括如下过程:  More specifically, as shown in FIG. 6, the step S120 includes the following process:
S121 : 图片上传预处理。 在该步骤 S121 中, 对获取的用户信息、 URL信 息、 网页截图等的有效性进行验证。  S121: Image upload preprocessing. In the step S121, the validity of the acquired user information, URL information, web page screenshot, etc. is verified.
S122: 向服务器侧发起图片上传请求。 在该步骤 S122 中, 将获取的用户 信息、 URL信息、 网页截图信息等作为参数向服务侧发起图片上传的请求。  S122: Initiating an image upload request to the server side. In the step S122, the obtained user information, the URL information, the webpage screenshot information, and the like are used as parameters to initiate a request for uploading a picture to the service side.
步骤 S130、 服务器侧对网页截图进行处理。  Step S130: The server side processes the screenshot of the webpage.
更为具体的, 如图 7所示, 该步骤 S130包括如下过程:  More specifically, as shown in FIG. 7, the step S130 includes the following process:
S131 : 服务器侧对上传的编码图片进行解码。 在该步骤 S131 中, 服务器 侧对经过编码的截图进行解码。  S131: The server side decodes the uploaded encoded picture. In the step S131, the server side decodes the encoded screenshot.
S132: 服务器侧存储解码后图片, 并保存用户信息、 网页信息、 以及网页 截图的对应关系。 在该步骤 S132中, 服务侧对已经解码的网页截图进行存储, 包括但不限于数据库、 硬盘等存储设备。  S132: The server side stores the decoded picture, and saves the correspondence between the user information, the webpage information, and the screenshot of the webpage. In the step S132, the service side stores the screenshots of the already decoded webpage, including but not limited to a storage device such as a database or a hard disk.
本应用实例还提供一种网页截图系统, 如图 8所示, 包括:  This application example also provides a webpage screenshot system, as shown in FIG. 8, including:
1 )终端应用单元 210, 配置为生成网页截图并上传。  1) The terminal application unit 210 is configured to generate a screenshot of the webpage and upload it.
更为具体的, 如图 9所示, 终端应用单元 210包括以下组成部分: 网页图片截取单元 211, 配置为通过純网页脚本对网页进行截取并生成图 片; 图片编码单元 212, 配置为对生成的图片进行编码; More specifically, as shown in FIG. 9 , the terminal application unit 210 includes the following components: a webpage image capturing unit 211 configured to intercept a webpage and generate a image by using a pure webpage script; a picture encoding unit 212, configured to encode the generated picture;
终端侧接口单元 213, 配置为建立与服务器侧的接口并上传图片。  The terminal side interface unit 213 is configured to establish an interface with the server side and upload a picture.
2 )服务器侧控制单元 220, 配置为处理图片上传请求,并存储图片等信息。 更为具体的, 如图 10所示, 服务器侧控制单元 220包括以下组成部分: 服务器侧接口单元 221, 配置为建立与终端侧的接口并传输响应消息; 图片解码单元 222, 配置为对编码后图片进行解码处理;  2) The server side control unit 220 is configured to process the image upload request and store information such as pictures. More specifically, as shown in FIG. 10, the server-side control unit 220 includes the following components: a server-side interface unit 221 configured to establish an interface with the terminal side and transmit a response message; and a picture decoding unit 222 configured to perform encoding The picture is decoded;
存储服务单元 223, 配置为对解码后的图片, 以及用户信息、 网页地址、 图片的对应关系进行存储。  The storage service unit 223 is configured to store the decoded picture, and the correspondence between the user information, the webpage address, and the picture.
本发明提供的网页截图方法及相关设备, 通过在用户侧生成网页截图, 保 证了用户体验的一致性, 并且本发明不需要安装任何控件, 即可实现网页中的 截图, 提高了用户的易用性。 手段及功效得以更加深入且具体的了解, 然而所附图示仅是提供参考与说明之 用, 并非用来对本发明加以限制。  The webpage screenshot method and related device provided by the invention ensure the consistency of the user experience by generating a screenshot of the webpage on the user side, and the invention does not need to install any control, and can realize the screenshot in the webpage, thereby improving the user's ease of use. Sex. The present invention is to be understood as being limited and not limited by the accompanying drawings.

Claims

权利要求书 claims
1、 一种实现网页截图的方法, 应用于终端, 所述方法包括: 1. A method for realizing web page screenshots, applied to terminals, the method includes:
在浏览器中或网页中嵌入截屏插件; Embed screenshot plug-ins in browsers or web pages;
当打开网页并启动所述截屏插件时, 利用所述截屏插件对所述网页进行截 图。 When a web page is opened and the screenshot plug-in is started, the screen capture plug-in is used to take a screenshot of the web page.
2、根据权利要求 1所述的实现网页截图的方法, 其中, 打开网页的方式包 括: 通过浏览器打开所述网页或者直接打开所述网页。 2. The method for realizing web page screenshots according to claim 1, wherein the method of opening the web page includes: opening the web page through a browser or directly opening the web page.
3、 根据权利要求 1或 2所述的实现网页截图的方法, 其中, 3. The method for realizing web page screenshots according to claim 1 or 2, wherein,
所述在浏览器中嵌入截屏插件, 包括: 在浏览器的工具栏中显示截屏插件 的启动图标, 供使用; Embedding the screenshot plug-in in the browser includes: displaying the startup icon of the screenshot plug-in in the toolbar of the browser for use;
所述在网页中嵌入截屏插件, 包括: 在所述网页的任意位置显示截屏插件 的启动图标, 供使用; The embedding of the screenshot plug-in in the web page includes: displaying the startup icon of the screenshot plug-in at any position on the web page for use;
所述截屏插件的编写形式包括网页脚本。 The screen capture plug-in is written in a web script.
4、根据权利要求 1或 2所述的实现网页截图的方法, 其中, 所述方法还包 括: 4. The method for realizing web page screenshots according to claim 1 or 2, wherein the method further includes:
在本地保存所述网页的截图; Save a screenshot of the webpage locally;
和 /或, 将用户的信息与所述网页的截图一并上传到服务器侧。 And/or, upload the user's information to the server together with the screenshot of the web page.
5、根据权利要求 1或 2所述的实现网页截图的方法, 其中, 所述方法还包 括: 5. The method for realizing web page screenshots according to claim 1 or 2, wherein the method further includes:
在本地保存所述网页的地址及所述网页的截图; Save the address of the webpage and the screenshot of the webpage locally;
和 /或, 将用户的信息、 所述网页的地址与所述网页的截图一并上传到服务 器侧。 And/or, upload the user's information, the address of the web page and the screenshot of the web page to the server side.
6、根据权利要求 5所述的实现网页截图的方法,其中,所述将用户的信息、 所述网页的地址及所述网页的截图一并上传到服务器侧, 包括: 6. The method for realizing web page screenshots according to claim 5, wherein said uploading the user's information, the address of the web page and the screenshot of the web page to the server side includes:
对所述网页的截图进行编码; Encoding screenshots of said web pages;
对用户的信息、 所述网页的地址、 以及所述网页的截图的有效性分别进行 验证; The user's information, the address of the web page, and the validity of the screenshot of the web page are separately processed. verify;
当验证结果为全部有效时, 将该用户的信息、 所述网页的地址与编码后的 网页截图一并上传给服务器侧。 When the verification results are all valid, the user's information, the address of the web page and the encoded web page screenshot are uploaded to the server side.
7、根据权利要求 5所述的实现网页截图的方法, 其中, 当终端侧将用户的 信息、 网页的地址及网页的截图一并上传到服务器侧之后, 所述方法还包括: 在服务器侧接收终端侧上传的用户的信息、网页的地址与所述网页的截图; 对接收到的所述网页的截图进行解码; 7. The method for realizing web page screenshots according to claim 5, wherein after the terminal side uploads the user's information, the address of the web page and the screenshot of the web page to the server side, the method further includes: receiving on the server side The user's information, the address of the web page and the screenshot of the web page uploaded by the terminal side; decoding the received screenshot of the web page;
将该用户的信息、 所述网页的地址与解码后的网页截图进行对应保存。 The user's information, the address of the web page and the decoded web page screenshot are stored in correspondence.
8、 一种终端, 所述终端包括: 8. A terminal, the terminal includes:
检测模块, 配置为检测操作; a detection module configured for detection operation;
截屏模块, 配置为在浏览器中或者在网页中嵌入截屏插件, 当检测模块检 测到打开网页并启动该截屏插件时, 利用所述截屏插件对所述网页进行截图。 The screen capture module is configured to embed a screen capture plug-in in the browser or in the web page. When the detection module detects that the web page is opened and starts the screen capture plug-in, the screen capture plug-in is used to capture the web page.
9、 根据权利要求 8所述的终端, 其中, 打开网页的方式包括: 通过浏览器 打开所述网页或者直接打开所述网页。 9. The terminal according to claim 8, wherein the method of opening the web page includes: opening the web page through a browser or directly opening the web page.
10、 根据权利要求 8或 9所述的终端, 其中, 所述终端还包括: 插件图标 显示模块, 配置为当在浏览器中嵌入截屏插件时, 在浏览器的工具栏中显示截 屏插件的启动图标, 供使用; 当在网页中嵌入截屏插件时, 在该网页的任意位 置显示截屏插件的启动图标,供使用; 所述截屏插件的编写形式包括网页脚本。 10. The terminal according to claim 8 or 9, wherein the terminal further includes: a plug-in icon display module, configured to display the startup of the screenshot plug-in in the toolbar of the browser when the screen capture plug-in is embedded in the browser. icon, for use; when embedding the screenshot plug-in in a web page, the startup icon of the screenshot plug-in is displayed at any position on the web page for use; the writing form of the screen capture plug-in includes a web page script.
11、 根据权利要求 8或 9所述的终端, 其中, 所述终端还包括: 11. The terminal according to claim 8 or 9, wherein the terminal further includes:
本地存储模块, 配置为在本地保存所述网页的截图; 和 /或, a local storage module configured to locally save screenshots of the web page; and/or,
上传模块, 配置为将用户的信息与所述网页的截图一并上传到服务器侧。 The upload module is configured to upload the user's information and the screenshot of the web page to the server side.
12、 根据权利要求 8或 9所述的终端, 其中, 所述终端还包括: 12. The terminal according to claim 8 or 9, wherein the terminal further includes:
本地存储模块, 配置为在本地保存所述网页的地址及所述网页的截图; 和 / 或, A local storage module configured to locally save the address of the web page and the screenshot of the web page; and/or,
上传模块, 配置为将用户的信息、 所述网页的地址与所述网页的截图一并 上传到服务器侧。 The upload module is configured to upload the user's information, the address of the web page, and the screenshot of the web page to the server side.
13、 根据权利要求 12所述的终端, 其中, 所述上传模块, 包括: 编码模块, 配置为对所述网页的截图进行编码; 13. The terminal according to claim 12, wherein the upload module includes: An encoding module configured to encode screenshots of the web page;
有效性验证模块, 配置为对用户的信息、 所述网页的地址、 以及所述网页 的截图的有效性分别进行验证; A validity verification module configured to separately verify the validity of the user's information, the address of the web page, and the screenshot of the web page;
发送模块, 配置为当验证结果为全部有效时, 将该用户的信息、 所述网页 的地址与编码后的网页截图一并上传给服务器侧。 The sending module is configured to upload the user's information, the address of the web page and the encoded web page screenshot to the server side when the verification results are all valid.
14、 一种服务器, 所述服务器包括: 14. A server, the server includes:
接收模块, 配置为接收终端侧上传的用户的信息、 网页的地址与所述网页 的截图; The receiving module is configured to receive the user's information, the address of the web page and the screenshot of the web page uploaded by the terminal side;
解码模块, 配置为对接收到的所述网页的截图进行解码; A decoding module configured to decode the received screenshot of the web page;
保存模块, 配置为将该用户的信息、 所述网页的地址与解码后的网页截图 进行对应保存。 The saving module is configured to correspondingly save the user's information, the address of the web page and the decoded web page screenshot.
15、 一种实现网页截图的系统, 所述系统包括: 终端及服务器; 其中, 所述终端, 配置为在浏览器中或网页中嵌入截屏插件; 当打开网页并启动 所述截屏插件时, 利用所述截屏插件对所述网页进行截图; 15. A system for realizing web page screenshots, the system includes: a terminal and a server; wherein, the terminal is configured to embed a screen capture plug-in in a browser or a web page; when the web page is opened and the screen capture plug-in is started, use The screenshot plug-in takes a screenshot of the web page;
所述服务器, 配置为接收终端上传的用户的信息、 网页的地址与所述网页 的截图; 对接收到的所述网页的截图进行解码; 将该用户的信息、 所述网页的 地址与解码后的网页截图进行对应保存。 The server is configured to receive the user's information, the address of the webpage and the screenshot of the webpage uploaded by the terminal; decode the received screenshot of the webpage; and combine the user's information, the address of the webpage and the decoded webpage. Save the screenshot of the web page accordingly.
PCT/CN2014/077067 2013-10-15 2014-05-08 Method, device and system for realizing webpage screenshot WO2014180331A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310482774.8A CN103577187A (en) 2013-10-15 2013-10-15 Method and related equipment for realizing webpage screenshot
CN201310482774.8 2013-10-15

Publications (1)

Publication Number Publication Date
WO2014180331A1 true WO2014180331A1 (en) 2014-11-13

Family

ID=50049036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077067 WO2014180331A1 (en) 2013-10-15 2014-05-08 Method, device and system for realizing webpage screenshot

Country Status (2)

Country Link
CN (1) CN103577187A (en)
WO (1) WO2014180331A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577187A (en) * 2013-10-15 2014-02-12 中兴通讯股份有限公司 Method and related equipment for realizing webpage screenshot
CN104079654B (en) * 2014-07-04 2019-02-12 北京奇虎科技有限公司 Application program picture dissemination method, client and electronic equipment
CN104125497B (en) * 2014-07-30 2018-03-06 北京金山安全软件有限公司 Webpage video recording method and device
CN105824836B (en) * 2015-01-07 2020-01-10 宇龙计算机通信科技(深圳)有限公司 Screenshot sharing method and device, and information receiving method and device
CN104965881B (en) * 2015-06-12 2019-08-30 北京奇虎科技有限公司 The method and device in constituency is extracted in the page
CN107766359B (en) * 2016-08-17 2022-03-15 阿里巴巴(中国)有限公司 Method and device for converting page content into picture and computing equipment
CN108304118B (en) * 2017-01-13 2020-07-31 北京国双科技有限公司 Screenshot method and device
CN110020231A (en) * 2017-07-25 2019-07-16 阿里巴巴集团控股有限公司 Webpage capture method and device thereof
CN107391714A (en) * 2017-07-27 2017-11-24 北京锐安科技有限公司 A kind of screenshot method, capture server, sectional drawing service system and medium
CN110166505B (en) * 2018-02-12 2022-06-07 深圳市六度人和科技有限公司 Session record storage method, device, equipment and storage medium
CN108959605A (en) * 2018-07-13 2018-12-07 彩讯科技股份有限公司 For the screenshot method of webpage, device, computer equipment and storage medium
CN110659092B (en) * 2019-08-13 2023-05-02 深圳赛安特技术服务有限公司 Webpage screenshot method and device, computer equipment and storage medium
CN112685284A (en) * 2019-10-18 2021-04-20 中移动信息技术有限公司 Test video generation method and device, electronic equipment and computer storage medium
CN111626021B (en) * 2020-04-20 2022-08-12 腾讯科技(深圳)有限公司 Presentation generation method and device
CN114489398A (en) * 2021-12-31 2022-05-13 科大讯飞股份有限公司 Page content sharing method, sharing terminal and subscription terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929604A (en) * 2012-09-29 2013-02-13 北京奇虎科技有限公司 Screen capturing apparatus and method
CN102982235A (en) * 2012-11-02 2013-03-20 北京奇虎科技有限公司 Information interaction method and browser for web games
CN103577187A (en) * 2013-10-15 2014-02-12 中兴通讯股份有限公司 Method and related equipment for realizing webpage screenshot

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100592292C (en) * 2007-04-09 2010-02-24 腾讯科技(深圳)有限公司 Web page screen-cutting system and implementation method
CN101291488B (en) * 2008-03-24 2012-09-05 中兴通讯股份有限公司 Screen printing method on mobile terminal
EP2455371B1 (en) * 2009-07-16 2013-12-25 SDS Biotech K. K. 4-(3-butynyl)aminopyrimidine derivatives as pest control agents for agricultural and horticultural use
IT1403431B1 (en) * 2010-12-27 2013-10-17 Skf Ab CONNECTION OF A FLANGED RING OF A BEARING-HUB UNIT TO A WHEEL OR TO THE SUSPENSION PILL OF A MOTOR VEHICLE
CN103246699B (en) * 2013-04-01 2017-06-27 钱咸升(北京)网络科技有限公司 A kind of data access control method and device based on browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929604A (en) * 2012-09-29 2013-02-13 北京奇虎科技有限公司 Screen capturing apparatus and method
CN102982235A (en) * 2012-11-02 2013-03-20 北京奇虎科技有限公司 Information interaction method and browser for web games
CN103577187A (en) * 2013-10-15 2014-02-12 中兴通讯股份有限公司 Method and related equipment for realizing webpage screenshot

Also Published As

Publication number Publication date
CN103577187A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
WO2014180331A1 (en) Method, device and system for realizing webpage screenshot
US8417772B2 (en) Method and system for transferring content from the web to mobile devices
CN107257372B (en) Method for supporting communication between multiple browsers and local application program
US20170230320A1 (en) Transmitting Media Content During Instant Messaging
CN103618606A (en) App login method verified through short message
WO2014082555A1 (en) Login method, device and open platform system
CN109766725B (en) Data processing method, device, intelligent terminal and computer readable medium
WO2008122225A1 (en) System and method of screeing catching on webmail
WO2014000281A1 (en) Identity authentication method and device
CN105357110B (en) E-mail sending method, apparatus and system
CN108416021B (en) Browser webpage content processing method and device, electronic equipment and readable medium
WO2012155678A1 (en) Method and terminal for developing mobile phone application interface based on browser parsing manner
CN111523102B (en) Applet login method, device, equipment and computer readable storage medium
WO2013097325A1 (en) Mail attachment preview method and mail system
CN115022047B (en) Account login method and device based on multi-cloud gateway, computer equipment and medium
CN107203576B (en) Information synchronization method and device
US20150365397A1 (en) Web authentication method and system
CN103179159A (en) Method for processing third-party applications and terminal browser
CN106487662B (en) Information sharing method and device
JP5112401B2 (en) Web action history acquisition system, Web action history acquisition method, gateway device, and program
CN101707627A (en) Method and device for presenting page information
CN103647652A (en) Method, device and server for achieving data transmission
KR101349201B1 (en) Apparatus for interoperability between Web-browser and Local-resources in the Mobile Device and method thereof
WO2014026542A1 (en) Implementation method, system and device for instant communication application
CN106713681B (en) A kind of information processing method, device, terminal and server

Legal Events

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

Ref document number: 14794710

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14794710

Country of ref document: EP

Kind code of ref document: A1