METHOD, APPARATUS, AND ELECTRONIC DEVICE FOR DISPLAYING CHAT WINDOWS

The invention relates to method, apparatus, and electronic device for displaying chat windows. The method includes obtaining a display queue and a stow queue, where the display queue includes multiple display positions in which corresponding existing chat windows are disposed; obtaining an opening instruction of a chat window in real time; determining whether a number of the existing chat windows reaches a maximum number of display positions; if the number of the existing chat windows reaches the number of display positions, moving the existing chat window in the rightmost display position into the stow queue; moving the remaining existing chat windows rightwards, so as to empty the leftmost display position; putting the newly opened chat window into the leftmost display position; using the newly opened chat window and the remaining existing chat windows as new-round existing chat windows; and displaying the new-round existing chat windows.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application claims priority to and the benefit of, pursuant to 35 U.S.C. § 119(e), U.S. Provisional Patent Application Nos. 62/659,262, 62/659,268, 62/659,274, 62/659,279, 62/659,285, 62/659,289, 62/659,292, and 62/659,297, all filed Apr. 18, 2018, which are incorporated herein in their entireties by reference.

This application also claims priority to and the benefit of, pursuant to 35 U.S.C. § 119(a), Chinese Patent Application Nos. 201810610187.5, 201810608659.3, 201810608671.4, 201810611056.9, 201810611025.3, 201810608658.9, and 201810610189.4, all filed Jun. 13, 2018, in the State Intellectual Property Office of P.R. China, which are incorporated herein in their entireties by reference.

FIELD OF THE INVENTION

The invention relates generally to the field of communications, and more particularly to method, apparatus, and electronic device for displaying chat windows.

BACKGROUND OF THE INVENTION

The background description provided herein is for the purpose of generally presenting the context of the invention. The subject matter discussed in the background of the invention section should not be assumed to be prior art merely as a result of its mention in the background of the invention section. Similarly, a problem mentioned in the background of the invention section or associated with the subject matter of the background of the invention section should not be assumed to have been previously recognized in the prior art. The subject matter in the background of the invention section merely represents different approaches, which in and of themselves may also be inventions.

On a display device having an instant messaging (IM) function, a user can open multiple IM chat windows. Each IM chat window is used for a different person, a group of people, or an entity with which the user communicates. However, it is inconvenient for the user to keep active communication with multiple partners in an existing display approach of IM chat windows.

Therefore, a heretofore unaddressed need exists in the art to address the aforementioned deficiencies and inadequacies.

SUMMARY OF THE INVENTION

In view of the forgoing, this invention provides method, apparatus, and electronic device for displaying chat windows, so that a user can keep active communication with multiple partners.

In one aspect, the present invention provides a method for displaying instant messaging (IM) chat windows. In one embodiment, the method includes obtaining a display queue and a stow queue, the display queue including multiple display positions, each display position accommodating a corresponding existing chat window, the existing chat windows being arranged from a first end to a second end of the display queue according to a chronological order of their opening times, and an existing chat window with an earlier opening time being closer to the second end of the display queue; and obtaining an opening instruction of a chat window in real time; determining whether a number of the existing chat windows in the display queue reaches a maximum number of the display positions; if the number of the existing chat windows in the display queue reaches the maximum number of the display positions, moving an existing chat window in the display position closest to the second end of the display queue into the stow queue; moving each of the remaining existing chat windows one display position towards the second end in the display queue, so as to empty the display position closest to the first end; putting the newly opened chat window into the display position closest to the first end according to the opening instruction; using the newly opened chat window and the remaining existing chat windows as new-round existing chat windows; and displaying the new-round existing chat windows.

In one embodiment, the method further includes obtaining a closing instruction for closing one of the new-round existing chat windows in the display queue; closing the corresponding new-round existing chat window according to the closing instruction; moving each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and searching the latest entered chat window in the stow queue, and putting the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

In one embodiment, the stow queue includes multiple stow positions, each stow position accommodates a corresponding stowed chat window, the stowed chat windows are arranged from a third end to a fourth end of the stow queue according to a sequence of entering the stow queue, and a stowed chat window entering the stow queue earlier is closer to the fourth end.

The step of moving an existing chat window in the display position closest to the second end of the display queue into the stow queue includes determining whether a number of stowed chat windows in the stow queue reaches a maximum number of the stow positions; if the number of stowed chat windows in the stow queue reaches the maximum number of the stow positions, removing a stowed chat window in the stow position closest to the fourth end; moving the remaining stowed chat windows one stow position towards the fourth end in the stow queue, so as to empty the stow position closest to the third end; and moving the existing chat window in the display position closest to the second end of the display queue into the emptied stow position closest to the third end of the stow queue.

