CN108090079B - Chat record processing method and device of instant chat tool - Google Patents
Chat record processing method and device of instant chat tool Download PDFInfo
- Publication number
- CN108090079B CN108090079B CN201611036740.6A CN201611036740A CN108090079B CN 108090079 B CN108090079 B CN 108090079B CN 201611036740 A CN201611036740 A CN 201611036740A CN 108090079 B CN108090079 B CN 108090079B
- Authority
- CN
- China
- Prior art keywords
- chat
- cache
- user
- historical
- records
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 25
- 230000004044 response Effects 0.000 claims description 14
- 230000001960 triggered effect Effects 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 230000002441 reversible effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/156—Query results presentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/216—Handling conversation history, e.g. grouping of messages in sessions or threads
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a chat record processing method and a chat record processing device of an instant chat tool, wherein the method comprises the following steps: responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; and displaying the historical chat records between the current user and the specific user. The embodiment of the invention can quickly read the historical chat records from the cache, reduce the consumption of disk resources and improve the efficiency of obtaining the chat records.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a chat record processing method and device of an instant chat tool.
Background
An Instant chat tool (IM for short, english is called Instant Messaging) is an application program that can transmit Instant messages between users, and is convenient for users to communicate. In the prior art, a user can receive a new message and view a historical chat record through an instant chat tool. For example, the user may trigger the display of a historical chat log by scrolling the screen or clicking on the "view more messages" option. In the prior art, chat records between users and other users are generally stored in a local disk. When the user needs to view the historical chat records, the historical chat records are also read from the local disk. In the prior art, the chat records are read from the local disk every time, so that not only can the consumption of disk resources be caused, but also the defects that the reading of the data from the disk is long in time consumption and the chat records cannot be displayed quickly in time exist.
Disclosure of Invention
The embodiment of the invention provides a chat record processing method and device of an instant chat tool, which can quickly read a historical chat record from a cache, reduce the consumption of disk resources and improve the efficiency of obtaining the chat record.
Therefore, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for processing a chat record of an instant chat tool, including: responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; and displaying the historical chat records between the current user and the specific user.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes: judging whether the historical chat records between the current user and the specific user are read from a local storage space or not; if the judgment result is yes, reading the historical chat record between the current user and the specific user from the cache.
In some embodiments, the method further comprises: if the judgment result is negative, reading the historical chat record between the current user and the specific user from the local storage space, storing the read chat record in a cache, and recording the historical chat record between the current user and the specific user which is read from the local storage space.
In some embodiments, the method further comprises: and when the trigger condition is determined to be met, reading the historical chat record between the current user and the specific user from the local storage space in advance, and storing the read chat record in a cache.
In some embodiments, the determining that the trigger condition is satisfied comprises: when receiving an instant message sent to a current user by a specific user, determining that a trigger condition is met; or, when receiving an operation of a user for triggering and displaying a chat window of a current user and a specific user, determining that the triggering condition is met.
In some embodiments, the method further comprises: when the historical chat records contain pictures, judging whether pictures corresponding to the picture identifications are stored in a cache or not according to the picture identifications; and if so, acquiring the picture corresponding to the picture identifier from the cache.
In some embodiments, the method further comprises: if the judgment result is negative, the picture is obtained from the local storage space, and the picture and the corresponding relation between the picture and the picture identification are stored in the cache.
In some embodiments, the method further comprises: saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache.
In some embodiments, the method further comprises: when receiving an instant message sent to a current user by a specific user, judging whether the number or the capacity of the instant message is smaller than a set threshold value; and if so, sending a request for acquiring the historical chat records between the current user and the specific user.
In some embodiments, the presenting the historical chat history includes: and in response to a request for displaying the instant message triggered by a user, merging and displaying the instant message and the historical chat records.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes: reading a part of historical chat records meeting specific conditions between a current user and a specific user from a cache; the specific conditions comprise historical chat records which meet specific time conditions, specific place conditions or specific keywords; the displaying the historical chat records between the current user and the specific user comprises: and displaying the partial historical chat records, wherein each chat record in the partial historical chat records does not have a time continuous relationship or the historical chat records do not have a time continuous relationship with the chat record recently displayed by the current instant chat tool.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes:
judging whether the number or the capacity of the historical chat records between the current user and the specific user stored in the cache is larger than a set threshold value or not; if the judgment result is yes, directly reading the historical chat records with the quantity or the capacity equal to the set threshold value from the cache; if not, reading part of the historical chat records from the local storage space and storing the historical chat records in the cache, so that the number or the capacity of the historical chat records in the cache is larger than or equal to a set threshold.
In a second aspect, an embodiment of the present invention provides a method for processing a chat record of an instant chat tool, including: receiving an operation of triggering a first control by a user; responding to the operation that a user triggers a first control, and displaying at least part of historical chat records between a current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
In some embodiments, the method further comprises: receiving an operation of triggering a second control by a user; responding to the operation that the user triggers the second control, and displaying at least part of historical chat records between the current user and the specific user; wherein, each chat record in the at least part of historical chat records has a time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have a time continuous relationship.
In some embodiments, prior to displaying at least a portion of the historical chat history between the current user and the particular user, the method further comprises: reading at least part of historical chat records between the previous user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache.
In a third aspect, an embodiment of the present invention provides a chat record processing apparatus for an instant chat tool, including: the obtaining unit is used for responding to a request for obtaining the historical chat records between the current user and the specific user, and reading the historical chat records between the current user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; and the display unit is used for displaying the historical chat records.
In some embodiments, the obtaining unit comprises: the first judging unit is used for judging whether the historical chat records between the current user and the specific user are read from the local storage space or not; and the first reading unit is used for reading the historical chat record between the current user and the specific user from the cache if the historical chat record between the current user and the specific user is judged to be read from the local storage space.
In some embodiments, the apparatus further comprises: the second reading unit is used for reading the historical chatting record between the current user and the specific user from the local storage space if the fact that the historical chatting record between the current user and the specific user is not read from the local storage space is judged; and the first storage unit is used for storing the read chatting records in a cache, and recording that the historical chatting records between the current user and the specific user are read from the local storage space.
In some embodiments, the apparatus further comprises: the third reading unit is used for reading the historical chat records between the current user and the specific user from the local storage space in advance when the trigger condition is determined to be met; and the second storage unit is used for storing the read chat records in a cache.
In some embodiments, the apparatus further comprises: the second judging unit is used for judging whether a picture corresponding to the identifier of the picture is stored in a cache or not according to the identifier of the picture when the historical chat record is determined to contain the picture; and the fourth reading unit is used for acquiring the picture corresponding to the picture identifier from the cache if the judgment result is yes. A fifth reading unit, configured to obtain the picture from a local storage space if the determination result is negative; and the third storage unit is used for storing the pictures and the corresponding relation between the pictures and the picture identifications in a cache.
In some embodiments, the apparatus further comprises: the fourth storage unit is used for storing the access time for acquiring the historical chat records from the cache; and the deleting unit is used for determining the history chatting record which is used least recently according to the access time and deleting the history chatting record from the cache when the triggering condition is met.
In some embodiments, the apparatus further comprises: the sending unit is used for judging whether the number or the capacity of the instant messages is smaller than a set threshold value or not when the instant messages sent to the current user by a specific user are received; and if so, sending a request for acquiring the historical chat records between the current user and the specific user.
In some embodiments, the presentation unit is specifically configured to: and in response to a request for displaying the instant message triggered by a user, merging and displaying the instant message and the historical chat records.
In some embodiments, the obtaining unit comprises: a third judging unit, configured to judge whether the number or capacity of the historical chat records between the current user and the specific user stored in the cache is greater than a set threshold; a sixth reading unit, configured to, if the determination result is yes, directly read, from the cache, historical chat records whose number or capacity is equal to the set threshold; and the seventh reading unit is used for reading partial historical chat records from the local storage space and storing the partial historical chat records into the cache, so that the number or the capacity of the historical chat records in the cache is greater than or equal to the set threshold.
In a fourth aspect, an embodiment of the present invention further provides a chat record processing apparatus of an instant chat tool, including: the receiving unit is used for receiving the operation of triggering the first control by a user; the display unit is used for displaying at least part of historical chat records between the current user and the specific user in response to the operation that the user triggers the first control; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
In a fifth aspect, an embodiment of the present invention also provides an apparatus for processing chat logs of an instant chat tool, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors comprises instructions for: responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; and displaying the historical chat records between the current user and the specific user.
In a sixth aspect, embodiments of the present invention also provide an apparatus for chat log processing of an instant chat tool, including a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors comprises instructions for: receiving an operation of triggering a first control by a user; responding to the operation that a user triggers a first control, and displaying at least part of historical chat records between a current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
The chat record processing method and the device of the instant chat tool provided by the embodiment of the invention can read the historical chat record between the current user and the specific user from the local storage space in advance, store the historical chat record in the cache, and directly read the historical chat record from the cache when receiving the request of acquiring the historical chat record between the current user and the specific user, thereby greatly improving the speed of acquiring the chat record. In addition, data is only required to be read from the disk once and stored in the cache for a user to access, so that the loss of the disk is reduced, and the data processing and response speed is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic application scenario in which embodiments of the present application may be applied;
fig. 2 is a flowchart of a chat log processing method of the instant chat tool according to an embodiment of the present invention;
fig. 3 is a flow chart of a chat log processing method of the instant chat tool according to another embodiment of the present invention;
FIG. 4 is a flow chart of a method for processing chat logs in an instant chat facility according to another embodiment of the present invention;
fig. 5 is a flowchart of a chat log processing method of the instant chat tool according to another embodiment of the present invention;
FIG. 6A, FIG. 6B, and FIG. 6C are schematic diagrams illustrating the effects of the embodiment of the present invention;
fig. 7 is a schematic diagram of a chat log processing apparatus of an instant chat tool according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a chat log processing apparatus of an instant chat tool according to another embodiment of the present invention
Fig. 9 is a schematic diagram illustrating a chat log processing arrangement for an instant chat facility in accordance with an exemplary embodiment.
Detailed Description
The embodiment of the invention provides a chat record processing method and device of an instant chat tool, which can quickly read a historical chat record from a cache, reduce the consumption of disk resources and improve the efficiency of obtaining the chat record.
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an exemplary application scenario of the embodiment of the present application is shown. The method and the device provided by the embodiment of the application can be applied to the scenario shown in fig. 1, wherein the instant chat tool can display new messages 103 and 104 received from a specific user from a current user in the display interface 100, and can also display messages 101 and 102 in a historical chat record at the same time. The method and the device provided by the embodiment of the application can read the historical chat records between the current user and the specific user from the cache 200, improve the data acquisition speed and reduce the loss of the local disk. It should be noted that the above application scenarios are only shown for the convenience of understanding the present application, and the embodiments of the present application are not limited in any way in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
It should be noted that the technical term "instant chat tool" in the present invention generally refers to an application program that can transfer instant messages between two or more users, such as alewang, QQ, WeChat, MSN, etc.
The technical term "current user" refers to a user who logs in the current instant chat tool client and corresponds to the account of the current instant chat tool client, and "specific user" refers to another user who performs instant communication with the current user. For example, the current user is user a, and the particular user may be another user B with whom to chat using the instant chat facility.
The technical term "historical chat history" as referred to herein generally refers to a chat history that a user has viewed, "new instant message" or "unread instant message" generally refers to an instant message sent by another user that the current user has not viewed or read.
The technical term "cache" in the present invention generally refers to a storage device capable of performing high-speed data exchange stored in a computing device, and is generally distinguished from a storage device such as a disk.
The technical term of the invention is called "LRU" with English being called as Least Used and Chinese being called as Least Used Recently.
The technical term "picture identification" referred to in the present invention refers to a unique identification ID of a picture. In the embodiment of the present invention, the MD5 value of the picture content may be used as the picture ID, and the picture ID may be used to identify the picture in the chat log.
The technical term "MD 5" is English called Message Digest Algorithm 5, Chinese called information Digest Algorithm 5, also called Digest Algorithm, Hash Algorithm, which is a hash Algorithm to ensure the information transmission is complete and consistent.
Of course, the above terms are merely illustrative and are not to be construed as limiting the present invention.
A method for processing a chat log of an instant chat tool according to an exemplary embodiment of the present invention will be described with reference to fig. 2 to 6.
Referring to fig. 2, a flow chart of a chat log processing method of the instant chat tool according to an embodiment of the present invention is provided. As shown in fig. 2, may include:
s201, responding to the request for obtaining the historical chat records between the current user and the specific user, and reading the historical chat records between the current user and the specific user from the cache.
In some embodiments, the request for obtaining the historical chat records between the current user and the specific user may specifically be a request for triggering display of the historical chat records between the current user and the specific user. For example, when the user clicks a control or button such as "show more messages" or "get historical chat", a request is sent to trigger the display of historical chat records between the current user and a particular user. For another example, when the user scrolls down the screen in the chat window between the current user and the specific user by using a mouse, a request for triggering the display of the historical chat history between the current user and the specific user may be sent. It should be noted that, the user may send a request for triggering and displaying the historical chat record between the current user and the specific user through various operations, and the specific implementation manner may be flexible and various, and is not limited herein.
In some embodiments, the request for obtaining the historical chat records between the current user and the specific user may also be a request for triggering the display of an unread instant message between the current user and the specific user. For example, when the user triggers the display of an unread instant message by opening a chat window of the chat tool with a specific user, it may be determined that a request for obtaining a history chat record between the current user and the specific user is sent. For another example, if the user closes the chat window with the specific user, when receiving the instant message sent by the specific user to the current user, the instant chat tool may display a prompt message to prompt the user that there is an unread message. When the user clicks the prompt message to trigger the display of the unread message, it may be determined that a request for obtaining a history chat record between the current user and the specific user is sent. It should be noted that, in some embodiments, after receiving a request for triggering display of an unread instant message between a current user and a specific user, it may be further determined whether the number or the volume of the unread instant messages is less than a set threshold; and if so, determining to send a request for acquiring the historical chat records between the current user and the specific user. The set threshold may be set according to needs, for example, the set threshold may be an upper limit of the number or the volume of the messages displayed on the display interface of the instant chat tool. The capacity of a message may refer to the number of words, the number of lines, or the occupied space of information contained in the message. For example, assuming that the current user a closes the chat window with the user B, when receiving a new message sent by the user B to the user a, it may be determined whether the number or the capacity of the new message is greater than the upper limit of the display message of the display interface; if the judgment result is negative, the historical chat records are obtained, so that the new messages and the historical chat records can be combined and displayed, the user can conveniently and quickly obtain the context information, and the user can conveniently communicate.
In some embodiments, the request for obtaining the historical chat record between the current user and the specific user may also be a request for obtaining the historical chat record between the current user and the specific user when receiving an instant message sent by the specific user to the current user and determining that the number or the capacity of the instant message is smaller than a set threshold. For example, instead of obtaining the historical chat records in response to a user triggering a request for displaying an unread message, in this embodiment, the request for obtaining the historical chat records is triggered when a new unread message is obtained and when the message is determined to meet a preset condition.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes: judging whether the historical chat records between the current user and the specific user are read from a local storage space or not; if the judgment result is yes, reading the historical chat record between the current user and the specific user from the cache. Further, the method further comprises: if the judgment result is negative, reading the historical chat record between the current user and the specific user from the local storage space, storing the read chat record in a cache, and recording the historical chat record between the current user and the specific user which is read from the local storage space. For example, when a request for obtaining a historical chat log is received, it can be determined whether the chat log has been read from the local storage space. For example, an identifier may be set to distinguish whether a chat log has been read locally. And if the chat records are judged to be read from the local storage space according to the set identification, directly reading the chat records from the cache. If the chat records are judged not to be read from the local storage space according to the set identification, the chat records can be read from the local storage space and stored in the cache. Further, the flag is set to indicate that the chat log has been read from the local storage space. When a request for obtaining the chat records is received again, the chat records can be directly obtained from the cache. Because the local storage space is accessed only when the identifier does not read the chat records from the local storage space, the chat records are read from the cache in other scenes, the speed of obtaining the chat records is greatly improved, and the loss of the local storage space is reduced.
In some embodiments, the method further comprises: and when the trigger condition is determined to be met, reading the historical chat record between the current user and the specific user from the local storage space in advance, and storing the read chat record in a cache. In this implementation, the historical chat records may be read from the local storage space in advance and saved in the cache. When a request for retrieving a chat log is received, the chat log is retrieved from the cache each time. The time for acquiring the historical chat records in advance can be when a trigger condition is met, and the specific trigger condition can be very flexible as long as the historical chat records are acquired from the local storage space at one time before the request for acquiring the chat records is received. For example, when an instant message sent by a particular user to a current user is received, it may be determined that a trigger condition is satisfied. For another example, when an operation of displaying a chat window of a current user and a specific user is received, it is determined that the trigger condition is satisfied. Of course, the above is only an exemplary illustration, and the specific trigger condition may be flexible as long as the historical chat records are acquired from the local storage space at one time before the request for acquiring the chat records is received.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes: judging whether the number or the capacity of the historical chat records between the current user and the specific user stored in the cache is larger than a set threshold value or not; if the judgment result is yes, directly reading the historical chat records with the quantity or the capacity equal to the set threshold value from the cache; if not, reading part of the historical chat records from the local storage space and storing the historical chat records in the cache, so that the number or the capacity of the historical chat records in the cache is larger than or equal to a set threshold. For example, when the user clicks "view more," N history messages may be triggered to load. Wherein, the setting of N can be carried out according to the requirement. At this point, the top message (typically the one that is the longest from the current time) of the chat session is found, and then N historical message records are read from the cache forward, with this message as the boundary. Specifically, if the history message records in the cache are sufficient, that is, greater than or equal to N, the read history chat records are directly displayed on the top of the chat session. If the historical message records stored in the cache are judged to be less than N, if the messages in the cache meeting the conditions are M, the (N-M) messages are read forwards from the local historical records by taking the first message record in the cache as a boundary, and are stored in the cache. Then, find the top message of the chat session, and then take this message as the boundary, read the N message records from the buffer and show them.
In some embodiments, the method further comprises: when the historical chat records contain pictures, judging whether pictures corresponding to the picture identifications are stored in a cache or not according to the picture identifications; and if so, acquiring the picture corresponding to the picture identifier from the cache. Further, if the judgment result is negative, the picture is obtained from the local storage space, and the picture and the corresponding relation between the picture and the picture identifier are stored in the cache. For example, in a specific implementation of the present invention, when the chat record is saved, if the chat record includes a picture, only the identifier of the picture is saved in the chat record and is used for identifying the picture. Further, the invention can be provided with a picture cache for storing picture data corresponding to the picture ID. When obtaining the historical chat record, if the chat record is judged to contain the picture, for example, if the chat record contains the picture ID, whether the picture corresponding to the picture ID is stored in the picture cache can be judged according to the picture ID; if the judgment result is yes, the picture content is directly acquired for displaying, so that the speed of acquiring the picture is greatly improved, and the picture does not need to be downloaded from the local storage space every time. And if the picture does not exist, reading the picture from the local storage space and storing the picture in a picture cache. Because pictures in the chat records of the instant chat tool are often repeated, such as various emoticons, the pictures and the corresponding relationship between the picture identifiers and the pictures only need to be stored in the picture cache, that is, the pictures can be directly read from the cache when the same pictures are obtained, and the pictures with the same picture identifiers are only stored in the cache once, so that the waste of storage space is reduced. Wherein, the identification of the picture can be obtained by obtaining the MD5 value of the picture. It should be noted that, through the above processing, the speed of acquiring and displaying the picture information can be increased independently, and it is not necessary to read the picture from the local disk each time.
S202, displaying the historical chat records between the current user and the specific user.
It should be noted that, in specific implementation, the historical chat records can be separately displayed. Or it may be presented in combination with the unread instant message. For example, the instant message may be displayed in combination with the historical chat history in response to a user triggering a request to display the instant message.
In some embodiments, the method further comprises: saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache. For example, if there are many chat records of the current user, there are many chat records and pictures stored in the cache, and the memory of the computer is occupied, so as to reduce the memory occupation, the access time of the current user for obtaining the chat records of the specific user can be identified when accessing the cache each time; and triggering and judging whether the current cache data exceeds the upper limit of the cache and unread new messages do not exist in the cache, if so, determining the chat records which are used least recently according to the access time, and deleting the chat records from the cache. The chat record which is used least recently may be a record in which the access time exceeds a set threshold from the current time, or may be a chat record in which the access frequency is the least within a preset time. Through the processing, the memory occupation can be effectively reduced, and the memory overhead can be reduced.
In some embodiments, the reading the history chat records between the current user and the specific user from the cache includes: reading a part of historical chat records meeting specific conditions between a current user and a specific user from a cache; the specific conditions comprise historical chat records which meet specific time conditions, specific place conditions or specific keywords; the displaying the historical chat records between the current user and the specific user comprises: and displaying the partial historical chat records, wherein each chat record in the partial historical chat records does not have a time continuous relationship or the historical chat records do not have a time continuous relationship with the chat record recently displayed by the current instant chat tool. In the concrete implementation, instead of obtaining all the chat records between the current user and the specific user and continuously displaying the chat records according to the time sequence, only part of the historical chat records which meet the specific conditions can be obtained and displayed. For example, historical chat records that meet specific time conditions. Assuming that the current time is friday, the current user a is chatting with a particular user B through the instant chat facility. User B mentions: "how well the things mentioned in tuesday are processed", at this time, the user a is likely to want to see the chatting records of tuesday, at this time, "tuesday" may be determined as a keyword, only the history chatting records corresponding to tuesday are obtained from the cache, and the chatting records of tuesday are displayed in the chatting interface. Thus, the Tuesday chat history and the most recent chat history presented in the current window (Friday) do not have a time-continuous relationship. In this way, not only less data can be obtained, but also the user can conveniently and intuitively view the interesting content without searching for the interesting content in a large number of chat records (for example, all the chat records in a continuous time period of friday to tuesday). Also for example, the chat history can be a chat history meeting the specific location condition. If the login place is changed when the current user frequently goes on a business trip, the chat records of the specific place can be obtained according to the input of the user. As another example, the portion of the historical chat history may also be a chat history that matches a particular keyword. When matching the keywords, the matching may be complete matching or partial matching, and may be exact matching or fuzzy matching. Further, machine learning algorithms can be used for artificial intelligence automatic matching. For example, user B mentions "how well ask XX is processed", and then can determine keyword "XX" and find the matched chat records. If there are multiple chat records for the keyword "XX", they can be displayed in combination. For example, if the current time is friday, and there are associated chat records on tuesday and wednesday, respectively, the chat records on wednesday and wednesday may be presented in reverse order of time. At this time, the chat records in the partial historical chat records displayed do not have a time continuous relationship.
In order to facilitate those skilled in the art to more clearly understand the embodiments of the present application in a specific context, the following describes the embodiments of the present application with two specific examples. It should be noted that the specific example is only to make the present invention more clearly understood by those skilled in the art, but the embodiments of the present invention are not limited to the specific example.
Referring to fig. 3, a flow chart of a chat history processing method of the instant chat tool according to another embodiment of the present invention is provided. As shown in fig. 3, may include:
s301, the instant chat tool receives a new message sent by a specific user to the current user.
For example, suppose user a receives a new message sent by user B after logging in the instant chat tool.
S302, the instant chat tool saves the new message in a cache and a local disk file.
It should be noted that the new message may be stored in a later storage location in the cache, and marked as a new message, while it is stored in the local disk file. The history message read from the local disk file is stored in the earlier storage location of the cache.
S303, responding to a request for triggering and displaying a new message by a user, reading the new message from the cache, and judging whether the number or the capacity of the new message is less than a set threshold value or not; if yes, go to step S304; and if the judgment result is negative, directly displaying the new message, and storing the displayed message in a history chat record cache corresponding to the specific user.
S304, judging whether the historical chat records between the current user and the specific user are read from the local storage space or not according to the set access identifier. If yes, go to S305; if the judgment result is negative, executing S306;
s305, reading the historical chat records of the current user and the specific user from the cache, and then executing S307.
It should be noted that the cache stores the history chat records read from the local disk file in advance and the history chat records directly stored in the cache, for example, the new message shown in S303 is stored in the history chat record cache corresponding to the specific user after the user views the new message.
S306, reading the historical chat records corresponding to the specific user from the local disk file, storing the chat records in a cache, setting an access identifier for indicating that the historical chat records between the current user and the specific user are read from the local storage space, and then executing S307.
S307, the new message and the historical chat record are merged and displayed.
When the method and the system are specifically implemented, the new message can be displayed for the user, and meanwhile, the historical chat records can be displayed together. When the user opens more chat sessions, the user can conveniently know the context information. Since the historical chat records can be directly read from the cache, the speed of obtaining the chat records and the efficiency of displaying messages are greatly improved, and better experience is brought to users.
Referring to fig. 4, a flow chart of a chat history processing method of the instant chat tool according to another embodiment of the present invention is provided. As shown in fig. 4, may include:
s401, the instant chat tool receives a new message sent by a specific user to the current user.
For example, suppose user a receives a new message sent by user B after logging in the instant chat tool.
S402, the instant chat tool saves the new message in a cache and a local disk file.
It should be noted that the new message may be stored in a later storage location in the cache, and marked as a new message, while it is stored in the local disk file. The history message read from the local disk file is stored in the earlier storage location of the cache.
And S403, responding to a request for displaying a new message triggered by a user, reading the new message from the cache, and displaying the new message.
For example, when the user a opens a chat session with the user B, the cache of the chat message between the user a and the user B may be found from the cache in response to the trigger operation, the cache data marked as the new message may be read from the cache, and the new message mark may be cleared. The new message read is then presented at the bottom of the current chat session.
S404, responding to the request of obtaining the historical chat records triggered by the user, and judging whether the quantity or the capacity of the historical chat records stored in the cache is larger than N. If yes, go to step S405; if the determination result is negative, S406 is executed.
S405, reading the historical chat records with the number or the capacity equal to N directly from the cache.
S406, reading partial history chat records from the local disk file and storing the partial history chat records in the cache, wherein the number or the capacity of the history chat records in the cache is larger than N, and reading the history chat records with the number or the capacity equal to N from the cache.
For example, when the user clicks "view more," N history messages may be triggered to load. Wherein, the setting of N can be carried out according to the requirement. At this time, the topmost message in the current conversation window, that is, the message displayed in the current conversation window and farthest from the current time is found, and N history message records are read forward from the cache by taking the message as a boundary. And if the historical message records stored in the cache are judged to be more than N, directly displaying the read N historical records. If the historical message records stored in the cache are smaller than N, for example, the historical message records stored in the current cache are M, the first message record in the cache is taken as a boundary (for example, the record which is stored in the cache and farthest from the current time), and the (N-M) message records are read forwards from the local historical message records and stored in the cache by taking the record which is stored in the cache and farthest from the current time as a boundary. Then, taking the top message displayed in the current conversation window as a boundary, and reading N message records from the cache forwards.
S407, displaying the N historical chat records obtained from the cache.
Referring to fig. 5, a flow chart of a chat history processing method of the instant chat tool according to another embodiment of the present invention is provided. As shown in fig. 5, may include:
s501, receiving an operation of triggering a first control by a user.
S502, responding to the operation that a user triggers a first control, and displaying at least part of historical chat records between the current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
In some embodiments, the method further comprises: receiving an operation of triggering a second control by a user; responding to the operation that the user triggers the second control, and displaying at least part of historical chat records between the current user and the specific user; wherein, each chat record in the at least part of historical chat records has a time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have a time continuous relationship. Further, before displaying at least a portion of the historical chat history between the current user and the particular user, the method further comprises: reading at least part of historical chat records between the previous user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache.
In the embodiment of the invention, a mode of acquiring all the chat records of the user and continuously displaying the chat records according to the time sequence in the prior art can be replaced, only partial historical chat records which accord with specific conditions can be acquired and displayed, and the displayed historical chat records do not have time continuous relation or the at least partial historical chat records do not have time continuous relation with the chat records recently displayed by the current instant chat tool, so that the user can conveniently acquire the specific chat records. Because only part of the historical chat records are acquired, the data acquisition quantity is small, the reading speed is high, the information acquisition efficiency of the user is obviously improved, and the user experience is improved.
Specific implementations are described in detail below.
In particular, the second control and the first control can be displayed on a user interface of the instant chat tool. The second control is used for responding to the triggering of the user and displaying at least part of historical chat records between the current user and the specific user, and each chat record in the at least part of historical chat records has a time continuous relation or the historical chat records have a time continuous relation with the chat record recently displayed by the current instant chat tool. The first control is used for responding to the triggering of a user and displaying at least part of historical chat records meeting specific conditions between the current user and the specific user, and all the chat records in the part of the historical chat records do not have time continuous relation or the historical chat records do not have time continuous relation with the chat records recently displayed by the current instant chat tool.
For example, the second control can display the last N chat records or display all the historical chat records, and the first control can display the related chat records. For example, the user may click on the second control if the user wants to view a historical chat history that is continuous in time, such as a history of a tuesday to friday chat. The first control may be triggered if the user wants to view a portion of the related chat history. See fig. 6A for details.
It should be noted that, in response to the user triggering the operation of the first control, the part of the historical chat records meeting the specific condition between the current user and the specific user, which are read from the cache, may be the part of the historical chat records meeting the specific condition. The specific condition includes a history chatting record meeting a specific time condition, a specific place condition or a specific keyword. In the concrete implementation, instead of obtaining all the chat records between the current user and the specific user and continuously displaying the chat records according to the time sequence, only part of the historical chat records which meet the specific conditions can be obtained and displayed. For example, historical chat records that meet specific time conditions. Assuming that the current time is friday, the current user a is chatting with a particular user B through the instant chat facility. User B mentions: "how well the things mentioned in tuesday are processed", at this time, the user a is likely to want to see the chatting records of tuesday, at this time, "tuesday" may be determined as a keyword, only the history chatting records corresponding to tuesday are obtained from the cache, and the chatting records of tuesday are displayed in the chatting interface. Thus, the Tuesday chat history and the most recent chat history presented in the current window (Friday) do not have a time-continuous relationship. In this way, not only less data can be obtained, but also the user can conveniently and intuitively view the interesting content without searching for the interesting content in a large number of chat records (for example, all the chat records in a continuous time period of friday to tuesday). Also for example, the chat history can be a chat history meeting the specific location condition. If the login place is changed when the current user frequently goes on a business trip, the chat records of the specific place can be obtained according to the input of the user. As another example, the portion of the historical chat history may also be a chat history that matches a particular keyword. When matching the keywords, the matching may be complete matching or partial matching, and may be exact matching or fuzzy matching. Further, machine learning algorithms can be used for artificial intelligence automatic matching. For example, user B mentions "how well ask XX is processed", and then can determine keyword "XX" and find the matched chat records. If there are multiple chat records for the keyword "XX", they can be displayed in combination. For example, if the current time is friday, and there are associated chat records on tuesday and wednesday, respectively, the chat records on wednesday and wednesday may be presented in reverse order of time. At this time, the chat records in the partial historical chat records displayed do not have a time continuous relationship.
In this embodiment of the present invention, a plurality of controls may be displayed in the user interface, and different display modes may be entered according to the triggering operation of the user on the controls. One mode of display is to present all or part of the chat log in a time-continuous manner. One mode of display is to present portions of the chat log in a non-time continuous manner. Fig. 6B and 6C are schematic views illustrating effects of the embodiment of the present invention. Fig. 6B is a time-continuous display and fig. 6C is a non-time-continuous display, wherein a dashed line separates the new chat log from the historical chat log. For example, suppose that user a and user B are chatting via the instant chat tool, the currently and recently presented chat records are new messages 103 and 104, the generation time of message 104 is 2016, 1, 8, 9, 31 minutes, and the generation time of message 103 is 2016, 1, 8, 9, 28 minutes. In a specific implementation, the second control 105 may be displayed on a display interface of the instant chat tool, for example, a control that displays all chat records; and a first control 106 is exposed, such as a control that displays relevant chat logs.
Referring to fig. 6B, if the user triggers the second control 105, the historical chat records of the previous user a and the previous user B in a continuous time period are read from the cache, and the chat records are sequentially displayed according to the time sequence. As shown in fig. 6B, as the user triggers the second control, in addition to presenting message 103 and message 104, historical chat log messages 101, 102 … … 107 are further presented. The generation time of the messages 101, 102, 107 is continuous, that is, the chat records generated continuously by the user going back and forth in the current time are obtained, and the presentation is also sequentially presented according to the time sequence. Corresponding to the display mode of fig. 6B, if the user wants to view the chatting records of tuesday (i.e., 1/4/2016), the user needs to search for the consecutive chatting records going back from the current time.
Referring to fig. 6C, if the user triggers the first control 106, that is, the user selects to display the relevant chat records, the historical chat records of the previous user a and the previous user B meeting the specific conditions are read from the cache. As shown in fig. 6C, if the user triggers the second control, in addition to presenting message 103 and message 104, only chat log 107 related to the current message, i.e. only the Tuesday (1/4/2016) chat log, is presented. Without revealing the messages 101, 102, etc. Corresponding to the display mode of fig. 6C, if the user can conveniently view the chatting records of tuesday (i.e., 2016, 1, 4), there is no need to search a large number of consecutive chatting records going back from the current time.
Referring to fig. 7, a schematic diagram of a chat log processing apparatus of an instant chat tool according to an embodiment of the present invention is shown.
A chat history processing apparatus 700 of an instant chat tool, comprising:
an obtaining unit 701, configured to, in response to a request for obtaining a history chat record between a current user and a specific user, read the history chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache;
a display unit 702, configured to display the historical chat record.
In some embodiments, the obtaining unit comprises:
the first judging unit is used for judging whether the historical chat records between the current user and the specific user are read from the local storage space or not;
and the first reading unit is used for reading the historical chat record between the current user and the specific user from the cache if the historical chat record between the current user and the specific user is judged to be read from the local storage space.
In some embodiments, the apparatus further comprises:
the second reading unit is used for reading the historical chatting record between the current user and the specific user from the local storage space if the fact that the historical chatting record between the current user and the specific user is not read from the local storage space is judged;
and the first storage unit is used for storing the read chatting records in a cache, and recording that the historical chatting records between the current user and the specific user are read from the local storage space.
In some embodiments, the apparatus further comprises:
the third reading unit is used for reading the historical chat records between the current user and the specific user from the local storage space in advance when the trigger condition is determined to be met;
and the second storage unit is used for storing the read chat records in a cache.
In some embodiments, the apparatus further comprises:
the second judging unit is used for judging whether a picture corresponding to the identifier of the picture is stored in a cache or not according to the identifier of the picture when the historical chat record is determined to contain the picture;
and the fourth reading unit is used for acquiring the picture corresponding to the picture identifier from the cache if the judgment result is yes.
A fifth reading unit, configured to obtain the picture from a local storage space if the determination result is negative;
and the third storage unit is used for storing the pictures and the corresponding relation between the pictures and the picture identifications in a cache.
In some embodiments, the apparatus further comprises:
the fourth storage unit is used for storing the access time for acquiring the historical chat records from the cache;
and the deleting unit is used for determining the history chatting record which is used least recently according to the access time and deleting the history chatting record from the cache when the triggering condition is met.
In some embodiments, the apparatus further comprises:
the sending unit is used for judging whether the number or the capacity of the instant messages is smaller than a set threshold value or not when the instant messages sent to the current user by a specific user are received; and if so, sending a request for acquiring the historical chat records between the current user and the specific user.
In some embodiments, the presentation unit is specifically configured to:
and in response to a request for displaying the instant message triggered by a user, merging and displaying the instant message and the historical chat records.
In some embodiments, the obtaining unit comprises: a third judging unit, configured to judge whether the number or capacity of the historical chat records between the current user and the specific user stored in the cache is greater than a set threshold; a sixth reading unit, configured to, if the determination result is yes, directly read, from the cache, historical chat records whose number or capacity is equal to the set threshold; and the seventh reading unit is used for reading partial historical chat records from the local storage space and storing the partial historical chat records into the cache, so that the number or the capacity of the historical chat records in the cache is greater than or equal to the set threshold.
In some embodiments, the obtaining unit is specifically configured to read, from a cache, a part of historical chat records that meet a specific condition between a current user and a specific user; the specific conditions comprise historical chat records which meet specific time conditions, specific place conditions or specific keywords;
the display unit is specifically configured to display the partial history chat records, where each chat record in the partial history chat records does not have a time-continuous relationship or the history chat records do not have a time-continuous relationship with a chat record recently displayed by a current instant chat tool.
Referring to fig. 8, a schematic diagram of a chat log processing apparatus of an instant chat tool according to another embodiment of the present invention is shown.
A chat history processing apparatus 800 of an instant chat tool, comprising:
the receiving unit 801 is configured to receive an operation that a user triggers a first control.
A display unit 802, configured to display at least a part of historical chat records between a current user and a specific user in response to an operation of a user triggering a first control; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
In some embodiments, the receiving unit 801 is further configured to: and receiving the operation of triggering the second control by the user.
In some embodiments, the display unit 802 is further configured to: responding to the operation that the user triggers the second control, and displaying at least part of historical chat records between the current user and the specific user; wherein, each chat record in the at least part of historical chat records has a time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have a time continuous relationship.
In some embodiments, the apparatus further comprises:
the reading unit is used for reading at least part of historical chat records between the previous user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache.
The arrangement of each unit or module of the device of the present invention can be implemented by referring to the methods shown in fig. 2 to 6, which are not described herein again.
Referring to fig. 9, a diagram of a device for processing chat logs of an instant chat tool according to another embodiment of the present application is shown. The method comprises the following steps: at least one processor 901 (e.g., CPU), memory 902 and at least one communication bus 903 for enabling communications among the devices. The processor 901 is adapted to execute executable modules, e.g. computer programs, stored in the memory 902. The Memory 902 may comprise a high-speed Random Access Memory (RAM) and may further comprise a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. One or more programs are stored in the memory and configured to be executed by the one or more processors 901 include instructions for: responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; and displaying the historical chat records between the current user and the specific user.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: judging whether the historical chat records between the current user and the specific user are read from a local storage space or not; if the judgment result is yes, reading the historical chat record between the current user and the specific user from the cache.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: if the judgment result is negative, reading the historical chat record between the current user and the specific user from the local storage space, storing the read chat record in a cache, and recording the historical chat record between the current user and the specific user which is read from the local storage space.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: and when the trigger condition is determined to be met, reading the historical chat record between the current user and the specific user from the local storage space in advance, and storing the read chat record in a cache.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: when the historical chat records contain pictures, judging whether pictures corresponding to the picture identifications are stored in a cache or not according to the picture identifications; and if so, acquiring the picture corresponding to the picture identifier from the cache.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: if the judgment result is negative, the picture is obtained from the local storage space, and the picture and the corresponding relation between the picture and the picture identification are stored in the cache.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: when receiving an instant message sent to a current user by a specific user, judging whether the number or the capacity of the instant message is smaller than a set threshold value; and if so, sending a request for acquiring the historical chat records between the current user and the specific user.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: and in response to a request for displaying the instant message triggered by a user, merging and displaying the instant message and the historical chat records.
In some embodiments, processor 901 is specifically configured to execute the one or more programs including instructions for: judging whether the number or the capacity of the historical chat records between the current user and the specific user stored in the cache is larger than a set threshold value or not; if the judgment result is yes, directly reading the historical chat records with the quantity or the capacity equal to the set threshold value from the cache; if not, reading part of the historical chat records from the local storage space and storing the historical chat records in the cache, so that the number or the capacity of the historical chat records in the cache is larger than or equal to a set threshold.
The embodiment of the invention also provides a device for processing the chat records of the instant chat tool, which comprises the following steps: at least one processor (e.g., CPU), memory, and at least one communication bus for enabling communications among the devices. The processor is used to execute executable modules, such as computer programs, stored in the memory. The Memory may comprise a Random Access Memory (RAM) and may also include a non-volatile Memory, such as at least one disk Memory. One or more programs are stored in the memory and configured to be executed by the one or more processors include instructions for: receiving an operation of triggering a first control by a user; responding to the operation that a user triggers a first control, and displaying at least part of historical chat records between a current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship.
In some embodiments, the one or more processors are specifically configured to execute the one or more programs including instructions for: receiving an operation of triggering a second control by a user; responding to the operation that the user triggers the second control, and displaying at least part of historical chat records between the current user and the specific user; wherein, each chat record in the at least part of historical chat records has a time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have a time continuous relationship.
In some embodiments, the one or more processors are specifically configured to execute the one or more programs including instructions for: reading at least part of historical chat records between the previous user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is only limited by the appended claims
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort. The foregoing is directed to embodiments of the present invention, and it is understood that various modifications and improvements can be made by those skilled in the art without departing from the spirit of the invention.
Claims (16)
1. A chat record processing method of an instant chat tool is characterized by comprising the following steps:
responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; the cache includes a memory stored in the computing device that enables high-speed data exchange;
displaying the historical chat records between the current user and a specific user;
the method further comprises the following steps: saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache.
2. The method of claim 1, wherein reading the historical chat history between the current user and the specific user from the cache comprises:
judging whether the historical chat records between the current user and the specific user are read from a local storage space or not;
if the judgment result is yes, reading the historical chat record between the current user and the specific user from the cache.
3. The method of claim 2, further comprising:
if the judgment result is negative, reading the historical chat record between the current user and the specific user from the local storage space, storing the read chat record in a cache, and recording the historical chat record between the current user and the specific user which is read from the local storage space.
4. The method of claim 1, further comprising:
and when the trigger condition is determined to be met, reading the historical chat record between the current user and the specific user from the local storage space in advance, and storing the read chat record in a cache.
5. The method of claim 4, wherein the determining that a trigger condition is satisfied comprises:
when receiving an instant message sent to a current user by a specific user, determining that a trigger condition is met; or,
when receiving an operation that a user triggers and displays a chat window of a current user and a specific user, determining that a triggering condition is met.
6. The method of claim 1, further comprising:
when the historical chat records contain pictures, judging whether pictures corresponding to the picture identifications are stored in a cache or not according to the picture identifications;
and if so, acquiring the picture corresponding to the picture identifier from the cache.
7. The method of claim 6, further comprising:
if the judgment result is negative, the picture is obtained from the local storage space, and the picture and the corresponding relation between the picture and the picture identification are stored in the cache.
8. The method of claim 1, further comprising:
when receiving an instant message sent to a current user by a specific user, judging whether the number or the capacity of the instant message is smaller than a set threshold value; and if so, sending a request for acquiring the historical chat records between the current user and the specific user.
9. The method of claim 8, wherein presenting the historical chat history comprises:
and in response to a request for displaying the instant message triggered by a user, merging and displaying the instant message and the historical chat records.
10. The method of claim 1, 8 or 9, wherein reading the historical chat history between the current user and the specific user from the cache comprises:
reading a part of historical chat records meeting specific conditions between a current user and a specific user from a cache; the specific conditions comprise historical chat records which meet specific time conditions, specific place conditions or specific keywords; the displaying the historical chat records between the current user and the specific user comprises:
and displaying the partial historical chat records, wherein each chat record in the partial historical chat records does not have a time continuous relationship or the historical chat records do not have a time continuous relationship with the chat record recently displayed by the current instant chat tool.
11. The method of claim 1, wherein reading the historical chat history between the current user and the specific user from the cache comprises:
judging whether the number or the capacity of the historical chat records between the current user and the specific user stored in the cache is larger than a set threshold value or not; if the judgment result is yes, directly reading the historical chat records with the quantity or the capacity equal to the set threshold value from the cache; if not, reading part of the historical chat records from the local storage space and storing the historical chat records in the cache, so that the number or the capacity of the historical chat records in the cache is larger than or equal to a set threshold.
12. A chat record processing method of an instant chat tool is characterized by comprising the following steps:
receiving an operation of triggering a first control by a user;
responding to the operation that a user triggers a first control, and reading at least part of historical chat records between a previous user and a specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; the cache includes a memory stored in the computing device that enables high-speed data exchange; displaying at least part of historical chat records between a current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship; the method further comprises the following steps: saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache.
13. The method of claim 12, further comprising: receiving an operation of triggering a second control by a user;
responding to the operation that the user triggers the second control, and displaying at least part of historical chat records between the current user and the specific user; wherein, each chat record in the at least part of historical chat records has a time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have a time continuous relationship.
14. A chat history processing apparatus of an instant chat tool, comprising:
the obtaining unit is used for responding to a request for obtaining the historical chat records between the current user and the specific user, and reading the historical chat records between the current user and the specific user from the cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; the cache includes a memory stored in the computing device that enables high-speed data exchange; saving the access time of the historical chat records obtained from the cache; when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache;
and the display unit is used for displaying the historical chat records.
15. A chat history processing apparatus of an instant chat tool, comprising:
the receiving unit is used for receiving the operation of triggering the first control by a user;
the display unit is used for reading at least part of historical chat records between the previous user and the specific user from the cache in response to the operation that the user triggers the first control; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; the cache includes a memory stored in the computing device that enables high-speed data exchange; displaying at least part of historical chat records between a current user and a specific user; wherein, each chat record in the at least part of historical chat records has no time continuous relationship or the at least part of historical chat records and the chat record recently displayed by the current instant chat tool have no time continuous relationship; saving the access time of the historical chat records obtained from the cache; and when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache.
16. An apparatus for chat log processing for an instant chat tool, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by one or more processors the one or more programs include instructions for:
responding to a request for obtaining a historical chat record between a current user and a specific user, and reading the historical chat record between the current user and the specific user from a cache; the cache stores historical chat records read from a local storage space in advance and historical chat records directly stored in the cache; the cache includes a memory stored in the computing device that enables high-speed data exchange; saving the access time of the historical chat records obtained from the cache; when the triggering condition is met, determining the history chatting record which is used least recently according to the access time, and deleting the history chatting record from the cache;
and displaying the historical chat records between the current user and the specific user.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611036740.6A CN108090079B (en) | 2016-11-22 | 2016-11-22 | Chat record processing method and device of instant chat tool |
TW106127146A TWI743163B (en) | 2016-11-22 | 2017-08-10 | Chat record processing method and device of instant chat tool |
PCT/CN2017/110333 WO2018095223A1 (en) | 2016-11-22 | 2017-11-10 | Method and device for processing chat log of real-time chat tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611036740.6A CN108090079B (en) | 2016-11-22 | 2016-11-22 | Chat record processing method and device of instant chat tool |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108090079A CN108090079A (en) | 2018-05-29 |
CN108090079B true CN108090079B (en) | 2021-03-02 |
Family
ID=62168642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611036740.6A Active CN108090079B (en) | 2016-11-22 | 2016-11-22 | Chat record processing method and device of instant chat tool |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN108090079B (en) |
TW (1) | TWI743163B (en) |
WO (1) | WO2018095223A1 (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108932143A (en) * | 2018-06-01 | 2018-12-04 | 国电南瑞科技股份有限公司 | A kind of warning information Dynamic Display method based on Dispatching Control System |
CN109242479A (en) * | 2018-09-04 | 2019-01-18 | 深圳市百宝廊珠宝首饰有限公司 | Method and device for getting red envelope based on point system |
CN110943904A (en) * | 2018-09-25 | 2020-03-31 | 北京国双科技有限公司 | Message processing method and device, storage medium and processor |
CN109495643B (en) * | 2018-10-29 | 2021-01-01 | 努比亚技术有限公司 | Object multi-chat frame setting method and terminal |
CN109766462B (en) * | 2018-12-27 | 2020-12-15 | 山东信通电子股份有限公司 | Image file reading method, device and system in power transmission line monitoring system |
CN110365739A (en) * | 2019-06-05 | 2019-10-22 | 平安科技(深圳)有限公司 | Message synchronization method, apparatus, computer installation and computer readable storage medium |
CN111600789A (en) * | 2020-05-11 | 2020-08-28 | 百度在线网络技术(北京)有限公司 | Instant messaging method, system, device, electronic equipment and storage medium |
CN112866272B (en) * | 2021-01-27 | 2022-11-01 | 天翼数字生活科技有限公司 | Anti-theft chain management and control method of cloud platform, downloading platform and equipment |
CN116450635B8 (en) * | 2023-06-15 | 2024-03-22 | 中免日上互联科技有限公司 | Data cleaning method and system based on artificial intelligence |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425081A (en) * | 2008-12-05 | 2009-05-06 | 深圳华为通信技术有限公司 | Character association information cuing method and terminal |
CN105208212A (en) * | 2015-09-30 | 2015-12-30 | 努比亚技术有限公司 | Chatting record display device and method |
CN105260451A (en) * | 2015-10-13 | 2016-01-20 | Tcl移动通信科技(宁波)有限公司 | Chat history information processing method and system based on mobile terminal |
CN105429846A (en) * | 2014-09-18 | 2016-03-23 | 中兴通讯股份有限公司 | Instant chat tool chat record synchronization methods and terminal equipment |
CN105608100A (en) * | 2015-08-31 | 2016-05-25 | 南京酷派软件技术有限公司 | Information extraction method and information extraction device |
WO2016119165A1 (en) * | 2015-01-29 | 2016-08-04 | 华为技术有限公司 | Chat history display method and apparatus |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0340046A (en) * | 1989-07-06 | 1991-02-20 | Hitachi Ltd | Cache memory control system and information processor |
US7243163B1 (en) * | 2001-08-07 | 2007-07-10 | Good Technology, Inc. | System and method for full wireless synchronization of a data processing apparatus with a messaging system |
CN101221585A (en) * | 2008-02-03 | 2008-07-16 | 华为技术有限公司 | Data storage method and device |
CN102223313A (en) * | 2011-06-07 | 2011-10-19 | 盛乐信息技术(上海)有限公司 | Method and system for processing Internet video chat logs |
US9300621B2 (en) * | 2012-02-05 | 2016-03-29 | Apple Inc. | Communication history aggregation and presentation |
CN104348713A (en) * | 2014-10-17 | 2015-02-11 | 国家电网公司 | Instant messaging method based on comet of network platform under B/S (Browser/Server) architecture |
-
2016
- 2016-11-22 CN CN201611036740.6A patent/CN108090079B/en active Active
-
2017
- 2017-08-10 TW TW106127146A patent/TWI743163B/en active
- 2017-11-10 WO PCT/CN2017/110333 patent/WO2018095223A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425081A (en) * | 2008-12-05 | 2009-05-06 | 深圳华为通信技术有限公司 | Character association information cuing method and terminal |
CN105429846A (en) * | 2014-09-18 | 2016-03-23 | 中兴通讯股份有限公司 | Instant chat tool chat record synchronization methods and terminal equipment |
WO2016119165A1 (en) * | 2015-01-29 | 2016-08-04 | 华为技术有限公司 | Chat history display method and apparatus |
CN105608100A (en) * | 2015-08-31 | 2016-05-25 | 南京酷派软件技术有限公司 | Information extraction method and information extraction device |
CN105208212A (en) * | 2015-09-30 | 2015-12-30 | 努比亚技术有限公司 | Chatting record display device and method |
CN105260451A (en) * | 2015-10-13 | 2016-01-20 | Tcl移动通信科技(宁波)有限公司 | Chat history information processing method and system based on mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN108090079A (en) | 2018-05-29 |
WO2018095223A1 (en) | 2018-05-31 |
TWI743163B (en) | 2021-10-21 |
TW201820903A (en) | 2018-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108090079B (en) | Chat record processing method and device of instant chat tool | |
US20210073058A1 (en) | Message processing method and apparatus, storage medium, and computer device | |
US20210119953A1 (en) | Method and system for synchronizing instant messages between multiple clients | |
US9804752B1 (en) | Machine learning method of managing conversations in a messaging interface | |
US7661067B2 (en) | Method for providing quick responses in instant messaging conversations | |
CN112162965B (en) | Log data processing method, device, computer equipment and storage medium | |
CN111277847B (en) | Method, device, server and system for displaying chat messages in live broadcast | |
US10200327B1 (en) | Storage management for ephemeral messages | |
CN112769679A (en) | Message display method and device | |
US20160180560A1 (en) | Image insertion in a message | |
CN111831618A (en) | Data writing method, data reading method, device, equipment and storage medium | |
CN111510439A (en) | Session reminding method and device, computer equipment and storage medium | |
CN111130986B (en) | Message sending method, device, equipment and storage medium | |
US20090094368A1 (en) | Instant messaging general queue depth management | |
CN111447138A (en) | Display method and device of mass-sending instant message, computer equipment and storage medium | |
US10230673B1 (en) | Methods, systems, and media for generating contextually relevant messages | |
CN113805864A (en) | Project engineering generation method and device, electronic equipment and storage medium | |
CN106789568A (en) | A kind of communication information acquisition methods and device | |
KR102103015B1 (en) | Apparatus and operating method of instance messenger application | |
CN106375363B (en) | Method, system and device for eliminating message reminding in social application client | |
US11553015B2 (en) | Progressive instantiation of workspaces for a group-based communication system | |
CN113656731A (en) | Advertisement page processing method and device, electronic equipment and storage medium | |
CN115373831A (en) | Data processing method, device and computer readable storage medium | |
CN112416482A (en) | Interface switching method and device | |
CN112800303A (en) | Browser data storage and reading method and related device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1256078 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |