CN110138652B - Session updating method and device and client device - Google Patents

Session updating method and device and client device Download PDF

Info

Publication number
CN110138652B
CN110138652B CN201910423181.1A CN201910423181A CN110138652B CN 110138652 B CN110138652 B CN 110138652B CN 201910423181 A CN201910423181 A CN 201910423181A CN 110138652 B CN110138652 B CN 110138652B
Authority
CN
China
Prior art keywords
session
list
entry
data
primary
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
Application number
CN201910423181.1A
Other languages
Chinese (zh)
Other versions
CN110138652A (en
Inventor
李明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910423181.1A priority Critical patent/CN110138652B/en
Publication of CN110138652A publication Critical patent/CN110138652A/en
Application granted granted Critical
Publication of CN110138652B publication Critical patent/CN110138652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The disclosure relates to a session updating method and device and a client device. The method comprises the following steps: obtaining session data of each session to be updated, wherein the session data of each session comprises: session identification, classification identification and session information; updating a session database of the client according to the obtained session data; grouping the conversation items in the conversation database according to the classification identification to obtain a group of first conversation items and at least one group of second conversation items; updating the session list according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list. According to the method and the device, on the premise that the session display is carried out by the client side in a session aggregation mode, the interaction times between the client side and the server can be reduced, and therefore time consumption is reduced.

Description

Session updating method and device and client device
Technical Field
The present disclosure relates to the field of instant messaging technologies, and in particular, to a session update method and apparatus, and a client device.
Background
In the instant messaging client, the types and the number of the sessions are large, and the sessions cannot be displayed to the user in the client at one time. After the sessions of the same type are aggregated, the aggregated sessions and other non-aggregated sessions are displayed to the user together, so that the problem can be solved. Wherein the aggregated session seen by the user in the client resembles a folder.
For a client that performs session presentation by using an aggregated session, in the related art, a session update method of the client includes: after the server sends the session data to the client, the client merges with the local session based on the received session data to complete the session update of the client. In the updated session, the session messages in the non-aggregated session are updated, while the session messages in the aggregated session are not updated. When a user needs to check sub-sessions in a certain aggregation session, the client requests the server for session messages of the sub-sessions in the aggregation session, and updates the sub-sessions in the aggregation session based on the requested session messages.
Therefore, in the existing session updating method, the client and the server need to interact for several times, so that all the sessions of the client can be updated, and the required time is long. Therefore, how to reduce the number of interactions between the client and the server on the premise of not changing the way that the client performs session display by using the aggregated session, thereby reducing time consumption, is a problem to be solved urgently.
Disclosure of Invention
The present disclosure provides a session update method, a session update device, and a client device, so as to at least solve the problem in the related art of how to reduce the number of interactions between a client and a server, thereby reducing time consumption, on the premise of not changing the way in which the client performs session display by using aggregated sessions. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a session update method, which is applied to a client, and includes:
obtaining session data of each session to be updated, wherein the session data of each session comprises: the session identification, the classification identification and the session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is the session to be aggregated;
updating a local session database of the client according to the obtained session data, wherein the content of each session entry in the session database is session data of a generated session;
grouping all conversation items in the conversation database according to the classification identification to obtain a group of first conversation items and at least one group of second conversation items; the classification identifier of the first session entry is an identifier for representing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for representing that the session is a session to be aggregated, and session data of any group of second session entries contains the same classification identifier;
updating a session list for session display in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list.
Optionally, the updating the session database local to the client according to the obtained session data includes:
for each piece of session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in the session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identification included in the session data.
Optionally, the session list includes a primary session list and a secondary session list, and when a display opportunity related to the secondary session list is not detected, an attribute of the secondary session list is hidden;
the updating the session list for session display in the client according to each first session entry and each group of second session entries includes:
aiming at each group of second session entries, respectively generating a secondary session by using each second session entry in the group of second session entries, and generating a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
generating a session to be utilized corresponding to each first session entry and serving as a primary session;
and respectively taking each aggregation session as a primary session and each session to be utilized as a primary session to generate the primary session list.
Optionally, the generating the primary session list by respectively using each aggregation session as a primary session and by respectively using each session to be utilized as a primary session includes:
for each aggregation session, determining the generation time of the latest session message in each secondary session in a secondary session list associated with the aggregation session, and taking the determined generation time as the active time of the aggregation session;
aiming at each conversation to be utilized, taking the generation time of the latest conversation message in the first conversation item corresponding to the conversation to be utilized as the active time of the conversation to be utilized;
and sequencing each aggregation session and each session to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first sequencing sequence, and taking the first sequencing sequence as the primary session list.
Optionally, the generating a secondary session list according to each generated secondary session includes:
for each generated secondary session, determining the generation time of the latest session message in a second session entry for generating the secondary session, and determining the determined generation time as the active time of the secondary session;
and sequencing all the generated secondary sessions according to the active time to obtain a second sequencing sequence, and taking the second sequencing sequence as a secondary session list.
According to a second aspect of the embodiments of the present disclosure, there is provided a session update apparatus, which is applied to a client, the apparatus including:
an obtaining module configured to obtain session data of respective sessions to be updated, the session data of each session including: the session identification, the classification identification and the session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is the session to be aggregated;
a first updating module, configured to update a session database local to the client according to the obtained session data, where the content of each session entry in the session database is session data of one generated session;
the grouping module is configured to group all the session entries in the session database according to the classification identifiers to obtain a group of first session entries and at least one group of second session entries; the classification identifier of the first session entry is an identifier for representing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for representing that the session is a session to be aggregated, and session data of any group of second session entries contains the same classification identifier;
a second updating module configured to update a session list for session presentation in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list.
Optionally, the first updating module is specifically configured to:
for each piece of session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in the session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identification included in the session data.
Optionally, the session list includes a primary session list and a secondary session list, and when a display opportunity related to the secondary session list is not detected, an attribute of the secondary session list is hidden;
the second update module, comprising: the system comprises an aggregation session generation submodule, a to-be-utilized session generation submodule and a session list generation submodule;
the aggregation session generation submodule is configured to generate a secondary session by using each second session entry in each group of second session entries, and generate a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
the to-be-utilized session generation submodule is configured to generate a to-be-utilized session which is used as a primary session and corresponds to each first session entry;
the session list generation submodule is configured to generate the primary session list by taking each aggregated session as a primary session and each session to be utilized as a primary session.
Optionally, the session list generation sub-module includes: a first determining subunit, a second determining subunit and a first ordering subunit;
the first determining subunit is configured to determine, for each aggregation session, a generation time of a latest session message in each secondary session in a secondary session list associated with the aggregation session, and use the determined generation time as an active time of the aggregation session;
the second determining subunit is configured to, for each session to be utilized, use a generation time of a latest session message in the first session entry corresponding to the session to be utilized as an active time of the session to be utilized;
the first ordering subunit is configured to order the aggregation sessions and the sessions to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first ordering sequence, and the first ordering sequence is used as the primary session list.
Optionally, the aggregating session generating sub-module includes: a third determining subunit and a second ordering subunit;
the third determining subunit is configured to determine, for each generated secondary session, a generation time of a latest session message in a second session entry for generating the secondary session, and determine the determined generation time as an active time of the secondary session;
and the second sequencing subunit is configured to sequence the generated secondary sessions according to the active time to obtain a second sequencing sequence, and the second sequencing sequence is used as a secondary session list.
According to a third aspect of the embodiments of the present disclosure, there is provided a client device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any session updating method when executing the program stored in the memory.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of a client device, enable the client device to perform any one of the session update methods described above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which, when executed by a processor of a client device, enables an electronic device to perform any of the above-described session update methods.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
and acquiring session data of each session to be updated, and updating a local session database of the client according to the acquired session data. Because the obtained session data is the session data of each session to be updated by the client, all the sessions to be updated in the client can be updated at one time, and even if the sessions are secondary sessions under the primary session formed by aggregation, the sessions can be updated together. In addition, in the present disclosure, the classification identifier is used to characterize whether the session needs to be aggregated, and the classification category to which the session belongs when the session is a session to be aggregated, so that each first session entry and each group of second session entries can be determined from the session entries in the session database according to the classification identifier, wherein each first session entry corresponds to one primary session in the session list used for session presentation; each set of second session entries corresponds to a primary session in the session list. Therefore, the method and the device can reduce the interaction times between the client and the server on the premise of not changing the session display of the client in a session aggregation mode, thereby reducing time consumption. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow chart illustrating a session update method according to an example embodiment.
Fig. 2(a) is a schematic diagram of a primary session list for session presentation in a client in the session update method shown in fig. 1, and fig. 2(b) is a schematic diagram of a secondary session list below a primary session 3 in the primary session list shown in fig. 2 (a).
Fig. 3 is a block diagram illustrating a session update apparatus according to an example embodiment.
Fig. 4 is a block diagram illustrating a client device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In order to reduce the number of interactions between a client and a server and thus reduce time consumption on the premise of not changing a session display mode of the client by using an aggregated session, embodiments of the present disclosure provide a session update method, an apparatus, and a client device.
The session updating method provided by the embodiment of the disclosure can be applied to the client in the electronic equipment. Specifically, the electronic device may be a terminal device installed with a client, and in a specific application, the terminal device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
In the embodiment of the disclosure, the classification identifier is adopted to characterize that the session in the client is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is a session to be aggregated. For any client, when the server receives a session message sent to the client by another client, the server determines a session identifier and a classification identifier of a session to which the session message belongs according to an identifier of the client sending the session message or an identifier of a user of the client, and generates session data of the client according to the session message and the determined session identifier and classification identifier. When the client requests the session data from the server, the generated session data is fed back to the client, so that the client updates the session based on the received session data. In practical applications, the client may use the last time when the client requests session data from the server as a request parameter, and request session data generated after the last time from the server.
First, a session update method provided by an embodiment of the present disclosure is explained in detail.
Fig. 1 is a flowchart illustrating a session update method according to an exemplary embodiment, and as shown in fig. 1, a session update method provided by an embodiment of the present disclosure may be applied in a client, and includes the following steps:
s11: obtaining session data of each session to be updated, wherein the session data of each session comprises: session identification, classification identification and session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is a session to be aggregated.
The session identifier is used for distinguishing the session between the user of the client and each communication object. The communication object referred to herein may include: personal friends, stranger friends, and public numbers have been added, although not limited thereto. It will be appreciated that stranger friends and public numbers are of relatively low importance to the user, so that the user's sessions with each stranger friend and with each public number may be sessions to be aggregated, while the user's sessions with each added personal friend may be unaggregated. It should be noted that the specific session types of the non-aggregated sessions and the sessions to be aggregated shown herein are only examples and should not be construed as limiting the disclosure.
In practical applications, the classification identifier may include a preset first identifier and at least one preset second identifier, where the first identifier is different from any one of the second identifiers. Thus, non-aggregated sessions may be identified with a preset first identifier, and sessions to be aggregated may be identified with one or more preset second identifiers. On the premise of ensuring that the first identifier and the second identifier are different, the specific values of the first identifier and the second identifier are not limited in the present disclosure. For example, assume that a number 0 is used to identify non-aggregated sessions and numbers 1-9 are used to identify sessions to be aggregated. Thus, a session with a class identifier equal to 0 is a non-aggregated session, and a session with a class identifier equal to any one of 1-9 is a session to be aggregated.
In practical applications, the step of obtaining session data for each session to be updated may be performed when a predetermined update occasion is satisfied. There may be a variety of update timings that are predetermined herein. For example, the scheduled update timing may include one or more of the following:
when the client executes session synchronization according to a preset period, when the client creates a new session, when the client deletes the session, when the client executes session top setting operation and when the client has a new session message.
S12: and updating a session database local to the client according to the obtained session data, wherein the content of each session entry in the session database is the session data of one generated session.
Here, there may be various specific implementations of updating the session database local to the client according to the obtained session data. For example, in one implementation, updating the session database local to the client according to the obtained session data may include:
for each obtained session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in a session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identification included in the session data.
It is understood that, in the session database local to the client, the content of each session entry is session data of a generated session, and thus, the content of each session entry at least includes: a session identification, a classification identification of a session, and a session message of the session. In this way, for each session data obtained, a session entry including the same session identifier is searched from a session database local to the client, and the session message in the session data is added to the searched session entry. It is understood that the class identifier in the session entry is the same as the class identifier contained in the session data. In addition, if the session identifier included in the session data does not exist in the session database, the session data may be a new session of the client. Then, a new session entry is created in the session database according to the session identifier included in the session data, and the classification identifier in the new session entry is also adopted.
S13: and grouping all the conversation items in the conversation database according to the classification identification to obtain a group of first conversation items and at least one group of second conversation items.
The classification identifier of the first session entry is an identifier for characterizing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for characterizing that the session is a session to be aggregated, and session data of any group of the second session entries includes the same classification identifier.
Here, the identifier for characterizing the session as the session to be aggregated may include a plurality of groups, so that the grouping of the second session entry obtained by grouping the session entries in the session database according to the classification identifier may include a plurality of groups. For example, assume that the session database has 5 first session entries and 5 second session entries. Wherein, the classification identifiers of the 5 first session entries are all 0; in the 5 second session entries, the class identifiers of 2 second session entries are all 1, and the class identifiers of the other 3 second session entries are all 2. Then, the 10 session entries are grouped according to the classification identification, and a group of first session entries and a group of 2 second session entries can be obtained. The classification identifiers of the first group of second session entries are all 1, and the classification identifiers of the second group of second session entries are all 2.
S14: updating a session list for session display in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list.
The specific representation form of the session list for session presentation in the client may be various. For example, in one implementation, the session list for session presentation in the client may include a primary session list and a secondary session list, and when no presentation opportunity is detected with respect to the secondary session list, an attribute of the secondary session list may be hidden. Here, the level of the session list is used to prioritize when the session list is presented to the user. The primary session list is preferably presented to the user, and the secondary session list may be presented to the user after the primary session list is presented to the user.
It is to be understood that the sessions in the primary session list are all primary sessions, and the sessions in the secondary session list are all secondary sessions. In the primary session list, each first session entry is directly presented to the user in the form of a primary session, and for the primary session corresponding to each group of second session entries, each second session entry included in the primary session is not presented to the user in the primary session list.
In the embodiments of the present disclosure, there are various specific implementation manners for updating the session list for the session display in the client according to each first session entry and each group of second session entries. For example, in an implementation manner, updating a session list for session presentation in the client according to each first session entry and each group of second session entries may include:
aiming at each group of second session entries, respectively generating a secondary session by using each second session entry in the group of second session entries, and generating a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
generating a session to be utilized corresponding to each first session entry and serving as a primary session;
and respectively taking each aggregation session as a primary session and each session to be utilized as a primary session to generate a primary session list.
The primary session list generated here may be as shown in fig. 2 (a). In fig. 2(a), primary session 3 and primary session 5 are primary sessions corresponding to an aggregation session, and primary sessions 1, 2, and 4 are primary sessions corresponding to sessions to be utilized. It can be seen that the individual secondary sessions in the aggregated session are not exposed in the primary session list.
The presentation timing of the secondary session list may include: the user clicks on the primary session corresponding to any one of the second session entries from the primary session list, but is not limited thereto.
It is understood that when the user clicks the primary session corresponding to the set of second session entries from the primary session list, the corresponding one may be presented to the user in the client: and generating a secondary session list according to the set of second session entries, namely generating a secondary session list under the primary session. For example, assuming that the user clicks on primary session 3 in the primary session list as shown in fig. 2(a) in the client, the secondary session list under primary session 3 presented to the user in the client may be as shown in fig. 2 (b).
In the embodiment of the present disclosure, there may be a plurality of specific implementation manners for generating the primary session list by using each aggregation session as a primary session and each session to be utilized as a primary session. For example, in an implementation manner, generating a primary session list with each aggregated session as a primary session and each to-be-utilized session as a primary session respectively may include:
for each aggregation session, determining the generation time of the latest session message in each secondary session in a secondary session list associated with the aggregation session, and taking the determined generation time as the active time of the aggregation session;
aiming at each conversation to be utilized, taking the generation time of the latest conversation message in the first conversation item corresponding to the conversation to be utilized as the active time of the conversation to be utilized;
and sequencing each aggregation session and each session to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first sequencing sequence, and taking the first sequencing sequence as a primary session list.
There are various specific ways to determine the generation time of each session message. For example, in one implementation, a time at which the session message is received by the server may be determined, and the determined time may be used as a generation time of the session message.
In the embodiment of the present disclosure, when the aggregation sessions and the to-be-utilized sessions are sorted, the aggregation session or the to-be-utilized session with the prior active time may be ranked in front, and the aggregation session or the to-be-utilized session with the later active time may be ranked in the back.
In the embodiments of the present disclosure, there may be multiple specific implementations of generating one secondary session list according to each generated secondary session. For example, in an implementation manner, generating a secondary session list according to each generated secondary session may include:
for each generated secondary session, determining the generation time of the latest session message in a second session entry for generating the secondary session, and determining the determined generation time as the active time of the secondary session;
and sequencing all the generated secondary sessions according to the active time to obtain a second sequencing sequence, and taking the second sequencing sequence as a secondary session list.
In addition, in practical application, the primary session list and/or the secondary session list can be shown to the user in a list or view form for achieving a visual aesthetic effect. The present disclosure does not specifically limit the specific display effect of the session list.
In the session updating method provided by the embodiment of the disclosure, session data of each session to be updated is obtained, and a local session database of a client is updated according to the obtained session data. Because the obtained session data is the session data of each session to be updated by the client, all the sessions to be updated in the client can be updated at one time, and even if the sessions are secondary sessions under the primary session formed by aggregation, the sessions can be updated together. In addition, in the present disclosure, the classification identifier is used to characterize whether the session needs to be aggregated, and the classification category to which the session belongs when the session is a session to be aggregated, so that each first session entry and each group of second session entries can be determined from the session entries in the session database according to the classification identifier, wherein each first session entry corresponds to one primary session in the session list used for session presentation; each set of second session entries corresponds to a primary session in the session list. Therefore, the method and the device can reduce the interaction times between the client and the server on the premise of not changing the session display of the client in a session aggregation mode, thereby reducing time consumption.
Optionally, in an implementation manner, the session data of each session received by the client may further include: a session priority. Here, the session priority is used to characterize the presentation priority of the session in the session list. It can be appreciated that sessions with high session priority are relatively important to the user. For example, the conversation between the user and the added personal friend is relatively important for the user, and the display priority of the conversation between the user and the added personal friend in the conversation list can be higher than the display priority of the user and the concerned public number.
Accordingly, in step S12, when a new session entry is created for any session data in the session database local to the client, the new session entry has the session identifier, the classification identifier, and the session priority included in the session data.
Correspondingly, after the aggregation sessions and the sessions to be utilized are sequenced according to the active time of each aggregation session and the active time of each session to be utilized, the session priority of each secondary session in a secondary session list associated with the aggregation session can be determined aiming at each aggregation session; taking the highest session priority as the session priority of the aggregated session; for each session to be utilized, determining the session priority of the session to be utilized; and performing secondary sequencing on each aggregation conversation and each conversation to be utilized according to the conversation priority, and using the sequence subjected to secondary sequencing as a primary conversation list.
It is to be understood that, in the second ranking, the aggregation sessions or sessions to be utilized with high session priority may be ranked in front, and the aggregation sessions or sessions to be utilized with low session priority may be ranked in the back.
Optionally, in one implementation, the sessions identified by the categories for the same session are of equal priority. Therefore, the session priorities of the secondary sessions of the secondary session list associated with each aggregated session are all equal. Correspondingly, the session priority of each secondary session in the secondary session list associated with the aggregation session is determined, which may be the session priority of any one secondary session in the secondary session list associated with the aggregation session, and the determined session priority is used as the session priority of the aggregation session.
Optionally, in another implementation manner, the session priorities of sessions with the same classification identifier are not equal, so that, in the process of generating a secondary session list according to each generated secondary session, after sorting each generated secondary session according to the active time, each secondary session may be sorted secondarily according to the session priority, and the sequence obtained by secondary sorting is used as a secondary session list. It is understood that, in the second-order sorting, the second-order sessions with high session priority may be ranked in front of the first-order sessions, and the second-order sessions with low session priority may be ranked in the back of the first-order sessions.
Therefore, by using the session updating method provided by the embodiment of the disclosure, the sessions in the session list for session display in the client can be sorted by the active time and the session priority, so that the user can preferentially see the important sessions and the sessions with the newly added session messages.
Fig. 3 is a block diagram illustrating a session update apparatus according to an example embodiment. Referring to fig. 3, the apparatus includes an obtaining module 131, a first updating module 132, a grouping module 133, and a second updating module 134.
The obtaining module 131 is configured to obtain session data of sessions to be updated, where the session data of each session includes: session identification, classification identification and session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is the session to be aggregated;
the first updating module 132 is configured to update a session database local to the client according to the obtained session data, where the content of each session entry in the session database is session data of one generated session;
the grouping module 133 is configured to group the session entries in the session database according to the classification identifier to obtain a group of first session entries and at least one group of second session entries; the classification identifier of the first session entry is an identifier for representing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for representing that the session is a session to be aggregated, and session data of any group of second session entries comprises the same classification identifier;
the second updating module 134 is configured to update the session list for session presentation in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list.
Optionally, the first updating module 132 may be specifically configured to:
for each obtained session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in a session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identification included in the session data.
Optionally, the session list includes a primary session list and a secondary session list, and when a display opportunity related to the secondary session list is not detected, an attribute of the secondary session list is hidden;
the second update module 134 may include: the system comprises an aggregation session generation submodule, a to-be-utilized session generation submodule and a session list generation submodule;
the aggregation session generation submodule is configured to generate a secondary session by using each second session entry in each group of second session entries, and generate a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
the to-be-utilized session generation submodule is configured to generate a to-be-utilized session which is used as a primary session and corresponds to each first session entry;
the session list generation submodule is configured to generate a primary session list by taking each aggregated session as a primary session and each session to be utilized as a primary session.
Optionally, the session list generation sub-module may include: a first determining subunit, a second determining subunit and a first ordering subunit;
the first determining subunit is configured to determine, for each aggregation session, a generation time of a latest session message in the respective secondary sessions in the secondary session list associated with the aggregation session, and use the determined generation time as an active time of the aggregation session;
the second determining subunit is configured to, for each session to be utilized, use a generation time of a latest session message in the first session entry corresponding to the session to be utilized as an active time of the session to be utilized;
the first ordering subunit is configured to order the aggregation sessions and the sessions to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first ordering sequence, and the first ordering sequence is used as a primary session list.
Optionally, the aggregation session generation sub-module may include: a third determining subunit and a second ordering subunit;
the third determining subunit is configured to determine, for each generated secondary session, a generation time of a latest session message in a second session entry for generating the secondary session, and determine the determined generation time as an active time of the secondary session;
the second sorting subunit is configured to sort the generated secondary sessions according to the active time to obtain a second sorting sequence, and use the second sorting sequence as a secondary session list.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The session updating device provided by the embodiment of the disclosure obtains session data of each session to be updated, and updates the local session database of the client according to the obtained session data. Because the obtained session data is the session data of each session to be updated by the client, all the sessions to be updated in the client can be updated at one time, and even if the sessions are secondary sessions under the primary session formed by aggregation, the sessions can be updated together. In addition, in the present disclosure, the classification identifier is used to characterize whether the session needs to be aggregated, and the classification category to which the session belongs when the session is a session to be aggregated, so that each first session entry and each group of second session entries can be determined from the session entries in the session database according to the classification identifier, wherein each first session entry corresponds to one primary session in the session list used for session presentation; each set of second session entries corresponds to a primary session in the session list. Therefore, the method and the device can reduce the interaction times between the client and the server on the premise of not changing the session display of the client in a session aggregation mode, thereby reducing time consumption.
Fig. 4 is a block diagram illustrating a client device including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, the memory 403 communicate with each other via the communication bus 404,
a memory 403 for storing a computer program;
the processor 401 is configured to implement any of the above-described session update methods when executing the program stored in the memory 403.
In an exemplary embodiment, there is also provided a storage medium comprising instructions that, when executed by a processor of a client device, enable the client device to perform any of the session update methods described above.
Alternatively, the storage medium may be a non-transitory computer readable storage medium. The non-transitory computer readable storage medium may be, among others, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which, when executed by a processor of a client device, enables an electronic device to perform any of the above-described session update methods.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure 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 present disclosure is limited by the claims.

Claims (10)

1. A session update method applied to a client, the method comprising:
obtaining session data of each session to be updated, wherein the session data of each session comprises: the session identification, the classification identification and the session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is the session to be aggregated; the session identification is used for distinguishing the session between the user of the client and each communication object;
updating a local session database of the client according to the obtained session data, wherein the content of each session entry in the session database is session data of a generated session;
grouping all conversation items in the conversation database according to the classification identification to obtain a group of first conversation items and at least one group of second conversation items; the classification identifier of the first session entry is an identifier for representing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for representing that the session is a session to be aggregated, and session data of any group of second session entries contains the same classification identifier;
updating a session list for session display in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list;
wherein, the updating the local session database of the client according to the obtained session data includes:
for each piece of session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in the session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identifier included in the session data.
2. The method according to claim 1, wherein the session list comprises a primary session list and a secondary session list, and when a presentation opportunity related to the secondary session list is not detected, the attribute of the secondary session list is hidden;
the updating the session list for session display in the client according to each first session entry and each group of second session entries includes:
aiming at each group of second session entries, respectively generating a secondary session by using each second session entry in the group of second session entries, and generating a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
generating a session to be utilized corresponding to each first session entry and serving as a primary session;
and respectively taking each aggregation session as a primary session and each session to be utilized as a primary session to generate the primary session list.
3. The method of claim 2, wherein generating the primary session list with each aggregated session as a primary session and each to-be-utilized session as a primary session respectively comprises:
for each aggregation session, determining the generation time of the latest session message in each secondary session in a secondary session list associated with the aggregation session, and taking the determined generation time as the active time of the aggregation session;
aiming at each conversation to be utilized, taking the generation time of the latest conversation message in the first conversation item corresponding to the conversation to be utilized as the active time of the conversation to be utilized;
and sequencing each aggregation session and each session to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first sequencing sequence, and taking the first sequencing sequence as the primary session list.
4. The method of claim 2, wherein generating a list of secondary sessions based on each generated secondary session comprises:
for each generated secondary session, determining the generation time of the latest session message in a second session entry for generating the secondary session, and taking the determined generation time as the active time of the secondary session;
and sequencing all the generated secondary sessions according to the active time to obtain a second sequencing sequence, and taking the second sequencing sequence as a secondary session list.
5. A session update apparatus applied to a client, the apparatus comprising:
an obtaining module configured to obtain session data of respective sessions to be updated, the session data of each session including: the session identification, the classification identification and the session message, wherein the classification identification is used for characterizing: the session is a non-aggregated session or a session to be aggregated, and a classification category to which the session belongs when the session is the session to be aggregated; the session identification is used for distinguishing the session between the user of the client and each communication object;
a first updating module, configured to update a session database local to the client according to the obtained session data, where the content of each session entry in the session database is session data of one generated session;
the grouping module is configured to group all the session entries in the session database according to the classification identifiers to obtain a group of first session entries and at least one group of second session entries; the classification identifier of the first session entry is an identifier for representing that the session is a non-aggregated session, the classification identifier of the second session entry is an identifier for representing that the session is a session to be aggregated, and session data of any group of second session entries contains the same classification identifier;
a second updating module configured to update a session list for session presentation in the client according to each first session entry and each group of second session entries; each group of second session entries uniquely corresponds to one primary session in the session list, and each group of first session entries uniquely corresponds to one primary session in the session list;
wherein the first update module is specifically configured to:
for each piece of session data, judging whether a session entry with a session identifier included in the session data exists in a local session database of the client, if not, newly building a session entry in the session database, wherein the newly built session entry has the session identifier and the classification identifier included in the session data;
and adding the session message included in the session data to a session entry corresponding to the session data in the session database aiming at each piece of obtained session data, wherein the session entry corresponding to the session data is the session entry with the session identification included in the session data.
6. The apparatus of claim 5, wherein the session list comprises a primary session list and a secondary session list, and an attribute of the secondary session list is hidden when no presentation opportunity related to the secondary session list is detected;
the second update module, comprising: the system comprises an aggregation session generation submodule, a to-be-utilized session generation submodule and a session list generation submodule;
the aggregation session generation submodule is configured to generate a secondary session by using each second session entry in each group of second session entries, and generate a secondary session list according to each generated secondary session; generating an aggregation session used as a primary session for the secondary session list, and associating the aggregation session with the secondary session list;
the to-be-utilized session generation submodule is configured to generate a to-be-utilized session which is used as a primary session and corresponds to each first session entry;
the session list generation submodule is configured to generate the primary session list by taking each aggregated session as a primary session and each session to be utilized as a primary session.
7. The apparatus of claim 6, wherein the session list generation submodule comprises: a first determining subunit, a second determining subunit and a first ordering subunit;
the first determining subunit is configured to determine, for each aggregation session, a generation time of a latest session message in each secondary session in a secondary session list associated with the aggregation session, and use the determined generation time as an active time of the aggregation session;
the second determining subunit is configured to, for each session to be utilized, use a generation time of a latest session message in the first session entry corresponding to the session to be utilized as an active time of the session to be utilized;
the first ordering subunit is configured to order the aggregation sessions and the sessions to be utilized according to the active time of each aggregation session and the active time of each session to be utilized to obtain a first ordering sequence, and the first ordering sequence is used as the primary session list.
8. The apparatus of claim 6, wherein the aggregation session generation submodule comprises: a third determining subunit and a second ordering subunit;
the third determining subunit is configured to determine, for each generated secondary session, a generation time of a latest session message in a second session entry for generating the secondary session, and determine the determined generation time as an active time of the secondary session;
and the second sequencing subunit is configured to sequence the generated secondary sessions according to the active time to obtain a second sequencing sequence, and the second sequencing sequence is used as a secondary session list.
9. The client device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the session update method of any one of claims 1 to 4 when executing a program stored in the memory.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of a client device, enable the client device to perform a session update method as recited in any one of claims 1 to 4.
CN201910423181.1A 2019-05-21 2019-05-21 Session updating method and device and client device Active CN110138652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423181.1A CN110138652B (en) 2019-05-21 2019-05-21 Session updating method and device and client device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423181.1A CN110138652B (en) 2019-05-21 2019-05-21 Session updating method and device and client device

Publications (2)

Publication Number Publication Date
CN110138652A CN110138652A (en) 2019-08-16
CN110138652B true CN110138652B (en) 2022-03-25

Family

ID=67571799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910423181.1A Active CN110138652B (en) 2019-05-21 2019-05-21 Session updating method and device and client device

Country Status (1)

Country Link
CN (1) CN110138652B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598143B (en) * 2019-09-25 2021-05-11 腾讯科技(深圳)有限公司 Method, related device and system for displaying instant communication content
CN111585774B (en) * 2020-03-24 2022-02-01 福建天泉教育科技有限公司 Session updating method and storage medium
CN112134784A (en) * 2020-09-03 2020-12-25 北京达佳互联信息技术有限公司 Message display method, device, terminal, server, system and storage medium
CN112769677B (en) * 2020-12-30 2023-05-23 北京达佳互联信息技术有限公司 Data synchronization method, apparatus, electronic device, storage medium, and program product
CN113098781B (en) * 2021-03-19 2023-01-20 北京达佳互联信息技术有限公司 Session list processing method, device, server and storage medium
CN114461314A (en) * 2021-06-25 2022-05-10 北京字跳网络技术有限公司 Information display method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598476A (en) * 2013-10-31 2015-05-06 腾讯科技(深圳)有限公司 Message aggregation display method and information display method and relevant device
CN106202095A (en) * 2015-05-05 2016-12-07 腾讯科技(深圳)有限公司 Group message display packing and device
CN106888236A (en) * 2015-12-15 2017-06-23 腾讯科技(深圳)有限公司 Conversation managing method and session management device
CN108491135A (en) * 2018-03-14 2018-09-04 北京达佳互联信息技术有限公司 Information displaying method, device, computer equipment and storage medium
CN109688051A (en) * 2018-12-29 2019-04-26 天津字节跳动科技有限公司 Session list display methods, device and electronic equipment
CN109710370A (en) * 2018-12-29 2019-05-03 天津字节跳动科技有限公司 Session list display methods, device and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020034281A1 (en) * 2000-02-22 2002-03-21 Ellen Isaacs System and method for communicating via instant messaging
US20150186494A1 (en) * 2013-12-31 2015-07-02 Google Inc. Systems and methods for message categorization management
CN107465802A (en) * 2016-06-03 2017-12-12 北京融聚世界网络科技有限公司 A kind of methods, devices and systems for showing communication message
CN106503584B (en) * 2016-10-26 2019-02-26 腾讯科技(深圳)有限公司 A kind of session content methods of exhibiting and system
CN108667899B (en) * 2018-03-29 2021-04-20 挂号网(杭州)科技有限公司 Multi-terminal message synchronization and isolation instant messaging method and system
CN108809815B (en) * 2018-06-29 2021-06-22 上海哔哩哔哩科技有限公司 Method for updating unread number of session, session processing method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598476A (en) * 2013-10-31 2015-05-06 腾讯科技(深圳)有限公司 Message aggregation display method and information display method and relevant device
CN106202095A (en) * 2015-05-05 2016-12-07 腾讯科技(深圳)有限公司 Group message display packing and device
CN106888236A (en) * 2015-12-15 2017-06-23 腾讯科技(深圳)有限公司 Conversation managing method and session management device
CN108491135A (en) * 2018-03-14 2018-09-04 北京达佳互联信息技术有限公司 Information displaying method, device, computer equipment and storage medium
CN109688051A (en) * 2018-12-29 2019-04-26 天津字节跳动科技有限公司 Session list display methods, device and electronic equipment
CN109710370A (en) * 2018-12-29 2019-05-03 天津字节跳动科技有限公司 Session list display methods, device and electronic equipment

Also Published As

Publication number Publication date
CN110138652A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
CN110138652B (en) Session updating method and device and client device
US11128582B2 (en) Emoji recommendation method and apparatus
US9686329B2 (en) Method and apparatus for displaying webcast rooms
US9065791B2 (en) Generating a consolidated social story in a feed of stories for a user of a social networking system
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
US9430755B2 (en) System and method to enable communication group identification
CN106062806B (en) Generating relationships and promoting content using interaction signals
CN105898085B (en) Harass recognition methods and the device of communications account
CN104881287A (en) Image clipping method and device
US10992611B2 (en) Topic classified presentation for a message in a message cluster
US20220391447A1 (en) Method and apparatus for retrieving a data package
CN113064918B (en) Enterprise data query method and device, electronic equipment and storage medium
CN110909241A (en) Information recommendation method, user identification recommendation method, device and equipment
CN106202222B (en) Method and device for determining hot event
CN110839061B (en) Data distribution method, device and storage medium
CN108829844B (en) Information searching method and system
CN115865528A (en) Multi-device based user profile operation method, system and readable storage medium
CN110401709A (en) Processing method, device and the storage medium of session in a kind of instant messaging application
CN107479982B (en) data synchronization method and terminal
CN107154067B (en) Head portrait generation method and device
CN115062217A (en) Designer matching method, device, equipment and storage medium based on artificial intelligence
CN109391537A (en) A kind of information processing method, device and computer storage medium
CN109729413B (en) Method and terminal for sending bullet screen
CN112818144A (en) Media content sharing method and device, storage medium and electronic equipment
CN106161197B (en) service processing method and device based on RCS public platform

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
GR01 Patent grant
GR01 Patent grant