In one embodiment, a chat window display pattern is preset for each display position; and the step of displaying the new-round existing chat windows includes for each chat window in the new-round existing chat windows, obtaining the chat window display pattern of the display position where the chat window is located, and displaying the chat window according to the chat window display pattern, where the chat window display pattern includes a session window pattern and a bar pattern.

In one embodiment, the method further includes obtaining a first modification instruction for modifying the number of the display positions, and modifying the number of the display positions according to the first modification instruction; and obtaining a second modification instruction for modifying the chat window display pattern, and modifying the chat window display pattern according to the second modification instruction.

In another aspect, the present invention provides an apparatus for displaying instant messaging (IM) chat windows. In one embodiment, the apparatus includes a queue obtaining module, configured to obtain a display queue and a stow queue, the display queue including multiple display positions, each display position accommodating a corresponding existing chat window, the existing chat windows being arranged from a first end to a second end of the display queue according to a chronological order of their opening times, and an existing chat window with an earlier opening time being closer to the second end of the display queue; and a chat window display module, configured to obtain an opening instruction of a chat window in real time; determine whether a number of the existing chat windows in the display queue reaches a maximum number of the display positions; if the number of the existing chat windows in the display queue reaches the maximum number of the display positions, move an existing chat window in the display position closest to the second end of the display queue into the stow queue; move each of the remaining existing chat windows one display position towards the second end in the display queue, so as to empty the display position closest to the first end; put the newly opened chat window into the emptied display position closest to the first end according to the opening instruction; use the newly opened chat window and the remaining existing chat windows as new-round existing chat windows; and display the new-round existing chat windows in the display queue.

In one embodiment, the apparatus further includes an adjustment module, configured to obtain a closing instruction for closing one of the new-round existing chat windows in the display queue; close the corresponding new-round existing chat window according to the closing instruction; move each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and search the latest entered chat window in the stow queue, and put the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

In one embodiment, the apparatus further includes a first modification module, configured to obtain a first modification instruction for modifying the number of the display positions, and modify the number of the display positions according to the first modification instruction; and a second modification module, configured to obtain a second modification instruction for modifying the chat window display pattern, and modify the chat window display pattern according to the second modification instruction.

In yet another aspect, the present invention provides an electronic device for displaying chat windows. In one embodiment, the electronic device has at least one memory, at least one processor, and programs stored in the at least one memory, wherein when the programs are executed by at least one processor, the programs cause an apparatus to perform the above disclosed method for displaying chat windows.

In a further aspect, the present invention provides a non-transitory computer-readable medium storing programs which, when executed by one or more processors, cause an apparatus to perform the above disclosed method for displaying chat windows

In the method for displaying chat windows, apparatus, and electronic device provided by the embodiments of the present invention, an arrangement rule is set for existing chat windows in display positions; when an instant chat window enters a display position, corresponding displacement and replacement are performed on the newly opened chat window and the existing chat windows according to the arrangement rule, so as to avoid that the newly opened chat window occupies a display position of an active existing chat window, thereby ensuring that a user can keep active communication with multiple partners.

These and other aspects of the invention will become apparent from the following description of the preferred embodiments, taken in conjunction with the following drawings, although variations and modifications therein may be affected without departing from the spirit and scope of the novel concepts of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. It should be understood that the accompanying drawings in the following show only some embodiments of the present invention and should not be construed as a limitation to the scope. A person of ordinary skill in the art may still derive other related drawings from these accompanying drawings without creative efforts.

FIG. 1 is a schematic block diagram of an electronic device according to one embodiment of the present invention.

FIG. 2 is a flowchart of a method for displaying chat windows according to one embodiment of the present invention.

FIG. 3 is a schematic diagram of a chat window display rule according to one embodiment of the present invention.

FIG. 4 is a flowchart of a method for displaying chat windows according to another embodiment of the present invention.

FIG. 5 is a schematic diagram of a chat window display rule according to another embodiment of the present invention.

FIG. 6 is a schematic diagram of a chat window display pattern according to one embodiment of the present invention.

FIG. 7 is a block diagram of modules of an apparatus for displaying chat windows according to one embodiment of the present invention.

Listing of reference numerals: 10, electronic device; 11, memory; 12, processor; 13, network module; 20, chat window display apparatus; 21, queue obtaining module; 22, chat window display module; 23, adjustment module; 24, first modification module; and 25, second modification module.

DETAILED DESCRIPTION OF THE INVENTION

The invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Like reference numerals refer to like elements throughout.

The terms used in this specification generally have their ordinary meanings in the art, within the context of the invention, and in the specific context where each term is used. Certain terms that are used to describe the invention are discussed below, or elsewhere in the specification, to provide additional guidance to the practitioner regarding the description of the invention. For convenience, certain terms may be highlighted, for example using italics and/or quotation marks. The use of highlighting and/or capital letters has no influence on the scope and meaning of a term; the scope and meaning of a term are the same, in the same context, whether or not it is highlighted and/or in capital letters. It will be appreciated that the same thing can be said in more than one way. Consequently, alternative language and synonyms may be used for any one or more of the terms discussed herein, nor is any special significance to be placed upon whether or not a term is elaborated or discussed herein. Synonyms for certain terms are provided. A recital of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification, including examples of any terms discussed herein, is illustrative only and in no way limits the scope and meaning of the invention or of any exemplified term. Likewise, the invention is not limited to various embodiments given in this specification.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the description herein and throughout the claims that follow, the meaning of “a”, “an”, and “the” includes plural reference unless the context clearly dictates otherwise. Also, as used in the description herein and throughout the claims that follow, the meaning of “in” includes “in” and “on” unless the context clearly dictates otherwise.

It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, regions, layers and/or sections, these elements, components, regions, layers and/or sections should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or section from another element, component, region, layer or section. Thus, a first element, component, region, layer or section discussed below can be termed a second element, component, region, layer or section without departing from the teachings of the invention.

Furthermore, relative terms, such as “lower” or “bottom” and “upper” or “top,” may be used herein to describe one element's relationship to another element as illustrated in the figures. It will be understood that relative terms are intended to encompass different orientations of the device in addition to the orientation shown in the figures. For example, if the device in one of the figures is turned over, elements described as being on the “lower” side of other elements would then be oriented on the “upper” sides of the other elements. The exemplary term “lower” can, therefore, encompass both an orientation of lower and upper, depending on the particular orientation of the figure. Similarly, if the device in one of the figures is turned over, elements described as “below” or “beneath” other elements would then be oriented “above” the other elements. The exemplary terms “below” or “beneath” can, therefore, encompass both an orientation of above and below.

It will be further understood that the terms “comprise(s)” and/or “comprising,” or “include(s)” and/or “including” or “has (have)” and/or “having” or “contain(s)” and/or “containing” when used in this specification specify the presence of stated features, regions, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, regions, integers, steps, operations, elements, components, and/or groups thereof.

Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

As used herein, the phrase at least one of A, B, and C should be construed to mean a logical (A or B or C), using a non-exclusive logical OR. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.

As used herein, the term “module” may refer to, be part of, or include an Application Specific Integrated Circuit (ASIC); an electronic circuit; a combinational logic circuit; a field programmable gate array (FPGA); a processor (shared, dedicated, or group) that executes code; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-chip. The term module may include memory (shared, dedicated, or group) that stores code executed by the processor.

The term “code”, as used herein, may include software, firmware, and/or microcode, and may refer to programs, routines, functions, classes, and/or objects. The term shared, as used above, means that some or all code from multiple modules may be executed using a single (shared) processor. In addition, some or all code from multiple modules may be stored by a single (shared) memory. The term group, as used above, means that some or all code from a single module may be executed using a group of processors. In addition, some or all code from a single module may be stored using a group of memories.

The terms “chip” or “computer chip”, as used herein, generally refer to a hardware electronic component, and may refer to or include a small electronic circuit unit, also known as an integrated circuit (IC), or a combination of electronic circuits or ICs.

As used herein, the term “server” generally refers to a system (e.g., a social network server) that responds to requests across a computer network to provide, or help to provide, network services, e.g., network data storage and database management. A server may also include one or more processors to execute computer programs in parallel. An implementation of the server may include software and suitable computer hardware. A server may run on a computing device or a network computer. In some cases, a computer may provide several services and have multiple servers running.

The terms “client” or “client terminal”, or “terminal”, as used herein, may refer to any appropriate user terminal with certain computing capabilities, e.g., a personal computer (PC), a work station computer, a hand-held computing device (e.g., a tablet), a mobile terminal (e.g., a mobile phone or a smart phone), or any other user-side computing devices.

The invention in one aspect relates to methods, apparatuses, and/or electronic devices for displaying IM chat windows. One of ordinary skill in the art would appreciate that, unless otherwise indicated, certain computer systems and/or components thereof may be implemented in, but not limited to, the forms of software, firmware or hardware components, or a combination thereof.

