Title of Invention | METHOD AND APPARATUS FOR SIMULATING IM CLIENT INTERFACE ON THE BASIS OF WEB PAGE |
---|---|
Abstract | Abstract A method for simulating an Instant Messaging, IM, client interface on the basis of a web page includes: simulating a tab of a main interface and an active window of client IM software with divs of Hypertext Marker Language, HTML; detecting an action of an input device; and performing operations to the tab of the main interface and / or the active window of the client IM software according to the detected action of the input device. Where a div for simulating the tab is called a tab div, a div for simulating the active window is called an active window div, tabs of the main interface simulated by tab divs are arranged one by one according to a sequence, active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div corresponds to a tab div. |
Full Text | METHOD AND APPARATUS FOR SIMULATING IM CLIENT INTERFACE ON THE BASIS OF WEB PAGE Field of the Invention The present invention relates to a field of computer technology, and particularly to a method and apparatus for simulating an Instant Messaging (IM) client interface on the basis of a web page. Background of the Invention By far, IM software has developed for a long time, and has been approbated by most of users and has become a necessary software tool. The !M software is not only used in daily leisure and entertainment, but also widely used in work of the users. Therefore, the users have higher requirements for the usability, stability and security of the IM software. In some circumstances, a user needs to use the IM software because it can be used conveniently, but is unable to or inconvenient to mstall the IM software. In such a case, an IM chat can be implemented through web access, so that the user can enjoy the convenience of the IM without installing the IM software. In order to perform the IM chat using the web page, the user must be familiar with how to use a web page chat tool firstly. Although the client IM software has been updated continuously, the basic use habit and operation style of the client IM software maintain a relatively fixed mode, If the use habit and operation style of the web-based chat tool differ enormously from those of the client IM software used by the user usually, it lakes a long time for the user to get familiar with the web page chat tool, which brings inconvenience to the user. Summary of the Invention In view of the above, embodiments of the present invention provide a method and apparatus for simulating an IM client interface on the basis of a web page, which can provide a web page chat loo! that is similar to client IM software in a use habit and an operation style. An embodiment of the present invention provides a method for simulating an IM client interface on the basis of a web page including: simulating a tab of a main interface and an active window of client IM software with divs of Hypertext Marker Language, HTML; detecting an action of an input device; and performing operations to the tab of the main interface and 1 or the aclive window of the client IM software according to the detected action of (he input device; wherein a div for simulating the tab is a tab div, a div for simulating the active window is an active window div, tabs of the main interface simulated by tab divs are arranged one by one according to a sequence, active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div corresponds to a tab div. Another embodiment of the present invention provides an apparatus for simulating an IM client interface on the basis of a web page, including: an input device action detection module, adapted to detect an action of an input device; a main interface simulation module, adapted to simulate a tab of a main interface of client iM software with a tab div, perform operations to the simulated tab of the main interface according to the action of the input device detected by the input device action detection module, wherein tabs of the main interface simulated by tab divs are arranged one by one according to a sequence; an active window simulation module, adapted to simulate an active window of the client !M software with an active window div, and perform operations to the simulated active window according to the action of the input device detected by the input device action detection module; wherein active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div con'esponds to a tab div of the main interface simulation module. As can be seen from the technical solution described above, an interface for simulating the client IM software on the basis of a web page looks and operates like client IM software, and the experience of the interface is similar to that of the client, which provides the user with a better experience. Brief Description of the Drawings Figure 1 is a schematic diagram illustrating an interface of conventional client IM software. Figure 2 is a schematic diagram illustrating a web-based interface according to an embodiment of the present invention. Figure 3 is a flow chart illustrating switch between active windows according to a first embodiment of the present invention. Figure 4 is a flow chart illustrating a process of adding of a new tab according to a second embodiment of the present invention. Figure 5 is a flow chart illustrating a process of page turning of tabs according to a third embodiment of the present invention. Figure 6 is a schematic diagram illustrating an apparatus for simulating an IM client interface on the basis of a web page according to a fourth embodiment of the present invention. Detailed Deseription of the Invention The common client IM software is firstly described before the solution provided by embodiments of the present invention is described. For instance. Figure 1 illustates an interface of common client IM software. The interface mainly includes a main interface and an active window. The main interface is a main display interface of the client IM software and includes one or more tabs. When a certain tab is clicked by a user via a mouse, contents of the clicked tab are displayed; while contents of the other tabs are hidden except their titles. As illustrated in Figure I, contents of tab 3 are displayed, while contents of the other tabs are hidden. Each tab corresponds to a category of chat objects; for instance, conlent.s of corresponding labs "good friend", "family", "group" and "blacklist" are lists of contact persons of corresponding categories. When a contact person {usually represented in a mode of an icon and characters) in contents of a currently di.sp!ayed tab is clicked by the user, an active window by which the user chats with the contact person is popped up. The user can input chat information in the active window and send the chat information to the contact person; and can also see chat information sent from the contact person via the aclive window. The user can also define new tabs by itself in oidei' to sort the contact persons more finely. Locations of the main interface and the active window shown in Figure I are merely examples, the main interface and Ihe active window may be shown at any locations of the client display interface. Current client [M software not only provides basic chat functions, bu( also provides other functions, such as file transfer, music broadcast and advertisement push, which are also realized on the basis of the interface shown in Figure I. In order to create an interface similar to that shown in Figure I on the basis of the web page, an embodiment of the present invention mainly adopts Hypertext Marker Language (HTML) and browser javascript technologies, and uses HTML div elements (i.e. divs) to simulate the tabs of the main interface and the aclive window. Div elements are elements used to provide the contents of HTML block-level with a structure and background. All the contents between the start flag and end flag of the Div form a corresponding tab of the main interface. Characteristics of elements contained in the div are controlled by attributes of tab divs or by formatting the HTML block-level with a style sheet. For convenience, the div used to simulate a tab is called a tab div, and the div used to simulate the aclive window is called an active window div hereinafter. The active window div provides a corresponding interface on which chat contents are input by the user or chat contents sent from other clients are displayed.According to an embodiment of the present application, a method for simulating an Instant Messaging, IM, client interface on the basis of a web page includes: simulating a tab of a main interface and an active window of client IM software with divs of Hypertext Marker Language, HTML; detecting an action of an input device; and performing operations to the tab of the main interface and / or the active window of the client IM software according to the delected action of the input device. Where a div for simulating the tab is a tab div, a div for simulating the active window is an active window div, labs of the main interface simulated by tab divs are ari'anged one by one according to a sequence, active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div conesponds to a lab div. Picferably, the input device may be a mouse, and the action is a mouse action; or the input device may a keyboard, and the action is a keyboard action. There may be other input device besides the mouse and the keyboard. Preferably, the iequence is a sequence from the top down or from the left to the right. In the following embodiments, the mouss is taken as an example to explain the implementation of the solution of the present application. A first embodiment of the present invention illustrates the switch between active windows. As shown in Figure 2, the left side shows the main interface formed by multiple tabs simulated by tab divs. Each tab corresponds lo a div layer. The tabs are arranged one by one from the top down according to a manner similar to that of the tabs in the main interface in Figure 1. The tabs can also be arranged in other manners according to the use habit of the user, such as be arranged one by one from the left to the right. The tabs include two categories. The first category includes currently displayed tabs, titles and contents of which are displayed on the main interface, Other tabs which do not belong to the first category belong to the second category, i.e. tabs which are not shown currently. Only titles of the lab.s of the second category are displayed, and their contents are hidden. The right side of Figure 2 shows the active windows formed by multiple overlapped active window divs. Each active window div may have the same size, shape and location, and correspond to a tab div respectively. If the user clicks a tab div in the main interface with the mouse, the display attribute of the active window div corresponding to the clicked tab div is set as "displayed", while the display auribuics of Llic olhci iicUvc window divs arc set as "hidden". Con.sequent]y, although the active windows are formed by multiple overlapped active window divs, only the active window div of which the display attribute is set as "displayed" can he seen, so that the switch between tab pages are realized. The process of the switch between the active windows according to this embodiment is illustrated in Figure 3, which is described below. Block 301: Mouse action is detected. If it is detected that a tab of the main interface is clicked by a key of a mouse such as a left key, Block 302 is performed; otherwise, Block 301 is performed again. Block 302: A tab div corresponding to the tab clicked by the left key of the mouse is determined. The attribute of an active window div corresponding to the tab div is set as "displayed", while the attributes of the other active window divs are set as •'hidden". In a second embodiment of the present invention, adding a tab page is realized. Because each lab conespond.s to a tab div, in order to add a lab of the main interface on the left side of Figure 2, it is only necessary to dynamically add a div layer in a div container of the original lab page by operating a DOM element with javascript and to add a corresponding div layer functioning as an active window. The process of adding the tab page according to this embodiment is illustrated in Figure 4, which is described below. Block 401: Mouse action is delected. If it is detected that a tab of the main interface is clicked by the key of a mouse such as a right key, Block 402 is performed; otherwise, Block 401 is performed again. Block 402: A menu such as a right key menu is displayed, which at least includes an option for adding a tab. If the option for adding a tab is selected by a mouse action. Block 403 is performed; otherwise, the current process is terminated. Block 403: A DOM element is operated with the javascript, a tab div is added and a corresponding div layer acting as an active window div is added. Block 404: The newly added tab div is named according to the u.ser's input. In a thirdcmbodiment of the present invention, the display and turning of a tab is realized. A model is created by a Model View Controller (MVC) technology. Each time a tab is added or removed, the lab is added into a model or removed from a model firstly, and (hen the model is drawn via a display control module. The MVC is a macroscopical design mode proposed to obtain a better system structure; the "Model" represents a mode] layer of the system, the "View" is a display layer of the model, and the "Controller" is in charge of controlling the workflow of the program. The use of the MVC can make the arrangement of the system clearer, which can reduce coupling of each part of the system. In this embodiment, the model is in the form of a queue, in which a tab may be added or removed. In order to prevent user's misoperation or resource abuse, the maximum number of the tabs may be set. Certainly, the number of the tabs may not be limited. As shown in Figure 5, two pointers, a View_start pointer and a View_end pointer, are used to indicate a view to he displayed in the model, i.e. elements in the view. In order to turn a page, it is merely required to make Vicwstart pointer and View_end pointer respectively point to the start and the end of display contents corresponding to a tab to be displayed, i.e. the display contents of a tab div corresponding to the tab of the main interface. Thus, in the view, the contents of the tab of the main interface are displayed under the title of the lab of the main interface, while only titles of the other tabs are displayed. Therefore, the effect of turning a tab is achieved. According to an embodiment of the present application, an apparatus for simulating an Instant Messaging, IM, client interface on the basis of a web page includes: an input device action detection module, a main interface simulation module and an active window simulation module. The input device action detection module is adapted to detect an action of an input device; the main interface simulation module is adapted to simulate a tab of a main interface of client IM software with a tab div, perform operalion.s !o the simulated tab of the main interface according to the action of the input device detected by the input device action detection moduie, where tabs of the main interface simulated by tab divs are arranged one by one according to a sequence; and the active window simulation module is adapted to simulate an active window of the client IM software with an active window div, and perforin operations 10 the .simulated active window according to the action of the input device detected by the input device action dctection module; wherein active windows simulated by active window divs arc arranged to be overlapped with each other, and each active window div corresponds to a tab div of the main interface simulation module. Preferably, the input device action detection module may be a mouse action detection module, and is adapted to detect a mouse action; or the input device action detection module may be a keyboard action detection module, and is adapted to detect a keyboard action. In the following embodiment, the mouse action detection module is taken as an example to explain the apparatus. A fourth embodiment of the present invention provides an apparatus for simulating an IM client interface on the basis of a web page, and the structure of the apparatus is illustrated in Figure 6. As shown in Figure 6, the apparatus includes: a mouse action detection module 610, main interface simulation module 620, and an active window simulation module 630, The mouse action detection module 6(0 is adapted to detect a mouse click action. The main interface simulation module 620 is adapted to simulate a tab of a main interface of client IM software with a tab div. Tabs of the main interface simulated by tab divs are arranged one by one from the top down. The tabs of the main interface can also be arranged in other manners according to the use habit of a user, for example, arranged from the left to the right. The main interface simulation module 620 is further adapted to perform operations to all the simulated tabs of the main interface according to the mouse click action detected by the mouse action detection module 610. The operations include: adding or removing a tab of the main interface, and turning a tab of the main interface. The active window simulation module 630 is adapted to simulate an active window of the client IM software with an active window div. Active windows simulated by active window divs are arranged to be overlapped with each other. The multiple active window divs are also arranged to be overlapped with each other. Each active window div correspond.s lo a tab div of the main interface simulation module 620. The active window simulation module 630 further performs corresponding operations to all the simulated active windows according to the mouse click action detected by the mouse action detection module 610. The operations include displaying or hiding the active windows. The main interface simulation module 620 includes: a switch unit 621. a tab adding and removing unit 622, and a page turning unit 623. The switch unit 621 is adapted to send, when the mouse action detection module 610 detects that the simulated tab of the main interface is clicked by a left key of a mouse, an instruction to display an active window corresponding to a tab of the main interface. The tab adding and removing unit 622 is adapted lo add or remove a tab div when the mouse action detection module 610 detects that a simul ated tab of the main interface is clicked by a key such as a right key of the mouse and when an option for adding or removing a tab is selected. The page turning unit 623 is adapted to display all contents of a tab of the main interface when the mouse action detection module 610 detects that the simulated tab of the main interface is clicked by the left key of the mouse, and to display only titles of the other tabs of the main interface. Preferably, the page turning unit 623 includes two pointers, View start pointer and View_end pointer. If contents of a tab of the main interface are to be displayed, the View_start pointer and Viewend pointer are made by the page turning unit 623 respectively point to the start and the end of contents of a tab div corresponding to a tab clicked by the left key of the mouse. The contents of the tab div as the contents to be displayed are displayed under the title of the clicked tab of the main interface. Preferably, the active window simulation module 630 includes: an active window adding and removing unit 631 and a display unit 632. The active window adding and removing unit 631 is adapted lo create or remove a corresponding active window div when a tab div is added or removed by the tab adding and removing imir 622, The display unit 632 is adapted lo set an attribute of an active window div corresponding to the instruction as "displayed", and set allributes of other active window divs as "hidden" when receiving the instruction to display the active window sent from ihc main interface simulalion module 620. In embodiments of the present invention, the HTML and javascript technologies, and the MVC mode are used, so that the experience of the interface for .simulating (he client IM software on the basis of a web page is similar to that of the client, which provides the user with a better experience. According to the description of the embodiments described above, a person skilled in the art of the present invention can clearly understand that embodiments of the present invention may be implemented by software plus a necessary hardware platform. At this point, all or part of the solution of the embodiments of the present invention confribnting to the background of the presentl invention may be implemented by software products. The software products may be saved in storage media, such as ROM/RAM, disk and Compact Disc (CD), and include instructions to make a computer device (may be a personal computer (PC), a server or a network device, etc.) execute the method disclosed in each embodiment of the present invention or in part of the embodiments. The above are only preferred embodiments of the present invention, and are not for use in limiting the present invention. Any modification, equivalent replacement or improvement made under the spirit and principles of the present invention should be covered within the protection scope of the present invention. What is claimed is: 1. A method for simulating an Instant Messaging, IM, client interface on the basis of a web page, comprising: simulating a tab of a main interface and an active window of client IM software with divs of Hypertext Marker Language, HTML; detecting an action of an input device: and performing operations to the tab of the main interface and / or the active window of the client IM software according to the detected action of the input device; wherein a div for simulating (he tab is a tab div, a div for simulating the active window is an active window div, tabs of the main interface simulated by tab divs are arranged one by one according to a sequence, active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div corresponds to a tab div, 2. The method according to claim I, wherein the input device is a mouse, and the action is a mouse action; or the input device is a keyboard, and the action is a keyboard action. 3. The method according to claim 2, wherein the sequence is a sequence from the top down or from the left to the right. 4. The method according to claim 3, wherein said detecting the action of the input device comprises: detecting that the tab of the main interface is clicked by a key of the mouse or by a key of the keyboard; said performing the operations to the tab of the main interface and / or the active window of the client IM software according to the detected action comprises: determining a lab div corresponding to the tab clicked by the key of the mouse or by the key of the keyboard; setting an attribute of an active window div corresponding to the tab div as displayed; and setting attributes of other active window divs as hidden, 5. The method according to claim 4, wherein said performing the operations to the tab of the main interface and/or the active window of the IM client according to the detected action of the input device further comprises: pointing a View__start pointer and a View_end pointer to start and end of display contents of the tab div coiresponding to the tab clicked by the key of the mouse or by the key of the keyboard, 6. The method according to claim 4 or 5, wherein the key of the mouse is a left key. 7. The method according to claim 3, wherein said detecting the action of the input device comprises: detecting that the tab of the main interface is clicked by a key of the mouse or by a key of {he keyboard; said performing the operations to the tab of the main interface and / or the active window of the simulated IM client according to the detected action of the input device comprises: displaying a menu, which at least comprises an option for adding or removing a tab; and adding or removing a tab div and an active window div corresponding to the tab div when the option for adding or removing a tab is selected by the action of the mouse or by the action of the keyboard. 8. The method according to claim 7, wherein the key of the mouse is a right key and the menu is a right key menu. 9. An apparatus for simulating an Instant Messaging. IM, client interface on the basis of a web page, comprising: an input device action detection module, adapted to detect an action of an input device; a main interface simulation module, adapted to simulate a tab of a main interface of client IM software with a tab div, perform operations to the simulated tab of the main interface according to the action of the input device defected by the input device action detection module, wherein tabs of the main interface simulated by tab divs are arranged one by one according to a sequence; an active window simulation module, adapted to simulate an active window of the client IM software with an active window div, and perform operations to the simulated active window according to the action of the input device detected by the input device action detection module; wherein active windows simulated by active window divs are arranged to be overlapped with each other, and each active window div corresponds to a tab div of the main interface simulation module. 10. The apparatus according to claim 9, wherein the input device action detection module is a mouse action detection module, and is adapted to detect a mouse action; or the input device action detection module is a keyboard action detection module, and is adapted to detect a keyboard action. 11. The apparatus according to claim 10, wherein the main interface simulation module comprises: a switch unit, adapted to send an instruction to display an active window corresponding to a tab of the main interface when the input device action detection module detects that the tab of the main interface is clicked by a key of a mouse or by a key of a keyboard; the active window simulation module comprises; a display unit, adapted to set an attribute of an active window div corresponding to the instruction as displayed upon receiving the instruction to display the active window sent from the main interface simulation module , and set attributes of other active window divs as hidden. 12. The apparatus according to claim 11, wherein the main interface simulation module further comprises: a page turning unit, adapted to display all contents of the tab of the main interface when the input device action detection module detects that the simulated tab of the main interface is clicked by the key of the mouse or by the key of the keyboard, and display titles of other tabs of the main interface. 13. The apparatus according to claim 12, wherein the page turning unit comprises a View_start pointer and a View_end pointer: wherein, if contents of the tab of the main interface are to be displayed, the page turning unit is adapted to make the View_start pointer and the View_end pointer respectively point to start and end of contents of the tab div corresponding to the tab clicked by the key of the mouse or by the key of the keyboard, and adapted to display the contents of the tab div as the contents to be displayed under the title of the tab of the main interface clicked by the key of the mouse or by the key of the keyboard. 14. The apparatus according to claim 10, wherein the main interface simulation module comprises; a tab adding and removing unit, adapted to add or remove a tab div when the input device action detection module detects that a tab of the main interface is clicked by a key of a mouse or by a key of a keyboard and when an option for adding or removing a tab is selected; and the active window simulation module comprises: an active window adding and removing unit, adapted to create or remove an active window div corresponding to the tab dive when the tab adding and removing unit adds or removes the tab div. |
---|
0443-che-2009 correspondance others.pdf
0443-che-2009 description(complete).pdf
443-CHE-2009 AMENDED CLAIMS 31-07-2014.pdf
443-CHE-2009 EXAMINATION REPORT REPLY RECEIVED 31-07-2014.pdf
443-CHE-2009 FORM-1 31-07-2014.pdf
443-CHE-2009 OTHER PATENT DOCUMENT 30-07-2014.pdf
443-CHE-2009 CORRESPONDENCE OTHERS 08-05-2014.pdf
443-CHE-2009 ENGLISH TRANSLATION 31-07-2014.pdf
443-CHE-2009 FORM-3 31-07-2014.pdf
443-CHE-2009-petition for POR.pdf
Patent Number | 265810 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Indian Patent Application Number | 443/CHE/2009 | |||||||||
PG Journal Number | 12/2015 | |||||||||
Publication Date | 20-Mar-2015 | |||||||||
Grant Date | 18-Mar-2015 | |||||||||
Date of Filing | 27-Feb-2009 | |||||||||
Name of Patentee | TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED | |||||||||
Applicant Address | 4/F, EAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044, | |||||||||
Inventors:
|
||||||||||
PCT International Classification Number | G06F13/00 | |||||||||
PCT International Application Number | N/A | |||||||||
PCT International Filing date | ||||||||||
PCT Conventions:
|