[go: up one dir, main page]

CN102137058B - A tab-based page access method and device - Google Patents

A tab-based page access method and device Download PDF

Info

Publication number
CN102137058B
CN102137058B CN201010000960.XA CN201010000960A CN102137058B CN 102137058 B CN102137058 B CN 102137058B CN 201010000960 A CN201010000960 A CN 201010000960A CN 102137058 B CN102137058 B CN 102137058B
Authority
CN
China
Prior art keywords
page
data
tab page
tab
request
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
CN201010000960.XA
Other languages
Chinese (zh)
Other versions
CN102137058A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010000960.XA priority Critical patent/CN102137058B/en
Publication of CN102137058A publication Critical patent/CN102137058A/en
Application granted granted Critical
Publication of CN102137058B publication Critical patent/CN102137058B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种基于tab页的页面访问方法和装置,该方法包括:获取本地的tab页,所述tab页中携带了页面的信息;当接收到访问所述页面的数据请求时,使页面根据所述数据请求通过脚本完成所述数据请求。通过本发明,实现了通过客户端直接对页面进行操控的功能,提高用户的体验感。

The invention discloses a tab page-based page access method and device. The method includes: acquiring a local tab page, the tab page carrying page information; when receiving a data request for accessing the page, using The page completes the data request through a script according to the data request. Through the present invention, the function of directly manipulating the page through the client is realized, and the experience of the user is improved.

Description

一种基于tab页的页面访问方法和装置A tab-based page access method and device

技术领域 technical field

本发明涉及互联网技术领域,尤其涉及一种基于tab页的页面访问方法和装置。The invention relates to the technical field of the Internet, in particular to a tab page-based page access method and device.

背景技术 Background technique

网络即时通讯工具发展到今天,已经被大多数的网民所接受,成为用户必不可少的软件工具,不但在平时的休闲娱乐中,而且在用户的工作中同样得到广泛的使用。因此用户对IM(InstantMessaging,即时通讯)软件的易用性,稳定性,安全性等方面都提出了较高的要求。The development of network instant messaging tools has been accepted by most netizens and has become an indispensable software tool for users. It is not only widely used in leisure and entertainment, but also in users' work. Therefore, users have put forward higher requirements on the ease of use, stability, security and other aspects of IM (Instant Messaging, instant messaging) software.

在当前主流的IM软件中,经常会有和空间博客进行交互融合的场景应用。在现有的IM主流软件中,和空间博客的融合场景经常是在客户端上提供一个空间博客的入口,用户在点击后通常跳转到空间博客页面进行后续的操作,接下来的操作实际都是在网页上完成。In the current mainstream IM software, there are often scene applications that interact with space blogs. In the existing IM mainstream software, the fusion scene with Space Blog is often to provide a Space Blog entry on the client. After clicking, the user usually jumps to the Space Blog page for subsequent operations. is done on the web.

现有的IM主流软件中,客户端和网页端数据交互的信息量相对简单,通常只是在跳转地址中携带些参数信息,且需要用户登录空间博客所在的相关IE页面才能够对其进行相应的操作,而用户不能能够通过IM软件直接对相关IE页面进行操作,降低了用户的体验感。In the existing IM mainstream software, the amount of information exchanged between the client and the web page is relatively simple. Usually, only some parameter information is carried in the jump address, and the user needs to log in to the relevant IE page where the space blog is located to be able to respond to it. operation, but the user cannot directly operate the relevant IE page through the IM software, which reduces the user experience.

发明内容 Contents of the invention

本发明实施例提供了一种基于tab页的页面访问方法和装置,用于实现通过客户端直接对页面进行操作。The embodiment of the present invention provides a tab page-based page access method and device for directly operating the page through a client.

本发明实施例提供一种基于tab页的页面访问方法,包括:The embodiment of the present invention provides a tab page-based page access method, including:

获取本地的tab页,所述tab页中携带了页面的信息;Acquiring a local tab page, the tab page carrying page information;

当接收到访问所述页面的数据请求时,使页面根据所述数据请求通过脚本完成所述数据请求。When a data request for accessing the page is received, the page is made to complete the data request through a script according to the data request.

其中,所述页面根据所述数据请求通过脚本完成所述数据请求包括:Wherein, the page completes the data request through a script according to the data request including:

根据所述数据请求获取所述页面的脚本,通过所述脚本完成所述数据请求;或Obtain the script of the page according to the data request, and complete the data request through the script; or

根据所述数据请求获取所述页面的脚本,所述脚本调用与本地的预设接口,通过预设接口完成所述数据请求。The script of the page is obtained according to the data request, the script calls a preset interface with the local, and the data request is completed through the preset interface.

其中,本地设置有宿主;所述页面根据所述数据请求通过脚本完成所述数据请求之后,还包括:Wherein, a host is set locally; after the page completes the data request through a script according to the data request, it also includes:

将本地的所述数据请求的数据响应发送给宿主;sending the local data response to the data request to the host;

通过宿主将所述数据响应发送给页面,根据所述数据响应对所述页面进行更新。The host sends the data response to the page, and the page is updated according to the data response.

其中,所述页面根据所述数据请求通过脚本完成所述数据请求之后,还包括:Wherein, after the page completes the data request through the script according to the data request, it also includes:

所述页面将所述数据请求的数据响应发送给所述页面对应的服务器,使所述页面对应的服务器根据所述数据响应进行页面的信息。The page sends the data response of the data request to the server corresponding to the page, so that the server corresponding to the page performs page information according to the data response.

其中,还包括:通过配置文件创建或扩展所述tab页,具体包括:Among them, it also includes: creating or extending the tab page through a configuration file, specifically including:

将所述tab页的配置信息配置在配置文件中;Configuring the configuration information of the tab page in the configuration file;

根据所述配置文件创建或扩展所述tab页。Create or extend the tab page according to the configuration file.

其中,还包括:更新所述tab页,具体包括:Among them, it also includes: updating the tab page, specifically including:

所述tab页对应的服务器获取最新tab页模板和与所述最新tab页模板对应的hash值,并将所述最新tab页模板和与所述最新tab页模板对应的hash值存储在所述tab页对应的服务器上;The server corresponding to the tab page obtains the latest tab page template and the hash value corresponding to the latest tab page template, and stores the latest tab page template and the hash value corresponding to the latest tab page template in the tab on the server corresponding to the page;

所述tab页对应的服务器接收所述客户端发送的tab页的更新请求,所述更新请求中携带与所述客户端的tab页模板对应的hash值;The server corresponding to the tab page receives the update request of the tab page sent by the client, and the update request carries a hash value corresponding to the tab page template of the client;

所述tab页对应的服务器判断与所述客户端的tab页模板对应的hash值和与所述最新tab页模板对应的hash值是否一致;The server corresponding to the tab page judges whether the hash value corresponding to the tab page template of the client is consistent with the hash value corresponding to the latest tab page template;

当判断不一致时,将所述tab页对应的服务器将所述最新tab页模板和与所述最新tab页模板对应的hash值发送到所述客户端,使所述客户端根据接收的所述最新tab页模板对本地的tab页进行更新。When it is judged inconsistent, the server corresponding to the tab page will send the latest tab page template and the hash value corresponding to the latest tab page template to the client, so that the client will The tab page template updates the local tab page.

本发明实施例提供一种客户端,包括:An embodiment of the present invention provides a client, including:

获取模块,用于获取本地的tab页,所述tab页中携带了页面的信息;The obtaining module is used to obtain a local tab page, and the tab page carries information of the page;

交互模块,用于当接收到访问所述页面的数据请求时,使页面根据所述数据请求通过脚本完成所述数据请求。The interaction module is configured to make the page complete the data request through a script according to the data request when receiving the data request for accessing the page.

其中,所述交互模块具体用于:Wherein, the interactive module is specifically used for:

根据所述数据请求获取所述页面的脚本,通过所述脚本完成所述数据请求;或Obtain the script of the page according to the data request, and complete the data request through the script; or

根据所述数据请求获取所述页面的脚本,所述脚本调用与本地的预设接口,通过预设接口完成所述数据请求。The script of the page is obtained according to the data request, the script calls a preset interface with the local, and the data request is completed through the preset interface.

其中,本地设置有宿主;所述交互模块还用于:Wherein, there is a host locally; the interaction module is also used for:

将本地的所述数据请求的数据响应发送给宿主;sending the local data response to the data request to the host;

通过宿主将所述数据响应发送给页面,根据所述数据响应对所述页面进行更新。The host sends the data response to the page, and the page is updated according to the data response.

其中,还包括:Among them, also include:

发送模块,用于将所述数据请求的数据响应发送给所述页面对应的服务器,使所述页面对应的服务器根据所述数据响应进行页面的信息。The sending module is configured to send the data response of the data request to the server corresponding to the page, so that the server corresponding to the page performs page information according to the data response.

其中,还包括:Among them, also include:

配置模块,用于通过配置文件创建或扩展所述tab页,具体用于:The configuration module is used to create or expand the tab page through configuration files, specifically for:

将所述tab页的配置信息配置在配置文件中;Configuring the configuration information of the tab page in the configuration file;

根据所述配置文件创建或扩展所述tab页。Create or extend the tab page according to the configuration file.

其中,还包括:Among them, also include:

更新模块,用于更新所述tab页,具体用于:The update module is used to update the tab page, specifically for:

向所述tab页对应的服务器发送tab页的更新请求,所述更新请求中携带与所述客户端的tab页模板对应的hash值,使所述tab页对应的服务器判断与所述客户端的tab页模板对应的hash值和与所述最新tab页模板对应的hash值是否一致;Send the update request of the tab page to the server corresponding to the tab page, the hash value corresponding to the tab page template of the client is carried in the update request, so that the server corresponding to the tab page judges that it is the same as the tab page of the client Whether the hash value corresponding to the template is consistent with the hash value corresponding to the latest tab page template;

当判断不一致时,接收所述tab页对应的服务器发送的所述最新tab页模板和与所述最新tab页模板对应的hash值,并根据接收的所述最新tab页模板对本地的tab页进行更新。When judging inconsistency, receive the latest tab page template sent by the server corresponding to the tab page and the hash value corresponding to the latest tab page template, and perform local tab page processing according to the latest tab page template received renew.

与现有技术相比,本发明具有以下优点:通过在客户端建立tab页,并将页面内嵌在tab页中,通过页面脚本与本地接口实现通过客户端直接对页面进行操作的功能,提高用户体验感。Compared with the prior art, the present invention has the following advantages: by establishing a tab page on the client, and embedding the page in the tab page, realizing the function of directly operating the page through the client through the page script and the local interface, improving User experience.

附图说明 Description of drawings

为了更清楚地说明本发明或现有技术中的技术方案,下面将对本发明或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the present invention or the technical solutions in the prior art, the accompanying drawings that need to be used in the description of the present invention or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only the present invention. For some embodiments of the invention, those skilled in the art can also obtain other drawings according to these drawings without paying creative efforts.

图1为本发明实施例中一种基于tab页的页面访问方法的流程图;Fig. 1 is a flow chart of a tab page-based page access method in an embodiment of the present invention;

图2为本发明实施例中一种基于tab页的页面访问方法的流程图;Fig. 2 is a flow chart of a tab page-based page access method in an embodiment of the present invention;