The apparatuses, systems, and/or methods may be implemented by one or more computer programs executed by one or more processors. The computer programs include processor-executable instructions that are stored on a non-transitory tangible computer readable medium. The computer programs may also include stored data. Non-limiting examples of the non-transitory tangible computer readable medium are nonvolatile memory, magnetic storage, and optical storage.

The apparatuses, systems, and/or methods may be illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, etc. (collectively referred to as “elements”). These elements may be implemented using electronic hardware, computer software, or any combination thereof. Whether such elements are implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. By way of example, an element, or any portion of an element, or any combination of elements may be implemented as a “processing system” that includes one or more processors. Examples of processors include microprocessors, microcontrollers, graphics processing units (GPUs), central processing units (CPUs), application processors, digital signal processors (DSPs), reduced instruction set computing (RISC) processors, systems on a chip (SoC), baseband processors, field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functionality described throughout this disclosure. One or more processors in the processing system may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software components, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.

Accordingly, in one or more example embodiments, the functions described may be implemented in hardware, software, or any combination thereof. If implemented in software, the functions may be stored on or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise a random-access memory (RAM), a read-only memory (ROM), an electrically erasable programmable ROM (EEPROM), optical disk storage, magnetic disk storage, other magnetic storage devices, combinations of the aforementioned types of computer-readable media, or any other medium that can be used to store computer executable code in the form of instructions or data structures that can be accessed by a computer.

The description below is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. The broad teachings of the invention can be implemented in a variety of forms. Therefore, while this invention includes particular examples, the true scope of the invention should not be so limited since other modifications will become apparent upon a study of the drawings, the specification, and the following claims. For purposes of clarity, the same reference numbers will be used in the drawings to identify similar elements. It should be understood that one or more steps within a method may be executed in different order (or concurrently) without altering the principles of the invention.

On a display device having an instant messaging function, a user can open multiple chat windows. Each chat window is used for a different person, a group of people or an object with which the user communicates. Display and replacement of an opened chat window usually follow a particular rule. It is found through research that with the existing chat window display and replacement rule, a user cannot keep active communication with multiple partners conveniently. For example, in the existing chat window display and replacement rule, a newly opened chat window always occupies a prior window with a relatively late opening time, while the window with a relatively late opening time may still in an active state. As a result, the window in the active state is constantly occupied by the newly opened chat window, and the user cannot keep active communication with multiple partners.

One of the objectives of the invention is to solve the foregoing problems by providing method, apparatus, and electronic device for displaying chat windows. A display and replacement rule is set based on a display queue and a stow queue, so that a user can keep active communication with multiple partners.

FIG. 1 is a schematic block diagram of an electronic device 10 according to one embodiment of the present invention. The electronic device 10 in the embodiment of the present invention may be a server having functions of data storage, transmission, and processing functions. As shown in FIG. 1, the electronic device 10 includes a memory 11, a processor 12, a network module 13 and an apparatus 20 for displaying chat windows.

The memory 11, the processor 12 and the network module 13 are electrically coupled to each other directly or indirectly, so as to implement data transmission or interaction. Mutual electrical connection between the elements may be implemented by using one or more communications bus or signal lines. The memory 11 stores the apparatus 20 for displaying chat windows. The apparatus 20 for displaying chat windows includes at least one software functional module that can be stored in the memory 11 in the form of software or firmware. The processor 12 performs, by executing software programs, codes, and modules such as the apparatus 20, stored in the memory 11, various function applications and data processing to implement a method of the invention.

The memory 11 may be a non-transitory computer-readable medium, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), or the like. The memory 11 is configured to store programs or codes, which are executed by the processor 12 once receiving an execution instruction.

The processor 12 may be an integrated circuit chip and has a data processing function. The processor 12 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), or the like, and can implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor, any conventional processor, or the like.

The network module 13 is configured to implement operations of sending and receiving network signals and data by establishing communication connections between the electronic device 10 and other communications terminal devices. The network signals may include wired signals or wireless signals.

It should be understood that the structure shown in FIG. 1 is only for the purpose of illustration. The electronic device 10 may also include more or fewer components than those shown in FIG. 1, or have a configuration different from that shown in FIG. 1. The components shown in FIG. 1 may be implemented by hardware, software, or a combination thereof.

In another aspect, the invention also provides a non-transitory computer-readable storage medium storing instruction codes. The instruction codes, when executed by one or more processors, control the electronic device 10 to perform the following methods for displaying chat windows.