图3为本发明实施例中客户端和IE页面的数据交互的方法流程图;Fig. 3 is the method flowchart of the data interaction of client and IE page in the embodiment of the present invention;

图4为本发明实施例中Miniportal的结构示意图;Fig. 4 is the structural representation of Miniportal in the embodiment of the present invention;

图5为本发明实施例中脚本示例;Fig. 5 is a script example in the embodiment of the present invention;

图6为本发明实施例中tab页的扩展方法的流程图;Fig. 6 is the flowchart of the expansion method of tab page in the embodiment of the present invention;

图7为本发明实施例中tab页的升级方法的流程图;Fig. 7 is the flowchart of the upgrading method of tab page in the embodiment of the present invention;

图8为本发明实施例中的一种配置文件;Fig. 8 is a kind of configuration file in the embodiment of the present invention;

图9为本发明实施例中的一种配置文件;Fig. 9 is a kind of configuration file in the embodiment of the present invention;

图10为本发明实施例中一种客户端的结构示意图;FIG. 10 is a schematic structural diagram of a client in an embodiment of the present invention;

图11为本发明实施例中一种客户端的结构示意图。FIG. 11 is a schematic structural diagram of a client in an embodiment of the present invention.

具体实施方式 Detailed ways

下面将结合本发明中的附图,对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

如图1所示,为本发明实施例中一种基于tab页的页面访问方法,具体包括以下步骤:As shown in Figure 1, it is a tab page-based page access method in the embodiment of the present invention, which specifically includes the following steps:

步骤101、获取本地的tab页,所述tab页中携带了页面的信息;Step 101, obtain the local tab page, the information of the page is carried in the tab page;

步骤102、当接收到访问所述页面的数据请求时,使页面根据所述数据请求通过脚本完成所述数据请求。Step 102, when a data request for accessing the page is received, make the page complete the data request through a script according to the data request.

其中,本地设置有宿主;所述页面根据所述数据请求通过脚本完成所述数据请求之后,还包括:Wherein, a host is set locally; after the page completes the data request through a script according to the data request, it also includes:

将本地的所述数据请求的数据响应发送给宿主;sending the local data response to the data request to the host;

通过宿主将所述数据响应发送给页面,根据所述数据响应对所述页面进行更新。The host sends the data response to the page, and the page is updated according to the data response.

本发明实施例中的页面可以为各种浏览器的页面,如IE,chrome、firefox、safari等浏览器的页面,凡是将页面信息设置在客户端,并与客户端存在预设接口的页面均属于本发明的保护范围,以下将以IE页面为例进行说明,其中宿主为IEHOST,其他类型的页面不再赘述。The pages in the embodiments of the present invention can be pages of various browsers, such as pages of browsers such as IE, chrome, firefox, and safari. Belonging to the protection scope of the present invention, IE pages will be used as an example for illustration below, where the host is IEHOST, and other types of pages will not be described in detail.

如图2所示,为本发明实施例中一种基于tab页的页面访问方法,具体包括以下步骤:As shown in Figure 2, it is a tab page-based page access method in the embodiment of the present invention, which specifically includes the following steps:

步骤201、客户端接收获取tab页的请求,并获取tab页,所述tab页中携带了IE页面的信息和IEHOST。Step 201, the client receives a request for obtaining a tab page, and obtains the tab page, and the tab page carries the information of the IE page and IEHOST.

客户端接收用户登录即时通讯系统的请求,通过对用户的验证,使用户成功登录。用户处于登录状态时,通过客户端(本地)提供的接口,向客户端发送获取tab页的请求,客户端根据该请求获取tab页,所述tab页中内嵌了IE页面的信息。The client receives the user's request to log in to the instant messaging system, and through verification of the user, the user successfully logs in. When the user is in the login state, a request for obtaining a tab page is sent to the client through the interface provided by the client (local), and the client obtains the tab page according to the request, and the information of the IE page is embedded in the tab page.