FIG. 2 is a flowchart of the method for displaying chat windows according to one embodiment of the present invention. In the exemplary embodiment, the steps defined by the method are performed in the electronic device 10 and implemented by the processor 12, which are elaborated below in details.

Step S21: Obtain a display queue and a stow queue.

In this embodiment, a chat window can be displayed on a webpage of a social network system having an instant messaging function. A user can start instant messaging with other users on the social network system by using various instant messaging starting methods, for example, a name, a picture file and/or a service hyperlink appearing in a press button, a block, a list, and a search result. The instant messaging can be started at almost any position marked or unmarked on the webpage. In the instant messaging, messages can be transmitted intermittently in the form of a text, voice, a picture, a video, emoji, a file, a hyperlink, a GPS address and/or any combination thereof, or a voice call or a video call can be performed directly. The instant messaging may be one-to-one, one-to-many, or many-to-many, and the many-to-many instant messaging usually appears in the form of a group chat. The foregoing functions can be implemented by using corresponding chat windows. Generally, a chat window occupies a part of a webpage, and this part is usually based on a browser or may be a part of an electronic screen currently viewed by the user.

According to the invention, the display queue is used for “placing” the chat windows, and the display queue can only store a limited number of chat windows. Therefore, a stow queue needs to be set to “place” spare chat windows.

FIG. 3 is a schematic diagram of a chat window display rule according to one embodiment of the present invention. In the exemplary embodiment, a display queue X includes multiple display positions. The number of display positions may be five, and the display positions may be: X1, X2, X3, X4 and X5. A corresponding existing chat window is disposed in a respective display position. It can be understood that the number of the existing chat windows is less than or equal to the number of display positions. For example, the existing chat windows may be: M1, M2, M3, M4 and M5. The existing chat windows are arranged from a first end to a second end of the queue X according to a chronological order of their opening times, and an existing chat window with an earlier opening time is closer to the second end. It can be seen from FIG. 3 that in this embodiment, the first end is the left side of the queue and the second end is the right side of the queue.

Further referring to FIG. 3, M1 has the latest opening time and M5 has the earliest opening time. If the arrangement is started at the moment when M5 is opened, the arrangement process is as follows: M5 is first located in X1; when M4 enters, M5 is located in X2, and M4 is located in X1; the rest can be deduced by analogy. When M1 enters X1, the number of the existing chat windows is the same as the number of display positions.

Similarly, a stow queue S includes multiple stow positions. Each stow position accommodates a corresponding stowed chat window. For example, the stow positions are S1, S2, S3 and S4, and the stowed chat windows are N1, N2, N3 and N4. The stowed chat windows are arranged from a third end to a fourth end of the stow queue S according to a sequence of entering the stow queue S, and a stowed chat window entering the stow queue S earlier is closer to the fourth end. In this embodiment shown in FIG. 3, the third end is the bottom side of the stow queue and the fourth end is the top side of the stow queue. The stow positions are S1, S2, S3 and S4 sequentially from top to bottom, and the arrangement of the stowed chat windows is N1, N2, N3 and N4 sequentially from top to bottom. It can be understood that N1 enters the stow queue S first, and the N4 enters the stow queue S last.

Step S22: Obtain an opening instruction of a chat window in real time, perform displacement and replacement based on a preset rule according to a number of the existing chat windows in the display queue, and display chat windows after the displacement and replacement.

Further referring to FIG. 3, when a (new) instant chat window Mx is opened, it is first determined whether a number of the existing chat windows in the display queue X reaches the maximal number of display positions. In this embodiment, the number of the existing chat windows and the maximal number of display positions are both five. Therefore, the display positions are already fully filled, and one existing chat window needs to be moved from its display position into the stow queue S. In the embodiment, M5 enters the display queue earliest and is located at the right side of the display queue X. M5 is moved into the stow queue S. In this case, X5 is emptied. M1 to M4 are moved rightwards sequentially, and after being moved, M1 is in X2, M2 is in X3, M3 is in X4, and M4 is in X5. Therefore, X1 is emptied by means of the movement. In this case, Mx is placed into X1, and Mx, M1, M2, M3 and M4 are used as new-round existing chat windows and displayed.

Further referring to FIG. 3, when M5 is moved into the stow queue S, it is also determined first whether the stow queue S is fully filled. In this embodiment, the number of stowed chat windows and the number of stow positions are both four. In this case, the stowed chat window N1 closest to the top side of the stow queue S is removed, N2 to N4 are moved towards the top side sequentially to empty S4, and then M5 is placed into S4.

The (new) instant chat window can be displayed after the foregoing steps.

In one embodiment, if a chat window in the new-round existing chat windows needs to be closed, as shown in FIG. 4, the embodiment of the present invention also provides a corresponding movement and replacement rule. The specific process shown in FIG. 4 will be described in detail below.

Step S41: Obtain a closing instruction for closing one of the new-round existing chat windows, and close the corresponding new-round existing chat window according to the closing instruction.

Referring to FIG. 5 in combination, for example, a closing instruction for closing M2 is obtained, and the new-round existing chat window M2 is closed according to the closing instruction. In this case, X3 is empty.

Step S42: Move the remaining new-round existing chat windows on the right side of the closed new-round existing chat window towards the left side, so as to empty the display position closest to the right side.

For example, new-round existing chat windows on the right side of X3 are M3 and M4; M3 and M4 are moved towards the left side, and after the movement, chat windows in X1, X2, X3, X4 and X5 are Mx, M1, M3, M4 and blank respectively. It can be understood that no chat window is placed in X5.

Step S43: Search the latest entered chat window in the stow queue, and put the latest entered chat window into the display position closest to the right side of the display queue.

For example, M5 enters the stow queue S last. Therefore, M5 is put into the position (X1) closest to the right side of the display queue X. In this case, the chat windows in the display queue X are Mx, M1, M3, M4 and M5 sequentially from left to right. It can be understood that in this case, S4 of the stow queue S is empty.

In one embodiment, as shown in FIG. 6, the embodiment of the present invention further shows a chat window display pattern of each display position. The chat window display pattern includes a session window pattern and a bar pattern. For example, the chat window display patterns of X2 and X4 are the session window pattern, and the chat window display patterns of X1, X3 and X5 are the bar pattern. It can be understood that the display pattern corresponding to the display position will not change with the chat window put into the display position. For example, the chat windows initially put into the display positions X1 to X5 are M1 to M5, and at this point, M1, M3 and M5 are of the bar pattern, while M2 and M4 are of the session window pattern; if the chat windows in the display positions X1 to X5 become Mx, M1, M2, M3 and M4, the chat windows Mx, M2 and M4 are of the bar pattern, and the chat windows M1 and M3 are of the session window pattern. Such a setting can ensure visual comfort of the user when chat windows are moved. Because the overall pattern of the queue remains unchanged, jitters caused by a pattern change on the webpage are avoided.

In one embodiment, the number of display positions and the number of stow positions can further be adjusted according to the method. For example, a first modification instruction for modifying the number of display positions is received, and the number of display positions is modified according to the first modification instruction. With such a setting, the number of display positions can be increased or decreased properly according to an actual requirement, so as to meet requirements of different users.

In one embodiment, the chat window display pattern of each display position can further be modified according the method. For example, a second modification instruction for modifying the chat window display pattern is received, and the chat window display pattern is modified according to the second modification instruction.

Based on the above description, as shown in FIG. 7, one embodiment of the present invention provides an apparatus 20 for displaying chat windows. The apparatus 20 for displaying chat windows includes a queue obtaining module 21, a chat window display module 22, an adjustment module 23, a first modification module 24 and a second modification module.

The queue obtaining module 21 is configured to obtain a display queue and a stow queue, the display queue including multiple display positions, each display position accommodating a corresponding existing chat window, the existing chat windows being arranged from a first end to a second end of the display queue according to a chronological order of their opening times, and an existing chat window with an earlier opening time being closer to the second end of the display queue

Because the implementation principle of the queue obtaining module 21 is similar to that of step S21 in FIG. 2, no more details are repeated herein.

The chat window display module 22 is configured to obtain an opening instruction of a chat window in real time; determine whether a number of the existing chat windows in the display queue reaches a maximum number of the display positions; if the number of the existing chat windows in the display queue reaches the maximum number of the display positions, move an existing chat window in the display position closest to the second end of the display queue into the stow queue; move each of the remaining existing chat windows one display position towards the second end in the display queue, so as to empty the display position closest to the first end; put the newly opened chat window into the emptied display position closest to the first end according to the opening instruction; use the newly opened chat window and the remaining existing chat windows as new-round existing chat windows; and display the new-round existing chat windows in the display queue.

Because the implementation principle of the chat window display module 22 is similar to that of step S22 in FIG. 2, no more details are repeated herein.

The adjustment module 23 is configured to obtain a closing instruction for closing one of the new-round existing chat windows in the display queue; close the corresponding new-round existing chat window according to the closing instruction; move each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and search the latest entered chat window in the stow queue, and put the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

Because the implementation principle of the adjustment module 23 is similar to that of step S41, step S42 and step S43 in FIG. 4, no more details are repeated herein.