为了在客户端,通过即时通讯软件对与之存在接口关系的IE页面进行访问(包括浏览,修改,上传等),即时通讯软件需要提供用户与该IE页面交互的框架和用于与本地进行交互的接口。其中,该框架以tab页的形式展现,并将该IE页面的信息内嵌在tab页中。该IE页面上设有自定义IE控件,是对OLE(ObjectLinkingandEmbedding,对象连接与嵌入)中原始IE标准控件的进一步封装,用于接收用户的对该IE页面的数据请求,例如:页面切换、上传数据等。如图3所示,而该IE页面与客户端(本地)的交互通过二者之间事先约定好的预设接口,而在该过程中,通过IEHOST(IE宿主,其实质为转发程序)完成一种数据转发和回调的功能,建立起自定义IE控件与页面脚本数据的相互调用的通道和回调机制,建立两者间交互的一个纽带。因此,当自定义IE控件通过自定义接口(如CallJavaScript)调用嵌入在IE页面的JS脚本时,此时若JS脚本在执行的过程中需要客户端的数据时,由IEHOST(IEHOST拥有自定义IE控件自身的对象句柄)完成转发作用,使JS脚本通过特定的JS程序调用和客户端事先约定好的预设接口(接口函数),从而完成相应的功能,其中接口函数可能存在返回值,可能不存在返回值。例如:当自定义IE控件接收到页面切换请求时,IEHOST转发IE页面的脚本调用本地中用于完成页面切换的预设接口,此时该接口从本地获取数据(如对应IE页面,对应脚本等),完成相应的页面切换请求,此时无需向接收数据请求的IE页面返回数据响应。而当自定义IE控件接收到截屏请求时,通过预设接口完成截屏功能后,IEHOST(IEHOST拥有自定义IE控件自身的对象句柄)需通过回调自定义IE控件向接收数据请求的IE页面返回数据响应,即所截图片。In order to access (including browsing, modifying, uploading, etc.) the IE page that has an interface relationship with it through the instant messaging software on the client side, the instant messaging software needs to provide a framework for the user to interact with the IE page and to interact with the local Interface. Wherein, the frame is displayed in the form of a tab page, and the information of the IE page is embedded in the tab page. The IE page is provided with a custom IE control, which is a further encapsulation of the original IE standard control in OLE (Object Linking and Embedding, Object Linking and Embedding), and is used to receive user data requests for the IE page, such as: page switching, uploading data etc. As shown in Figure 3, the interaction between the IE page and the client (local) is through the pre-agreed preset interface between the two, and in this process, it is completed through IEHOST (IE host, which is essentially a forwarding program) A function of data forwarding and callback, which establishes a channel and a callback mechanism for the mutual call between the custom IE control and the page script data, and establishes a link for the interaction between the two. Therefore, when a custom IE control calls a JS script embedded in an IE page through a custom interface (such as CallJavaScript), if the JS script needs data from the client during execution, IEHOST (IEHOST owns the custom IE control Its own object handle) to complete the forwarding function, so that the JS script can call the preset interface (interface function) agreed with the client through a specific JS program, so as to complete the corresponding function, and the interface function may have a return value or may not exist return value. For example: when the custom IE control receives a page switching request, IEHOST forwards the script of the IE page to call the preset interface in the local area for page switching. At this time, the interface obtains data from the local area (such as corresponding IE pages, corresponding scripts, etc. ), to complete the corresponding page switch request, at this time, there is no need to return a data response to the IE page that receives the data request. When the custom IE control receives a screen capture request, after completing the screen capture function through the preset interface, IEHOST (IEHOST has the object handle of the custom IE control itself) needs to return data to the IE page that received the data request by calling back the custom IE control The response is the screenshot.

上述tab页及其携带的IE页面的信息和IEHOST均被打包在即时通讯软件的安装文件中下载到本地,并随即时通讯软件安装而安装在本地。The information of the above tab page and the IE page it carries and the IEHOST are all packaged in the installation file of the instant messaging software and downloaded locally, and installed locally with the installation of the instant messaging software.

本发明实施中以该IE页面为该用户的博客页面为例进行说明,当然此IE页面不应视为对本发明实施例的限制,凡是与即时通讯系统存在预设接口的IE页面均属于本发明的保护范围。例如:与即时通讯系统存在预设接口的该用户的邮箱等等。In the implementation of the present invention, take the IE page as the user's blog page as an example to illustrate, certainly this IE page should not be regarded as the restriction to the embodiment of the present invention, all IE pages with preset interfaces with the instant messaging system all belong to the present invention scope of protection. For example: the user's mailbox with a preset interface with the instant messaging system, and the like.

具体地,如图4所示,用户登录即时通讯系统(如QQ)后,通过“QQ空间编辑器”该功能项,获取(如加载)图4中的左侧窗口,以下将该窗口简称为Miniportal(迷你门户),并将该Miniportal展现给用户。其中,IE页面的展现形式为将IE页面嵌入在Miniportal的tab页中。此时,客户端以tab页的形式提供一个框架,将IE页面内嵌在对应的tab页中,该tab页的更新可无需随客户端版本方便升级,后续新的tab页的功能扩展也相对容易。Specifically, as shown in Figure 4, after the user logs in to an instant messaging system (such as QQ), the function item "QQ Space Editor" is used to obtain (eg load) the left window in Figure 4, which is hereinafter referred to as Miniportal (mini portal), and present the Miniportal to the user. Wherein, the presentation form of the IE page is to embed the IE page in the tab page of the Miniportal. At this time, the client provides a framework in the form of tab pages, and embeds the IE pages in the corresponding tab pages. The update of the tab pages does not need to be easily upgraded with the client version, and the function expansion of subsequent new tab pages is also relatively easy.

步骤202、客户端通过tab页中内嵌的IE页面的自定义IE控件接收用户对该IE页面的操作请求。Step 202, the client receives the user's operation request on the IE page through the custom IE control of the IE page embedded in the tab page.

例如:当用户进行截屏时,通过tab页中内嵌的IE页面的“截屏”这一IE控件接收用户的截屏请求。For example: when the user takes a screen capture, the user's screen capture request is received through the IE control "screen capture" of the IE page embedded in the tab page.

步骤203、自定义IE控件通过自定义接口调用嵌入在IE页面的JS脚本。Step 203, the custom IE control calls the JS script embedded in the IE page through the custom interface.

预先,在自定义IE控件初始创建的时候,会将自身的对象句柄传给IEHOST(此时IEHOST能够识别自定义IE控件的对应操作),然后载入IE页面。In advance, when the custom IE control is initially created, it will pass its own object handle to IEHOST (at this time, IEHOST can recognize the corresponding operation of the custom IE control), and then load the IE page.

随后,自定义IE控件通过自定义接口(预设接口中的一种,如CallJavaScript)调用嵌入在IE页面的JS脚本,该脚本设置在本地,用于完成与操作请求对应的功能。例如:完成截图功能的脚本。Subsequently, the custom IE control calls the JS script embedded in the IE page through a custom interface (one of the preset interfaces, such as CallJavaScript), and the script is set locally to complete the function corresponding to the operation request. For example: a script that completes the screenshot function.

步骤204、JS脚本通过特定的JS程序调用和客户端事先约定好的用于截屏功能的预设接口,并由IEHOST转发。Step 204, the JS script invokes the preset interface for the screenshot function agreed with the client in advance through a specific JS program, and forwards it by IEHOST.

其中,预先设置JS脚本中特定的JS程序与客户端接口的对应关系。Wherein, the corresponding relationship between the specific JS program in the JS script and the client interface is preset.

其中,IE页面与客户端之间的数据交互通过IEHOST进行交互。当JS脚本需要客户端的数据时,通过特定的JS程序调用和客户端事先约定好的用于截屏功能的预设接口,并通过IEHOST转发。Among them, the data interaction between the IE page and the client is carried out through IEHOST. When the JS script needs the data of the client, it calls the preset interface for the screen capture function agreed by the client in advance through a specific JS program, and forwards it through IEHOST.

其中,脚本示例如图5所示。Wherein, a script example is shown in FIG. 5 .

需要说明的是,若此时JS脚本无需从客户端获取数据,则无需调用客户端的预设接口,且无需IEHOST的中转。It should be noted that if the JS script does not need to obtain data from the client at this time, there is no need to call the preset interface of the client, and there is no need for IEHOST to transfer.

步骤205、客户端通过预设接口,接收调用请求,并通过该接口函数在客户端实现“截屏”操作,并将该操作结果存储在本地。Step 205, the client receives the call request through the preset interface, and implements the "screen capture" operation on the client through the interface function, and stores the operation result locally.

步骤206、客户端将本地的操作结果作为数据响应发送给IEHOST。Step 206, the client sends the local operation result to IEHOST as a data response.

步骤207、IEHOST通过回调自定义IE控件,完成用户的截屏请求。Step 207, IEHOST completes the user's screen capture request by calling back the custom IE control.

需要说明的是,由于该IE页面内嵌在客户端的tab页中,此时该tab页除了支持IE原有功能外,还支持拖拽等自定义的功能,以便用户的操作,提高用户体验感。此外,用户通过Miniportal进行的操作与直接登录对应的IE页面进行的操作具有同样的功能与效果。It should be noted that since the IE page is embedded in the tab page of the client, in addition to supporting the original functions of IE, the tab page also supports custom functions such as drag and drop, so as to facilitate user operations and improve user experience . In addition, the operations performed by the user through the Miniportal have the same functions and effects as the operations performed by directly logging in to the corresponding IE page.

如图6所示,为本发明实施例中tab页的扩展方法,具体包括以下步骤:As shown in Figure 6, it is the expansion method of the tab page in the embodiment of the present invention, which specifically includes the following steps:

步骤501、通过配置文件配置tab页的配置信息。Step 501, configure the configuration information of the tab page through the configuration file.

对于tab页,决定其版本的配置信息配置在配置文件中。该配置信息包括:tab页的各种功能设置等配置信息,例如:发表日志、上传照片和截图等。该配置信息携带在即时通讯软件的安装文件中下载到本地。For the tab page, the configuration information that determines its version is configured in the configuration file. The configuration information includes: configuration information such as various function settings of the tab page, such as publishing logs, uploading photos and screenshots, and the like. The configuration information is carried in the installation file of the instant messaging software and downloaded locally.

步骤502、当Miniportal创建时,读取该配置文件。Step 502, when the Miniportal is created, read the configuration file.

步骤503、根据读取的配置文件,创建tab页。Step 503, create a tab page according to the read configuration file.

如图7所示,为本发明实施例中tab页的升级方法,具体包括以下步骤:As shown in Figure 7, it is the method for upgrading the tab page in the embodiment of the present invention, which specifically includes the following steps:

步骤601、将每一个tab页的模板打包成一个package包(封装包),并生成对应的hash值,并部署在相应的服务器上。Step 601, pack the template of each tab page into a package (encapsulation package), generate a corresponding hash value, and deploy it on a corresponding server.

其中,相应的服务器可为package服务器,或其他提供相同功能的服务器。Wherein, the corresponding server may be a package server, or other servers providing the same function.

步骤602、当客户端每次打开Miniportal时,触发相应的更新逻辑,完成更新。Step 602, when the client opens the Miniportal each time, the corresponding update logic is triggered to complete the update.

具体相应的更新策略如下:The corresponding update strategy is as follows:

(1)客户端向package服务器发送更新请求,所述更新请求中携带与会带上本地tab页模板的package对应的hash值。(1) The client sends an update request to the package server, and the update request carries a hash value corresponding to the package that will carry the local tab page template.

(2)package服务器接收客户端发送的与客户端tab页模板的package对应的hash值,(2) The package server receives the hash value corresponding to the package of the client tab page template sent by the client,

(3)package服务器判断与客户端tab页模板的package对应的hash值,与客户端对应版本中最新的tab页模板的package对应的hash值是否一致。(3) The package server judges whether the hash value corresponding to the package of the tab page template of the client is consistent with the hash value corresponding to the package of the latest tab page template in the corresponding version of the client.

当判断该hash值不一致时,返回最新的package包,转到步骤(4);When it is judged that the hash value is inconsistent, return to the latest package package and go to step (4);

当判断该hash值一致时,返回错误,并标识package包没有更新。When it is judged that the hash value is consistent, an error is returned and the package package is not updated.

其中,关于版本问题详见下述说明。Among them, see the following instructions for details on version issues.

(4)客户端获取package包后对其进行解压,获取配置文件,并根据配置文件中的配置信息,更新Miniportal。(4) After obtaining the package, the client decompresses it, obtains the configuration file, and updates the Miniportal according to the configuration information in the configuration file.

优选地,上述package包并不仅限于单一一个package包,其中每一个tab页对应一个package包,且所有的tab页还存在共用的package包。Preferably, the above-mentioned package is not limited to a single package, and each tab page corresponds to a package, and all tab pages also have a common package.