The first modification module 24 is configured to obtain a first modification instruction for modifying the number of the display positions, and modify the number of the display positions according to the first modification instruction.

Because the implementation principle of the first modification module 24 is similar to that of the foregoing method for modifying the number of display positions, no more details are repeated herein.

The second modification module 25 is configured to obtain a second modification instruction for modifying the chat window display pattern, and modify the chat window display pattern according to the second modification instruction.

Because the implementation principle of the second modification module 25 is similar to that of the foregoing method for modifying the chat window display pattern, no more details are repeated herein.

In sum, in the method, apparatus, and electronic device for displaying chat windows provided by the embodiments of the present invention, an arrangement rule is set for existing chat windows in display positions, so as to avoid that an instant chat window occupies a display position of an active existing chat window, thereby ensuring that a user can keep active communication with multiple partners.

It should be appreciated that the disclosed apparatus and method may also be implemented in other manners. The embodiments of the apparatus and method described above are merely illustrative, but are not intended to limit the invention. For example, the flowchart and block diagram in the accompanying drawings show system architecture, functions and operations that are possibly implemented by the apparatus, method and computer program product according to the embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code. The module, program segment or part of code includes one or more executable instructions for implementing a specified logic function. It should also be noted that in some alternative implementations, functions indicated in the blocks can also take place in a sequence different from the sequence indicated in the drawing. For example, two successive blocks actually can be executed in a substantially parallel manner, or can be executed in a reverse sequence, which depends on the related functions. It should also be noted that each block in the block diagram and/or flowchart and a combination of blocks in the block diagram and/or flowchart can be implemented by using a dedicated hardware-based system for executing specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

In addition, the functional modules in the embodiments of the present invention can be integrated together to form an independent part, or each functional module can exist alone, or two or more modules can be integrated to form an independent part.

When the function is implemented in the form of a software functional module and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention essentially, or the part contributing to the prior art, or all or some of the technical solution may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, an electronic device 10, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of the present invention. The foregoing storage medium includes: various media that can store program code, such as a USB flash disk, a mobile hard disk drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

The foregoing descriptions are merely preferred embodiments of the present invention, but are not intended to limit the present disclosure. For a person skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure shall fall within the protection scope of the present invention.

The embodiments were chosen and described in order to explain the principles of the invention and their practical application so as to enable others skilled in the art to utilize the invention and various embodiments and with various modifications as are suited to the particular use contemplated. Alternative embodiments will become apparent to those skilled in the art to which the invention pertains without departing from its spirit and scope. Accordingly, the scope of the invention is defined by the appended claims rather than the foregoing description and the exemplary embodiments described therein.

Claims

1. A method for displaying chat windows, comprising:

obtaining a display queue and a stow queue, the display queue comprising multiple display positions, each display position accommodating a corresponding existing chat window, the existing chat windows being arranged from a first end to a second end of the display queue according to a chronological order of their opening times, and an existing chat window with an earlier opening time being closer to the second end of the display queue; and
obtaining an opening instruction of a chat window in real time; determining whether a number of the existing chat windows in the display queue reaches a maximum number of the display positions; if the number of the existing chat windows in the display queue reaches the maximum number of the display positions, moving an existing chat window in the display position closest to the second end of the display queue into the stow queue; moving each of the remaining existing chat windows one display position towards the second end in the display queue, so as to empty the display position closest to the first end; putting the newly opened chat window into the emptied display position closest to the first end according to the opening instruction; using the newly opened instant chat window and the remaining existing chat windows as new-round existing chat windows; and displaying the new-round existing chat windows in the display queue.

2. The method according to claim 1, further comprising:

obtaining a closing instruction for closing one of the new-round existing chat windows in the display queue;
closing the corresponding new-round existing chat window according to the closing instruction;
moving each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and
searching the latest entered chat window in the stow queue, and putting the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

3. The method according to claim 1, wherein the stow queue comprises multiple stow positions, each stow position accommodates a corresponding stowed chat window, the stowed chat windows are arranged from a third end to a fourth end of the stow queue according to a sequence of entering the stow queue, and a stowed chat window entering the stow queue earlier is closer to the fourth end; the step of moving an existing chat window in the display position closest to the second end of the display queue into the stow queue comprises:

determining whether a number of stowed chat windows in the stow queue reaches a maximum number of the stow positions; if the number of stowed chat windows in the stow queue reaches the maximum number of the stow positions, removing a stowed chat window in the stow position closest to the fourth end; moving the remaining stowed chat windows one stow position towards the fourth end in the stow queue, so as to empty the stow position closest to the third end; and moving the existing chat window in the display position closest to the second end of the display queue into the emptied stow position closest to the third end of the stow queue.