当客户端接收到package服务器发送的package包后,需要将该最新的package包替换原有的package包,具体更新过程如下:When the client receives the package package sent by the package server, it needs to replace the original package package with the latest package package. The specific update process is as follows:

(1)首先客户端在本地会打包一份最新的packge包。(1) First, the client will package a copy of the latest packge locally.

(2)在随后的使用中,客户端每次打开Miniportal都会到package服务器去查询package包有无更新。(2) In the subsequent use, every time the client opens Miniportal, it will go to the package server to check whether the package has been updated.

(3)如果有更新,则下载最新的包到%appdata%\tencent\qq\misc\com.tencent.qzone\zippackage目录下,文件命名按照解析res标签的name来命名。(3) If there is an update, download the latest package to the %appdata%\tencent\qq\misc\com.tencent.qzone\zippackage directory, and the file is named according to the name of the parsed res tag.

(4)其次,将解压zippackage文件夹下的相应压缩包解压到命名为qzonepackage的文件夹下,用于存储即时通讯系统(QQ)中Miniportal的相关文件,例如下载blogpackage包(多种封装包的一种,如所有tab页共用的package包)到zippacage文件夹后,在qzonepackage文件夹下创建对应的文件夹blog.temp,把blog包中的文件解压到blog.temp目录中。解压成功后,把blog.temp命名为blog.new。(4) Secondly, decompress the corresponding compressed package under the zippackage folder to the folder named qzonepackage, which is used to store the relevant files of the Miniportal in the instant messaging system (QQ), such as downloading the blogpackage package (multiple packages) One, such as the package shared by all tab pages) to the zippackage folder, create a corresponding folder blog.temp under the qzonepackage folder, and decompress the files in the blog package to the blog.temp directory. After successful decompression, name blog.temp as blog.new.

(5)当用户关闭minportal时,客户端检测qzonepackage目录下有没有下载了但是没有替换的文件夹。如果有的话,替换最新的文件夹,例如:存在新下载的blogpackage包,并在qzonepackage目录中以blog.new文件夹的形式存储,则把blog文件夹删除,重命名blog.new为blog。(5) When the user closes the minportal, the client checks whether there is a downloaded but not replaced folder in the qzonepackage directory. If there is, replace the latest folder, for example: if there is a newly downloaded blogpackage package, and it is stored in the form of blog.new folder in the qzonepackage directory, then delete the blog folder and rename blog.new to blog.

上述Package存在版本控制的问题,即客户端的即时通讯版本和package的版本对应问题。例如:当发布出去的页面需要调用客户端新的接口的时候,并且页面更新后发布到package服务器上;但是客户端只能随版本更新接口。此时,如果老的客户端版本更新到最新的package的话,由于老版本没有提供新的接口,所以会出现脚本错误和功能不可用的问题。The above-mentioned Package has a version control problem, that is, there is a corresponding problem between the instant messaging version of the client and the version of the package. For example: when the published page needs to call the new interface of the client, and the page is updated and published to the package server; but the client can only update the interface with the version. At this time, if the old client version is updated to the latest package, script errors and unavailable functions will occur because the old version does not provide new interfaces.

为了解决上述问题,就需要package的更新能够做到版本控制。具体控制的方法是利用如图8所示的配置文件。In order to solve the above problems, it is necessary to implement version control for package updates. The specific control method is to use the configuration file shown in Figure 8.

Package描述了客户端到服务器去拉取的包的信息:下述所有字段为必须配置项:Package describes the information of the package pulled from the client to the server: all the following fields are mandatory configuration items:

file字段描述了拉取的文件名;The file field describes the pulled file name;

name字段描述了文件解压到本地的文件夹名;The name field describes the name of the local folder where the file is decompressed;

type表示该包是公用的还是私有的;type indicates whether the package is public or private;

minversion表示该file对应的package包所适用的最小版本号;minversion indicates the minimum version number applicable to the package corresponding to the file;

maxversion表示该file对应的package包所适用的最大版本号。如该值为-1,则表示该包无最大版本号限制。maxversion indicates the maximum version number applicable to the package corresponding to the file. If the value is -1, it means that the package has no maximum version number limit.

其中,minversion和maxversion的应用如下:如果出现blog页面更新接口的问题,QQ1.45版本客户端为其提供新的接口QQNewInterface。此时只需将调用新接口的脚本和页面打包为blog2,并修改配置为如图9所示。Among them, the application of minversion and maxversion is as follows: if there is a problem with the update interface of the blog page, the QQ1.45 version client will provide it with a new interface QQNewInterface. At this point, you only need to package the script and page calling the new interface as blog2, and modify the configuration as shown in Figure 9.

此时协议号2569版本,只会到服务器拉取文件名blog的包;而协议号2581版本及以上版本只会到服务器拉取文件名为blog2的包。At this time, the protocol version 2569 will only fetch the package with the file name blog from the server; while the protocol version 2581 and above will only fetch the package with the file name blog2 from the server.

本发明实施例提供一种客户端,如图10所示,客户端900包括:An embodiment of the present invention provides a client. As shown in FIG. 10, the client 900 includes:

获取模块910,用于获取本地的tab页,所述tab页中携带了页面的信息;Obtaining module 910, configured to obtain a local tab page, where information of the page is carried in the tab page;

交互模块920,用于当接收到访问所述页面的数据请求时,使页面根据所述数据请求通过脚本完成所述数据请求。The interaction module 920 is configured to, when receiving a data request for accessing the page, make the page complete the data request through a script according to the data request.

其中,交互模块920具体用于:Among them, the interaction module 920 is specifically used for:

根据所述数据请求获取所述页面的脚本,通过所述脚本完成所述数据请求;或Obtain the script of the page according to the data request, and complete the data request through the script; or

根据所述数据请求获取所述页面的脚本,所述脚本调用与本地的预设接口,通过预设接口完成所述数据请求。The script of the page is obtained according to the data request, the script calls a preset interface with the local, and the data request is completed through the preset interface.

其中,本地设置有宿主;交互模块920还用于:Wherein, the local setting has a host; the interaction module 920 is also used for:

将本地的所述数据请求的数据响应发送给宿主;sending the local data response to the data request to the host;

通过宿主将所述数据响应发送给页面,根据所述数据响应对所述页面进行更新。The host sends the data response to the page, and the page is updated according to the data response.

其中,如图11所示,客户端900还包括:Wherein, as shown in Figure 11, the client 900 also includes:

发送模块930,用于将所述数据请求的数据响应发送给所述页面对应的服务器,使所述页面对应的服务器根据所述数据响应进行页面的信息。The sending module 930 is configured to send the data response of the data request to the server corresponding to the page, so that the server corresponding to the page performs page information according to the data response.

其中,还包括:Among them, also include:

配置模块940,用于通过配置文件创建或扩展所述tab页,具体用于:The configuration module 940 is configured to create or expand the tab page through a configuration file, specifically for:

将所述tab页的配置信息配置在配置文件中;Configuring the configuration information of the tab page in the configuration file;

根据所述配置文件创建或扩展所述tab页。Create or extend the tab page according to the configuration file.

其中,还包括:Among them, also include:

更新模块950,用于更新所述tab页,具体用于:An updating module 950, configured to update the tab page, specifically for:

向所述tab页对应的服务器发送tab页的更新请求,所述更新请求中携带与所述客户端的tab页模板对应的hash值,使所述tab页对应的服务器判断与所述客户端的tab页模板对应的hash值和与所述最新tab页模板对应的hash值是否一致;Send the update request of the tab page to the server corresponding to the tab page, the hash value corresponding to the tab page template of the client is carried in the update request, so that the server corresponding to the tab page judges that it is the same as the tab page of the client Whether the hash value corresponding to the template is consistent with the hash value corresponding to the latest tab page template;

当判断不一致时,接收所述tab页对应的服务器发送的所述最新tab页模板和与所述最新tab页模板对应的hash值,并根据接收的所述最新tab页模板对本地的tab页进行更新。When judging inconsistency, receive the latest tab page template sent by the server corresponding to the tab page and the hash value corresponding to the latest tab page template, and perform local tab page processing according to the latest tab page template received renew.