4. The method according to claim 1, wherein a chat window display pattern is preset for each display position; and the step of displaying the new-round existing chat windows comprises:

for each chat window in the new-round existing chat windows, obtaining the chat window display pattern of the display position where the chat window is located, and displaying the chat window according to the chat window display pattern, wherein the chat window display pattern comprises a session window pattern and/or a bar pattern.

5. The method according to claim 4, further comprising:

obtaining a first modification instruction for modifying the number of the display positions, and modifying the number of the display positions according to the first modification instruction; and
obtaining a second modification instruction for modifying the chat window display pattern, and modifying the chat window display pattern according to the second modification instruction.

6. An apparatus for displaying chat windows, comprising:

a queue obtaining module, configured to obtain a display queue and a stow queue, the display queue comprising multiple display positions, each display position accommodating a corresponding existing chat window, the existing chat windows being arranged from a first end to a second end of the display queue according to a chronological order of their opening times, and an existing chat window with an earlier opening time being closer to the second end of the display queue; and
a chat window display module, configured to obtain an opening instruction of a chat window in real time; determine whether a number of the existing chat windows in the display queue reaches a maximum number of the display positions; if the number of the existing chat windows in the display queue reaches the maximum number of the display positions, move an existing chat window in the display position closest to the second end of the display queue into the stow queue; move each of the remaining existing chat windows one display position towards the second end in the display queue, so as to empty the display position closest to the first end; put the newly opened chat window into the emptied display position closest to the first end according to the opening instruction; use the newly opened chat window and the remaining existing chat windows as new-round existing chat windows; and display the new-round existing chat windows in the display queue.

7. The apparatus according to claim 6, further comprising:

an adjustment module, configured to obtain a closing instruction for closing one of the new-round existing chat windows in the display queue; close the corresponding new-round existing chat window according to the closing instruction; move each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and search the latest entered chat window in the stow queue, and put the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

8. The apparatus according to claim 6, further comprising:

a first modification module, configured to obtain a first modification instruction for modifying the number of the display positions, and modify the number of the display positions according to the first modification instruction; and
a second modification module, configured to obtain a second modification instruction for modifying the chat window display pattern, and modify the chat window display pattern according to the second modification instruction.

9. An electronic device for displaying chat windows, comprising:

at least one memory, at least one processor, and programs stored in the at least one memory, wherein when the programs are executed by at least one processor, the programs cause an apparatus to perform the method for displaying chat windows according to claim 1.

10. The electronic device according to claim 9, wherein the method further comprises:

obtaining a closing instruction for closing one of the new-round existing chat windows in the display queue;
closing the corresponding new-round existing chat window according to the closing instruction;
moving each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and
searching the latest entered chat window in the stow queue, and putting the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

11. The electronic device according to claim 9, wherein the method further comprises:

obtaining a first modification instruction for modifying the number of the display positions, and modifying the number of the display positions according to the first modification instruction; and
obtaining a second modification instruction for modifying a chat window display pattern, and modifying the chat window display pattern according to the second modification instruction.

12. A non-transitory computer-readable medium storing programs which, when executed by one or more processors, cause an apparatus to perform the method for displaying chat windows according to claim 1.

13. The non-transitory computer-readable medium according to claim 12, wherein the method further comprises:

obtaining a closing instruction for closing one of the new-round existing chat windows in the display queue;
closing the corresponding new-round existing chat window according to the closing instruction;
moving each of one or more of the new-round existing chat windows positioned between the second end and the queue positon where the corresponding new-round existing chat window is closed one display position towards the first end in the display queue, so as to empty the display position closest to the second end; and
searching the latest entered chat window in the stow queue, and putting the latest entered chat window in the stow queue into the emptied display position closest to the second end in the display queue.

14. The non-transitory computer-readable medium according to claim 12, wherein the method further comprises:

obtaining a first modification instruction for modifying the number of the display positions, and modifying the number of the display positions according to the first modification instruction; and
obtaining a second modification instruction for modifying a chat window display pattern, and modifying the chat window display pattern according to the second modification instruction.
Patent History
Publication number: 20190324599
Type: Application
Filed: Sep 21, 2018
Publication Date: Oct 24, 2019
Inventor: Shiwei Li (Shatin)
Application Number: 16/137,944
Classifications
International Classification: G06F 3/0481 (20060101); G06F 3/0484 (20060101);