本发明具有以下优点:通过在客户端建立tab页,并将页面内嵌在tab页中,通过页面脚本与本地接口实现通过客户端直接对页面进行操作的功能,提高用户体验感。The invention has the following advantages: by establishing a tab page on the client and embedding the page in the tab page, the function of directly operating the page through the client is realized through the page script and the local interface, thereby improving user experience.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端设备(可以是手机,个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is a better implementation Way. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to make a A terminal device (which may be a mobile phone, a personal computer, a server, or a network device, etc.) executes the methods described in various embodiments of the present invention.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that, for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.

本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以集成于一体,也可以分离部署;可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description in the embodiment, or can be located in one or more devices different from the embodiment according to corresponding changes. The modules in the above embodiments can be integrated or deployed separately; they can be combined into one module, or further split into multiple sub-modules.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

以上公开的仅为本发明的几个具体实施例,但是,本发明并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。The above disclosures are only a few specific embodiments of the present invention, however, the present invention is not limited thereto, and any changes conceivable by those skilled in the art shall fall within the protection scope of the present invention.

Claims (6)

1., based on a page access method for tab page, it is characterized in that, comprising:
Obtain local tab page, in described tab page, carry the information of the page; Wherein, the framework mutual with the IE page that provide for MSN of described tab page;
When receiving the request of data of accessing the described page, the page is made to complete described request of data according to described request of data by script;
Wherein, the described page is provided with self-defined control, for receiving described request of data;
Wherein, the described page completes described request of data according to described request of data by script and comprises:
Obtain the script of the described page according to described request of data, complete described request of data by described script; Or
Obtain the script of the described page according to described request of data, described script calls the preset interface with this locality, completes described request of data by preset interface;
Created by configuration file or expand described tab page;
Wherein, describedly created by configuration file or expand described tab page, specifically comprising:
The configuration information of described tab page is configured in configuration file;
Create according to described configuration file or expand described tab page;
Wherein, described method also comprises: upgrade described tab page, specifically comprise:
Server corresponding to described tab page obtains up-to-date tab page template and the hash value corresponding with described up-to-date tab page template, and is stored on server corresponding to described tab page by described up-to-date tab page template and the hash value corresponding with described up-to-date tab page template;
The update request of the tab page of the server receives client transmission that described tab page is corresponding, carries the hash value corresponding with the tab page template of described client in described update request;
Server corresponding to described tab page judge the hash value corresponding with the tab page template of described client and the hash value corresponding with described up-to-date tab page template whether consistent;
When judging inconsistent, described up-to-date tab page template and the hash value corresponding with described up-to-date tab page template are sent to described client by server corresponding for described tab page, described client is upgraded according to the tab page of described up-to-date tab page template to this locality received.
2. the method for claim 1, is characterized in that, this locality is provided with host; The described page also comprises after completing described request of data according to described request of data by script:
The response of the data of the described request of data of this locality is sent to host;
By host, described data response is sent to the page, according to described data response, the described page is upgraded.
3. the method according to any one of claim 1 to 2, is characterized in that, the described page also comprises after completing described request of data according to described request of data by script:
The response of the data of described request of data is sent to the server that the described page is corresponding by the described page, makes the server that the described page is corresponding respond the information of carrying out the page according to described data.
4. a client, is characterized in that, comprising:
Acquisition module, for obtaining local tab page, carries the information of the page in described tab page;
Interactive module, for when receiving the request of data of accessing the described page, makes the page complete described request of data according to described request of data by script; Wherein, the described page is provided with self-defined control, for receiving described request of data;
Wherein, described interactive module specifically for:
Obtain the script of the described page according to described request of data, complete described request of data by described script; Or
Obtain the script of the described page according to described request of data, described script calls the preset interface with this locality, completes described request of data by preset interface,
Configuration module, for being created by configuration file or expanding described tab page,
Wherein, described configuration module, specifically for:
The configuration information of described tab page is configured in configuration file;
Create according to described configuration file or expand described tab page;
Wherein, update module, for upgrading described tab page, specifically for:
The update request of tab page is sent to the server that described tab page is corresponding, carry the hash value corresponding with the tab page template of described client in described update request, the server that makes described tab page corresponding judge the hash value corresponding with the tab page template of described client and the hash value corresponding with up-to-date tab page template whether consistent;
When judging inconsistent, receiving the described up-to-date tab page template of server transmission corresponding to described tab page and the hash value corresponding with described up-to-date tab page template, and upgrading according to the tab page of described up-to-date tab page template to this locality received.
5. client as claimed in claim 4, it is characterized in that, this locality is provided with host; Described interactive module also for:
The response of the data of the described request of data of this locality is sent to host;
By host, described data response is sent to the page, according to described data response, the described page is upgraded.
6. the client according to any one of claim 4 to 5, is characterized in that, also comprises:
Sending module, for the response of the data of described request of data is sent to the server that the described page is corresponding, makes the server that the described page is corresponding respond the information of carrying out the page according to described data.
CN201010000960.XA 2010-01-21 2010-01-21 A tab-based page access method and device Expired - Fee Related CN102137058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010000960.XA CN102137058B (en) 2010-01-21 2010-01-21 A tab-based page access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010000960.XA CN102137058B (en) 2010-01-21 2010-01-21 A tab-based page access method and device

Publications (2)

Publication Number Publication Date
CN102137058A CN102137058A (en) 2011-07-27
CN102137058B true CN102137058B (en) 2015-12-02

Family

ID=44296717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010000960.XA Expired - Fee Related CN102137058B (en) 2010-01-21 2010-01-21 A tab-based page access method and device

Country Status (1)

Country Link
CN (1) CN102137058B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888408B (en) * 2012-12-19 2016-03-09 腾讯科技(深圳)有限公司 Upload the data to method and the device of social platform
CN103914286B (en) * 2012-12-31 2017-03-22 北京新媒传信科技有限公司 Management method and manager for tab page in user interface
CN104113464B (en) * 2013-04-16 2017-11-10 腾讯科技(深圳)有限公司 Exchange method, device and system based on instant messaging prompting

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905697A (en) * 2006-06-08 2007-01-31 中国移动通信集团公司 Cell phone map mobile terminal platform embedded in mobile terminal
CN101178716A (en) * 2007-11-19 2008-05-14 优视动景(北京)技术服务有限公司 Method for Microbrowser to Process JavaScript and Microbrowser
CN101431713A (en) * 2007-11-09 2009-05-13 中国移动通信集团公司 Resource access method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905697A (en) * 2006-06-08 2007-01-31 中国移动通信集团公司 Cell phone map mobile terminal platform embedded in mobile terminal
CN101431713A (en) * 2007-11-09 2009-05-13 中国移动通信集团公司 Resource access method and device
CN101178716A (en) * 2007-11-19 2008-05-14 优视动景(北京)技术服务有限公司 Method for Microbrowser to Process JavaScript and Microbrowser

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用自主设计的内嵌式ASP实现交互式用户界面;李娜,刘明,傅君眉;《计算机应用研究》;20041130;正文第224页第2栏倒数第1-5行、第225页第2栏倒数第1-5、11-12行、第269页第1栏倒数第5-20行及图2 *

Also Published As

Publication number Publication date
CN102137058A (en) 2011-07-27

Similar Documents

Publication Publication Date Title
CN102129378B (en) A kind of software menu updating method and device
US20210289045A1 (en) Offline client replay and sync
CN111309336B (en) Deployment method and device of distributed application
EP2806357A1 (en) Method and communication device for updating a web application
JP2019506654A (en) Page jump method and apparatus
US10877825B2 (en) System for offline object based storage and mocking of rest responses
CN106936633B (en) Application installation package manufacturing method and server
US9565148B2 (en) Method and apparatus for processing micro web log messages
CN113360160A (en) Method and device for deploying application, electronic equipment and storage medium
CN110580174B (en) Application component generation method, server and terminal
WO2017092458A1 (en) Mobile terminal browser file transmission method and mobile terminal
CN106598673A (en) Application program upgrading method and system
CN108024136A (en) Load method, smart television and the computer-readable recording medium of user interface
CN113094211B (en) Backup data processing method and device
CN104699515B (en) A kind of upgrade method and intelligent terminal based on Android operation system
CN104219295A (en) Server-side configuration based information display method and system for mobile equipment
CN105760183A (en) File processing method, device and communication system
CN104834534A (en) Application program function extension method, device and system
CN111859223A (en) A kind of web page data retrieval method, device and storage medium based on mobile middle station
CN113641582B (en) Hybrid mode mobile application debugging method and system
CN102137058B (en) A tab-based page access method and device
CN106713395A (en) Data downloading method and apparatus
CN114115969A (en) Hot updating method and system based on real Native
US20200356720A1 (en) Rendering Based on a Document Object Model
CN102750285A (en) System and method for providing offline browsing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151202