CN106713127B - Method and device for acquiring and processing instant chat records - Google Patents

Method and device for acquiring and processing instant chat records Download PDF

Info

Publication number
CN106713127B
CN106713127B CN201710088855.8A CN201710088855A CN106713127B CN 106713127 B CN106713127 B CN 106713127B CN 201710088855 A CN201710088855 A CN 201710088855A CN 106713127 B CN106713127 B CN 106713127B
Authority
CN
China
Prior art keywords
terminal
chat
chat record
instant
cloud server
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
CN201710088855.8A
Other languages
Chinese (zh)
Other versions
CN106713127A (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 Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710088855.8A priority Critical patent/CN106713127B/en
Publication of CN106713127A publication Critical patent/CN106713127A/en
Application granted granted Critical
Publication of CN106713127B publication Critical patent/CN106713127B/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
    • 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/21Monitoring or handling of messages
    • H04L51/212Monitoring or handling of messages using filtering or selective blocking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The disclosure relates to a method and a device for acquiring and processing an instant chat record. The method comprises the following steps: a first terminal binding a first instant messaging account sends a first request message to a second terminal binding a second instant messaging account, when the first terminal receives a first response message sent by the second terminal, a second request message is sent to the cloud server, the second request message is used for requesting the first chat record from the cloud server, and the first response message is used for indicating the first chat record to the first terminal to be successfully uploaded to the cloud server; and the first terminal receives the first chat record sent by the cloud server. The chat records between the first instant messaging account and the second instant messaging account are restored to the local first terminal through the second terminal, the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.

Description

Method and device for acquiring and processing instant chat records
Technical Field
The present disclosure relates to communication technologies, and in particular, to a method and an apparatus for acquiring and processing an instant chat record.
Background
Instant Messaging (IM for short) refers to a service capable of sending and receiving internet messages and the like instantly, and with the continuous development of communication technology, Instant Messaging functions are increasingly abundant, and multiple functions such as chatting, e-mail, blogs, music, television, games, searching and the like are gradually integrated.
For a chat service in instant messaging, one user may establish an instant chat service with a single user, or with multiple users. In the prior art, a user can store chat records in a cloud, when the chat records need to be restored, the mobile terminal can import the chat records into the local from the cloud, but if the user does not store the chat records in the local and the cloud, the chat records of the user cannot be restored.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for obtaining and processing an instant chat record.
According to a first aspect of the embodiments of the present disclosure, a method for obtaining an instant chat record is provided, including:
a first terminal binding a first instant messaging account sends a first request message to a second terminal binding a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
when the first terminal receives a first response message sent by the second terminal, sending a second request message to the cloud server, wherein the second request message is used for requesting the first chat record from the cloud server, and the first response message is used for indicating the first chat record to the first terminal to be successfully uploaded to the cloud server;
and the first terminal receives the first chat record sent by the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the first terminal does not locally store the chat record between the first instant messaging account and the second instant messaging account, or the chat record between the first instant messaging account and the second instant messaging account is not stored on the cloud server, the embodiment sends the first request message to the second terminal through the first terminal, and sends the second request message to the cloud server when receiving the first response message sent by the second terminal, so as to obtain the first chat record from the cloud server. That is, in this embodiment, the chat records between the first instant messaging account and the second instant messaging account can be restored to the local of the first terminal through the second terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
Further, before the first terminal binding the first instant messaging account sends the first request message to the second terminal binding the second instant messaging account, the method further includes:
the first terminal sends a third request message to the cloud server, wherein the third request message is used for requesting a second chat record of the instant chat to the cloud server, and the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal;
the first terminal judges whether the second chat record acquired from the cloud server is complete or not;
and if the first terminal judges that the second chat record is incomplete, the first terminal sends the first request message to the second terminal.
Optionally, the determining, by the first terminal, whether the second chat record obtained from the cloud server is complete includes:
the first terminal judges whether the ending moment of the second chat record is matched with the target moment;
and if the ending moment of the second chat record is not matched with the target moment, the first terminal determines that the second chat record is incomplete.
Optionally, the determining, by the first terminal, whether the second chat record obtained from the cloud server is complete includes:
the first terminal judges whether the memory occupied by the second chat record is matched with a target memory;
and if the memory occupied by the second chat record is not matched with the target memory, the first terminal determines that the second chat record is incomplete.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, the first terminal obtains, from the cloud server, the second chat record of the instant chat between the first instant messaging account and the second instant messaging account uploaded by the first terminal in advance through the third request message, and determines whether to send the first request message to the second terminal by judging whether the second chat record is complete.
Further, if the account participating in the instant chat also includes at least one third instant messaging account, the method further includes:
when the first terminal receives a second response message sent by the second terminal, sending a fourth request message to a third terminal bound with the third instant messaging account; the fourth request message is used for requesting the third terminal to upload a saved third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server;
when the first terminal receives a third response message sent by the third terminal, sending a fifth request message to the cloud server; the fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server;
and the first terminal receives the third chat record sent by the cloud server.
Still further, the first request message and the second request message further include at least one of a start time of the instant chat and an end time of the instant chat.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, the first terminal sends a fourth request message to at least one third terminal bound with a third instant messaging account to instruct the third terminal to upload a third chat record related to the instant chat on the third terminal to the cloud server, and when receiving the third response message sent by the third terminal, the cloud server sends a fifth request message to obtain the third chat record from the cloud server. That is, in the instant chat scene of the group including at least three account numbers, when the second terminal does not upload the first chat record to the cloud server successfully, the first terminal can also restore the chat record of the instant chat to the local through other terminals participating in the instant chat, so that the possibility of complete data loss is further reduced, the backup reliability and flexibility of the chat record are greatly improved, and the user experience is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for processing an instant chat record, including:
a second terminal binding a second instant messaging account receives a first request message sent by a first terminal binding a first instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
the second terminal sends a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the second terminal in this embodiment can assist the first terminal to restore the chat record between the first instant messaging account and the second instant messaging account to the local position of the first terminal, thereby reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
Further, the second terminal sends a first response message or a second response message to the first terminal according to the uploading result of the first chat record, including:
the second terminal judges whether the first chat record is successfully uploaded to the cloud server;
if the first chat record is successfully uploaded to the cloud server, the second terminal sends the first response message to the first terminal;
if the first chat record is not successfully uploaded to the cloud server, the second terminal judges whether the number of accounts participating in the instant chat is greater than 2;
if the number of the accounts participating in the instant chat is judged to be equal to 2, the second terminal uploads the first chat record to the cloud server until the uploading is successful or the uploading execution times reach preset times, and sends the first response message or the second response message to the first terminal based on the uploading result;
and if the number of the accounts participating in the instant chat is judged to be more than 2, the second terminal sends the second response message to the first terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not store the chat history of the instant chat involving the first instant messaging account and the second instant messaging account on the cloud server, and the second terminal also detects that the first chat history of the instant chat is not successfully uploaded to the cloud server, the first terminal can also restore the chat history of the instant chat to the local through other terminals participating in the instant chat, thereby further reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat history, and improving the user experience.
According to a third aspect of the embodiments of the present disclosure, an apparatus for obtaining an instant chat record is provided, including: the device comprises a first sending module, a receiving module and a second sending module;
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is configured to send a first request message to a second terminal bound with a second instant messaging account, the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
the second sending module is configured to send a second request message to the cloud server when the receiving module receives a first response message sent by the second terminal, wherein the second request message is used for requesting the first chat record from the cloud server, and the first response message is used for indicating that the first chat record is successfully uploaded to the cloud server to the first terminal;
the receiving module is configured to receive the first chat record sent by the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not locally store the chat record between the first instant messaging account and the second instant messaging account, or does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the first request message is sent to the second terminal through the first sending module, and when the receiving module receives the first response message sent by the second terminal, the second request message is sent to the cloud server through the second sending module, so as to obtain the first chat record from the cloud server. That is, in this embodiment, the chat records between the first instant messaging account and the second instant messaging account can be restored to the local of the first terminal through the second terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
Further, the apparatus further comprises: a third sending module and a judging module;
the third sending module is configured to send a third request message to the cloud server before the first sending module sends a first request message to a second terminal bound with a second instant messaging account, wherein the third request message is used for requesting a second chat record of the instant chat to the cloud server, and the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal;
the judging module is configured to judge whether the second chat record acquired from the cloud server is complete, and instruct the first sending module to send the first request message to the second terminal when the second chat record is judged to be incomplete.
Optionally, the determining module includes:
a first judgment unit configured to judge whether an ending time of the second chat record matches a target time;
a first determination unit configured to determine that the second chat log is incomplete when the deadline time of the second chat log does not match the target time.
Optionally, the determining module includes:
a second judging unit configured to judge whether the memory occupied by the second chat record matches a target memory;
a second determining unit configured to determine that the second chat log is incomplete when the memory occupied by the second chat log does not match the target memory.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, the second chat record of the instant chat between the first instant messaging account and the second instant messaging account uploaded by the device is obtained in advance from the cloud server through the third sending module and the receiving module, and whether the second chat record is complete is judged through the judging module to determine whether to send the first request message to the second terminal, so that the obtaining device of the instant chat record does not need to send the first request message to the second terminal every time, but determines whether to send the first request message to the second terminal after corresponding judgment, which greatly saves the air interface overhead of the obtaining device of the instant chat record, and simultaneously ensures that the obtaining device of the instant chat record recovers the integrity of the chat record between the first instant messaging account and the second instant messaging account, thereby avoiding the loss of important data, the user experience is improved.
Further, if the account participating in the instant chat also includes at least one third instant messaging account, the device further includes:
a fourth sending module, configured to send a fourth request message to a third terminal bound with the third instant messaging account when the receiving module receives a second response message sent by the second terminal; the fourth request message is used for requesting the third terminal to upload a saved third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server;
a fifth sending module, configured to send a fifth request message to the cloud server when the receiving module receives a third response message sent by the at least one third terminal; the fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server;
the receiving module is configured to receive the third chat record sent by the cloud server.
Still further, the first request message and the fourth request message further include at least one of a start time of the instant chat and an end time of the instant chat.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the account participating in the current instant chat includes at least one third instant messaging account in addition to the first instant messaging account and the second instant messaging account, and when the first terminal receives the second response message sent by the second terminal, the fourth sending module sends a fourth request message to the third terminal bound with the third instant messaging account, so as to instruct the third terminal to upload a third chat record related to the instant chat on the third terminal to the cloud server, and when the receiving module receives the third response message sent by the third terminal, the fifth sending module sends a fifth request message to the cloud server, so as to obtain the third chat record from the cloud server. That is, in a scene of group instant chat including at least three account numbers, when the second terminal does not successfully upload the first chat record to the cloud server, the device for acquiring the instant chat record can also restore the chat record of the instant chat to the local through other terminals participating in the instant chat, thereby further reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for processing an instant chat record, including: the device comprises a receiving module and a sending module;
the receiving module is configured to receive a first request message sent by a first terminal bound with a first instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of an instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and a second instant messaging account;
the sending module is configured to send a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the processing device for the instant chat record can assist the first terminal to restore the chat record between the first instant messaging account and the second instant messaging account to the local position of the first terminal, thereby reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
Further, the sending module includes: a first judging unit, a second judging unit and a sending unit;
the first judging unit is configured to judge whether the first chat record is successfully uploaded to the cloud server;
the sending unit is configured to send the first response message to the first terminal when the first judging unit judges that the first chat record is uploaded to the cloud server;
the second judging unit is configured to judge whether the number of accounts participating in the instant chat is greater than 2 when the first judging unit judges that the first chat record is not uploaded to the cloud server;
the sending unit is configured to, when the second judging unit judges that the number of accounts participating in the instant chat is equal to 2, upload the first chat record to the cloud server until the upload is successful or the number of times of upload execution reaches a preset number, and send the first response message or the second response message to the first terminal based on an upload result; and when the second judging unit judges that the number of the accounts participating in the instant chat is greater than 2, sending the second response message to the first terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not store the chat history of the instant chat involving the first instant messaging account and the second instant messaging account on the cloud server, and the processing device of the instant chat history also detects that the first chat history of the instant chat is not successfully uploaded to the cloud server, the first terminal can also restore the chat history of the instant chat to the local first terminal through other terminals participating in the instant chat, thereby further reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat history, and improving the user experience.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus for obtaining an instant chat record, including:
a first processor for controlling instruction execution;
a first memory for storing first processor-executable instructions;
wherein the first processor is configured to: sending a first request message to a second terminal bound with a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
when receiving the first response message sent by the second terminal, sending a second request message to the cloud server, wherein the second request message is used for requesting the first chat record to the cloud server, and the first response message is used for indicating that the first chat record is successfully uploaded to the cloud server to a first terminal bound with the first instant messaging account;
and receiving the first chat record sent by the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not locally store the chat record between the first instant messaging account and the second instant messaging account, or does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the transmitter transmits the first request message to the second terminal, and when the receiver receives the first response message transmitted by the second terminal, the transmitter transmits the second request message to the cloud server again to obtain the first chat record from the cloud server. That is, in this embodiment, the chat records between the first instant messaging account and the second instant messaging account can be restored to the local of the first terminal through the second terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an apparatus for processing an instant chat record, including:
a second processor;
a second memory for storing second processor-executable instructions;
wherein the second processor is configured to: receiving a first request message sent by a first terminal bound with a first instant messaging account, wherein the first request message is used for requesting a second terminal bound with a second instant messaging account to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
sending a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in this embodiment, when the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the processing device for the instant chat record can assist the first terminal to restore the chat record between the first instant messaging account and the second instant messaging account to the local position of the first terminal, thereby reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
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 invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a method for obtaining instant chat records, in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method for instant chat record retrieval in accordance with another exemplary embodiment;
FIG. 3 is a flow chart illustrating a method for instant chat record retrieval in accordance with yet another exemplary embodiment;
FIG. 4 is a flow chart illustrating a method for instant chat record retrieval in accordance with yet another exemplary embodiment;
FIG. 5 is a flow chart illustrating a method for instant chat record retrieval in accordance with yet another exemplary embodiment;
FIG. 6 is a flow diagram illustrating a method of processing an instant chat log, in accordance with an exemplary embodiment;
FIG. 7 is a flowchart illustrating a method of processing an instant chat log, in accordance with yet another illustrative embodiment;
FIG. 8 is a block diagram illustrating an apparatus for obtaining instant chat records, in accordance with an exemplary embodiment;
fig. 9 is a block diagram illustrating an apparatus for obtaining an instant chat log, in accordance with another exemplary embodiment;
fig. 10 is a block diagram illustrating an apparatus for obtaining an instant chat log, in accordance with yet another illustrative embodiment;
FIG. 11 is a block diagram illustrating an apparatus for processing instant chat logs in accordance with an exemplary embodiment;
FIG. 12 is a block diagram illustrating an apparatus for processing instant chat logs in accordance with yet another exemplary embodiment;
FIG. 13 is a block diagram illustrating an apparatus for obtaining instant chat records, in accordance with an exemplary embodiment;
FIG. 14 is a block diagram illustrating an apparatus for processing instant chat logs in accordance with another exemplary embodiment;
fig. 15 is a block diagram illustrating an apparatus 1300 for obtaining an instant chat log according to an exemplary embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a method for obtaining an instant chat log, according to an example embodiment. The embodiment relates to a specific process that when a first terminal participating in instant chat does not store a chat record between a first instant messaging account and a second instant messaging account on a cloud server, the first terminal restores the chat record to the local through a second terminal performing instant chat with the first terminal. As shown in fig. 1, the method comprises the steps of:
in step S101, a first terminal bound to a first instant messaging account sends a first request message to a second terminal bound to a second instant messaging account.
The first request message is used for requesting the second terminal to upload a first chat record of the stored instant chat to a cloud server, and the account participating in the instant chat comprises the first instant messaging account and the second instant messaging account.
In this embodiment, the instant chat may be a chat service between two instant messaging accounts, or may also be a chat service between multiple instant messaging accounts, which is not limited in this embodiment. In this embodiment, the accounts participating in the instant chat include a first instant messaging account and a second instant messaging account, the first terminal related to this embodiment is a terminal bound with the first instant messaging account, and the second terminal is a terminal bound with the second instant messaging account. Taking an instant chat between a first instant messaging account and a second instant messaging account as an example, actually, the first instant messaging account and the second instant messaging account establish a chat service between the two accounts through a first terminal and a second terminal, that is: the user using the first terminal can establish a first instant messaging account on the first terminal, the user using the second terminal can establish a second instant messaging account on the second terminal, the user using the first terminal logs in the instant chat software through the first instant messaging account, the user using the second terminal also logs in the instant chat software through the second instant messaging account, and the two carry out instant messaging through the instant chat software. Optionally, the first instant messaging account and the second instant messaging account may be a mobile phone number of a user, a software account, or the like, and the instant chat software may be short message software on the terminal, or may be other software capable of performing instant messaging.
In practical application, the first terminal and the second terminal can respectively store the chat records between the first terminal and the second terminal, the chat records can be stored locally, and the chat records can be uploaded to a cloud server. When a user needs to import a chat record, for example, the first terminal deletes all the chat records stored locally due to some kind of failure, if the first terminal wants to recover the chat records between the first instant messaging account and the second instant messaging account at this time, the first terminal synchronizes the chat records of the instant chat stored on the cloud server to the local, that is, to the first terminal, or, if the original first terminal of the user is lost (the original first terminal has stored the chat records between the first instant messaging account and the second instant messaging account on the cloud server), when the user obtains a new first terminal again, the user performs a chat with the second instant messaging account by logging in the first instant messaging account on the new first terminal, but when the user needs to recover the chat records before the first instant messaging account and the second instant messaging account on the new first terminal, the new first terminal sends a request message to the cloud server to request that the chat records before the first instant messaging account and the second instant messaging account are synchronized to the local from the cloud server. Optionally, the chat history may be text, pictures, or voice.
However, in any of the above scenarios, if the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account in the cloud, the user cannot restore the chat record between the first instant messaging account and the second instant messaging account to the first terminal. Based on this, the embodiments of the present disclosure aim to solve the above technical problems of the prior art.
In this step, when the first terminal needs to locally restore the chat record between the first instant messaging account and the second instant messaging account, the first terminal may send a first request message to the second terminal, optionally, the first request message may carry the first instant messaging account, and the first request message is used to request the second terminal to upload the first chat record of the instant chat stored on the second terminal to the cloud server. When the second terminal receives the first request message, the second terminal detects whether a first chat record between a first instant messaging account and a second instant messaging account, which are locally stored, is uploaded to the cloud server.
In step S102, when the first terminal receives a first response message sent by a second terminal, a second request message is sent to the cloud server.
The second request message is used for requesting the first chat record to the cloud server, and the first response message is used for indicating the first chat record to be successfully uploaded to the cloud server to the first terminal.
In step S103, the first terminal receives the first chat record sent by the cloud server.
In this step, when the second terminal detects that the first chat record between the first instant messaging account and the second instant messaging account has been uploaded to the cloud server, the second terminal sends a first response message to the first terminal, where the first response message is used to notify the first terminal that the first chat record between the first instant messaging account and the second instant messaging account has been successfully uploaded to the cloud server. Because the first chat record between the first instant messaging account and the second instant messaging account relates to the user a corresponding to the first instant messaging account and the user B corresponding to the second instant messaging account, optionally, for the user a and the user B, the first chat record located on the cloud server, and both the user a and the user B have the permission to view and acquire. When the first terminal receives the first response message, the first terminal may send a second request message to the cloud server, where the second request message is used to request the first chat record from the cloud server, and the cloud server synchronizes the first chat record uploaded by the second terminal to the first terminal after receiving the second request message. Optionally, the second request message may carry a cloud account of the user a, and the cloud server may synchronize all chat records under the cloud account to the first terminal according to the cloud account of the user a, where the chat records include the first chat record between the first instant messaging account and the second instant messaging account.
As can be seen from the above description, when the first terminal does not locally save the chat record between the first instant messaging account and the second instant messaging account, or does not save the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the first terminal can restore the chat record between the first instant messaging account and the second instant messaging account to the local of the first terminal through the second terminal, thereby reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
In the method for acquiring an instant chat record provided by this embodiment, when the first terminal does not locally store a chat record between the first instant messaging account and the second instant messaging account, or the chat record between the first instant messaging account and the second instant messaging account is not stored on the cloud server, the first request message is sent to the second terminal through the first terminal, and when the first response message sent by the second terminal is received, the second request message is sent to the cloud server, so that the first chat record is acquired from the cloud server. That is, in this embodiment, the chat records between the first instant messaging account and the second instant messaging account can be restored to the local of the first terminal through the second terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
Fig. 2 is a flow chart illustrating a method for obtaining an instant chat log, according to another exemplary embodiment. The embodiment relates to a specific process that before a first terminal sends a first request message to a second terminal, the first terminal obtains a second chat record between a first instant messaging account and a second instant messaging account uploaded by the first terminal from a cloud server in advance, and judges whether the second chat record is complete, so as to determine whether to send the first request message to the second terminal according to a judgment result. In an ideal state, the first chat record of the instant chat uploaded to the cloud server by the second terminal and the second chat record of the instant chat uploaded to the cloud server by the first terminal are the same. On the basis of the foregoing embodiment, further before the foregoing S101, the method further includes:
in step S201, the first terminal sends a third request message to the cloud server, where the third request message is used to request a second chat record of the instant chat from the cloud server, and the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal.
The present embodiment relates to a possible scenario: the first terminal does not have complete chat records between the first instant messaging account and the second instant messaging account uploaded to the cloud server due to certain faults. In this embodiment, the chat record between the first instant messaging account and the second instant messaging account, which is uploaded to the cloud server by the first terminal, is referred to as a second chat record.
Therefore, when the first terminal needs to locally restore the complete chat record between the first instant messaging account and the second instant messaging account, the first terminal may first send a third request message to the cloud server, where the third request message is used to request the cloud server for the second chat record of the instant chat, and optionally, the third request message may carry the cloud account of the user corresponding to the first instant messaging account (i.e., the cloud account of the user a in the first embodiment). And the cloud server synchronizes all the chat records stored by the user A on the cloud server to the first terminal according to the third request message, wherein the chat records comprise a second chat record between the user A and the user B uploaded by the first terminal and also comprise chat records between the user A and other users.
In step S202, the first terminal determines whether the second chat record obtained from the cloud server is complete.
In step S203, if the first terminal determines that the second chat record is incomplete, the first terminal sends the first request message to the second terminal.
In this step, after the first terminal obtains the second chat record, the first terminal may determine whether the second chat record is complete, and when the first terminal determines that the second chat record is not complete, send a first request message to the second terminal to request the second terminal to upload a first chat record (the first chat record is complete) of an instant chat between the first instant messaging account and the second instant messaging account to the cloud server, so that the cloud server synchronizes the first chat record to the local of the first terminal.
Alternatively, the first terminal may determine whether the second chat log is complete through the following methods shown in fig. 3 and 4. It should be noted that the ending time of the instant chat performed by the first instant messaging account and the second instant messaging account is recorded on the first terminal related to fig. 3, and the memory size occupied by the complete chat record of the instant chat performed by the first instant messaging account and the second instant messaging account is recorded on the first terminal related to fig. 4.
Optionally, the first terminal may determine whether the first chat record is complete, and may refer to the implementation manner shown in fig. 3, where the method includes the following steps:
in step S301, the first terminal determines whether the expiration time of the second chat log matches a target time.
In step S302, if the deadline of the second chat log does not match the target time, the first terminal determines that the second chat log is incomplete.
In this implementation manner, the target time may be an ending time of the instant chat performed by the first instant messaging account and the second instant messaging account recorded on the first terminal, or an ending time configured to the first terminal by the user according to actual experience. Therefore, when the first terminal determines that the ending time of the acquired second chat record is matched with the target time, that is, the ending time of the first chat record is equal to the target time, it indicates that the second chat record acquired by the first terminal is complete, that is, the first terminal acquires the complete chat record between the first instant messaging account and the second instant messaging account, and at this time, the first terminal does not need to send a first request message to the second terminal; when the first terminal judges that the acquired ending time of the second chat record is not matched with the target time, that is, the ending time of the second chat record is earlier than the target time, it indicates that the second chat record acquired by the first terminal is incomplete, and therefore, the first terminal can send a first request message to the second terminal so as to acquire the complete chat record of the instant chat through the second terminal.
Optionally, the first request message may include, in addition to the first instant messaging account, at least one of a start time and an end time of an instant chat between the first instant messaging account and the second instant messaging account; when the first request message carries the starting moment of the instant chat, the second terminal is requested to upload all records in the instant chat after the starting moment to the cloud server, so that the first terminal acquires the chat records after the starting moment from the cloud server, and the chat records after the starting moment are the complete chat records of the instant chat; when the first request message carries the ending moment of the instant chat, the second terminal is requested to upload all records in the instant chat before the ending moment to the cloud server, so that the first terminal acquires the chat records before the ending moment from the cloud server, and the chat records before the ending moment are the complete chat records of the instant chat.
And when the first terminal acquires the complete chat record (namely the first chat record), the first terminal deletes the previously acquired second chat record and displays the complete chat record locally. According to the implementation mode, the first terminal does not need to send the first request message to the second terminal every time, and whether the first request message is sent to the second terminal is determined after corresponding judgment, so that the air interface overhead of the first terminal is greatly saved, the integrity of the chat records between the first instant messaging account and the second instant messaging account recovered by the first terminal is ensured, the loss of important data is avoided, and the user experience is improved.
Optionally, the first terminal may determine whether the second chat record is complete, and refer to the implementation manner shown in fig. 4, where the method includes the following steps:
in step S401, the first terminal determines whether the memory occupied by the second chat log matches a target memory.
In step S402, if the memory occupied by the second chat record does not match the target memory, the first terminal determines that the second chat record is incomplete.
In this implementation manner, the target memory may be a memory size occupied by a complete chat record of the instant chat performed by the first instant messaging account and the second instant messaging account recorded on the first terminal, or may be a memory configured to the first terminal by the user. Therefore, when the first terminal determines that the memory occupied by the acquired second chat record is matched with the target memory, namely the memory occupied by the first chat record is equal to the target memory, it indicates that the second chat record acquired by the first terminal is complete, namely the first terminal acquires the complete chat record between the first instant messaging account and the second instant messaging account, and the first terminal does not need to send a first request message to the second terminal; when the first terminal judges that the memory occupied by the obtained second chat record is not matched with the target memory, namely the memory occupied by the second chat record is smaller than the first memory, the second chat record obtained by the first terminal is incomplete, therefore, the first terminal can send a first request message to the second terminal so as to obtain the complete chat record (namely the first chat record) of the instant chat through the second terminal, and after the complete chat record is obtained, the first terminal deletes the previously obtained second chat record and displays the complete chat record locally. According to the implementation mode, the first terminal does not need to send the first request message to the second terminal every time, and whether the first request message is sent to the second terminal is determined after corresponding judgment, so that the air interface overhead of the first terminal is greatly saved, the integrity of the chat records between the first instant messaging account and the second instant messaging account recovered by the first terminal is ensured, the loss of important data is avoided, and the user experience is improved.
In the method for acquiring an instant chat record provided by this embodiment, the first terminal acquires, from the cloud server, the second chat record of an instant chat between the first instant messaging account and the second instant messaging account uploaded by the first terminal in advance through the third request message, and determines whether to send the first request message to the second terminal by determining whether the second chat record is complete.
Fig. 5 is a flowchart illustrating a method of obtaining an instant chat record, in accordance with yet another exemplary embodiment. The embodiment relates to a specific process that when the account participating in the instant chat also comprises at least one third instant messaging account, and the second terminal does not successfully upload the first chat record of the instant chat stored by the second terminal to the cloud server, the first terminal restores the chat record of the instant chat to the local. In this embodiment, the instant chat is a group chat including at least three accounts, and the first chat record stored locally by the second terminal includes the session records of all accounts in the instant chat, that is, the complete chat record of the instant chat includes the session records of all accounts in the instant chat. As shown in fig. 5, based on the above embodiment, further, the method may further include the following steps:
in step S501, when the first terminal receives the second response message sent by the second terminal, a fourth request message is sent to a third terminal bound with the third instant messaging account.
The fourth request message is used for requesting the third terminal to upload a stored third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server.
In this step, after the second terminal receives the first request message sent by the first terminal, the second terminal detects whether a first chat record related to an instant chat between the first instant messaging account and the second instant messaging account (of course, the instant chat may also relate to other accounts) has been uploaded to the cloud server. When the second terminal detects that the first chat record of the instant chat is not uploaded to the cloud server, and the second terminal cannot upload the first chat record to the cloud server due to a certain fault, the second terminal can judge whether the number of the accounts participating in the instant chat is greater than 2. And if the second terminal determines that the number of the accounts participating in the current instant chat is more than 2, which indicates that the instant chat is a group chat containing at least three users, the second terminal sends a second response message to the first terminal to inform that the first terminal does not upload the first chat record to the cloud server successfully at present.
After receiving the second response message, the first terminal may send a fourth request message to a third terminal participating in the instant chat and bound to a third instant messaging account, where the fourth request message is used to request the third terminal to upload a stored third chat record of the instant chat to the cloud server. Optionally, the fourth request message may carry the first instant messaging account. The third chat log is the same as the first chat log and contains all the conversation logs of the accounts participating in the instant chat.
In step S502, when the first terminal receives the third response message sent by the third terminal, a fifth request message is sent to the cloud server.
The fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server.
In step S503, the first terminal receives the third chat record sent by the cloud server.
Specifically, after the third terminal receives the fourth request message, the third terminal detects whether a third chat record stored by the third terminal is successfully uploaded to the cloud server, and if the third chat record is not successfully uploaded, the third terminal uploads the third chat record to the cloud server and sends a third response message to the first terminal; if the third terminal detects that the third chat record is successfully uploaded to the cloud server at present, the third terminal directly sends a third response message to the first terminal to inform that the third chat record of the instant chat is successfully uploaded to the cloud server, so that the first terminal sends a fifth request message to the cloud server, the fifth request message is used for requesting the third chat record to the cloud server, and after the cloud server receives the fifth request message sent by the second terminal, the third chat record is synchronized to the first terminal locally, so that the possibility of complete data loss is further reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
In the method for acquiring an instant chat record provided by this embodiment, when an account participating in a current instant chat includes at least one third instant messaging account in addition to a first instant messaging account and a second instant messaging account, and when the first terminal receives a second response message sent by the second terminal, the first terminal sends a fourth request message to the third terminal bound with the third instant messaging account to request the third terminal to upload a third chat record related to the instant chat on the third terminal to the cloud server, and when receiving a third response message sent by the third terminal, sends a fifth request message to the cloud server to acquire the third chat record from the cloud server. That is, in the instant chat scene of the group including at least three account numbers, when the second terminal does not upload the first chat record to the cloud server successfully, the first terminal can also restore the chat record of the instant chat to the local through other terminals participating in the instant chat, so that the possibility of complete data loss is further reduced, the backup reliability and flexibility of the chat record are greatly improved, and the user experience is improved.
Fig. 6 is a flow chart illustrating a method of processing an instant chat log, in accordance with an exemplary embodiment. The embodiment relates to a specific process that after receiving a first request message sent by a first terminal, a second terminal is matched with the first terminal to recover a chat record from a cloud server to the local of the first terminal. As shown in fig. 6, the method includes the steps of:
in step S601, the second terminal binding the second instant messaging account receives the first request message sent by the first terminal binding the first instant messaging account.
The first request message is used for requesting the second terminal to upload a first chat record of the stored instant chat to a cloud server, and the account participating in the instant chat comprises the first instant messaging account and the second instant messaging account.
In this step, a scenario related to this embodiment is the same as the scenario introduced in the first embodiment, that is, if the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account in the cloud, when the user wants to restore the chat record between the first instant messaging account and the second instant messaging account to the first terminal, the first terminal sends the first request message to the second terminal. And after the second terminal receives the first request message, the second terminal acquires that the first terminal currently wants to request the second terminal to upload a first chat record of the instant chat related to the first instant messaging account and the second instant messaging account to the cloud server. At this time, the second terminal detects the storage state of the first chat record, and determines whether the first chat record is uploaded to the cloud server, so as to obtain an uploading result.
In step S602, the second terminal sends a first response message or a second response message to the first terminal according to the uploading result of the first chat record.
The first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
In this step, when the second terminal determines that the first chat record has been successfully uploaded to the cloud server, the second terminal sends a first response message to the first terminal, and the first terminal acquires the first chat record from the cloud server, where a specific acquisition manner refers to the description of the embodiment shown in fig. 1; when the second terminal determines that the first chat record is not successfully uploaded to the cloud server, optionally, the second terminal may send a first response message to the first terminal after uploading the first chat record to the cloud server; optionally, when the second terminal determines that the current instant chat also relates to other accounts besides the two accounts, namely the first instant messaging account and the second instant messaging account, the second terminal sends a second response message to the first terminal at this time to inform that the first terminal does not upload the first chat record to the cloud server successfully. After the first terminal receives the second response message sent by the second terminal, the first terminal may restore the chat record of the instant chat to the local through other terminals participating in the instant chat, and the specific process may refer to the description of the embodiment shown in fig. 5, and is not described herein again.
To sum up, when the first terminal does not store the chat record between the first instant messaging account and the second instant messaging account on the cloud server, the second terminal can assist the first terminal to restore the chat record between the first instant messaging account and the second instant messaging account to the local position of the first terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat record are greatly improved, and the user experience is improved.
Fig. 7 is a flowchart illustrating a method of processing an instant chat log, in accordance with another exemplary embodiment. The embodiment relates to a specific process that the second terminal determines to send the first response message or the second response message to the first terminal according to the uploading result of the first chat record. On the basis of the foregoing embodiment, further, the foregoing S602 may specifically include:
in step S701, the second terminal determines whether the first chat record has been successfully uploaded to the cloud server. If yes, go to S702, otherwise go to S703.
In step S702, if it is determined that the first chat record is successfully uploaded to the cloud server, the second terminal sends the first response message to the first terminal.
In step S703, if it is determined that the first chat record is not successfully uploaded to the cloud server, the second terminal determines whether the number of accounts participating in the instant chat is greater than 2. If not, S704 is executed, and if yes, S705 is executed.
In this step, when the second terminal determines that the first chat record of the instant chat related to the first instant messaging account and the second instant messaging account is not successfully uploaded to the cloud server, the second terminal may first determine whether the instant chat currently related to the first instant messaging account and the second instant messaging account is a group chat including at least three accounts, specifically: namely, whether the number of the accounts participating in the instant chat is more than 2 is judged.
In step S704, if it is determined that the number of accounts participating in the instant chat is equal to 2, the second terminal uploads the first chat record to the cloud server until the upload is successful or the number of times of uploading is reached to a preset number, and sends the first response message or the second response message to the first terminal based on the upload result.
In this step, when the second terminal determines that the number of the accounts participating in the instant chat is equal to 2, it indicates that the first chat record related to the current instant chat only includes the conversation record between the first instant messaging account and the second instant messaging account, that is, the instant chat is an independent two-person chat. Optionally, the second terminal executes an uploading operation on the first chat record stored locally to the cloud server at this time until the uploading is successful or the number of times of executing the uploading reaches a preset number of times. When the second terminal determines that the stored first chat record is successfully uploaded to the cloud server, a first response message is sent to the first terminal, and therefore the first terminal synchronizes the first chat record to the local first terminal from the cloud server; and when the second terminal still does not successfully upload the first chat record to the cloud server until the uploading times reach the preset times, the second terminal sends a second response message to the first terminal to inform the first terminal that the first chat record is not successfully uploaded to the cloud server.
In step S705, if it is determined that the number of accounts participating in the instant chat is greater than 2, the second terminal sends the second response message to the first terminal.
In this step, when the second terminal determines that the number of the accounts participating in the instant chat is greater than 2, it indicates that the first chat record related to the current instant chat includes not only the session record between the first instant messaging account and the second instant messaging account, but also the session record between the first instant messaging account and other instant messaging accounts, that is, the instant chat is a chat of three or more people, and it also indicates that the terminal having the other instant messaging accounts can assist the first terminal in obtaining the chat record of the instant chat. At this time, the second terminal does not upload the first chat record to the cloud server, and the terminal with the other instant messaging account may upload the chat record of the instant chat to the cloud server at this time, so that the second terminal does not need to upload the chat record blindly at this time, and the air interface overhead of the second terminal can be saved. Therefore, the second terminal may send the second response message to the first terminal, so that the first terminal may synchronize the chat record of the instant chat to the local of the first terminal through the other terminals participating in the instant chat, which may specifically refer to the embodiment shown in fig. 5, and will not be described herein again.
In the method for processing the instant chat records provided by this embodiment, when the first terminal does not store the chat records related to the instant chat between the first instant messaging account and the second instant messaging account on the cloud server, and the second terminal also detects that the first chat records of the instant chat are not successfully uploaded to the cloud server, the first terminal can also restore the chat records of the instant chat to the local through other terminals participating in the instant chat, or adopt a multi-uploading mode, so that the possibility of complete data loss is further reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 8 is a block diagram illustrating an apparatus for obtaining an instant chat record according to an exemplary embodiment, where the apparatus may be the first terminal in the foregoing method embodiment, and may also be an apparatus integrated in the foregoing first terminal. As shown in fig. 8, the apparatus includes: a first sending module 10, a receiving module 11 and a second sending module 12;
a first sending module 10, configured to send a first request message to a second terminal bound to a second instant messaging account, where the first request message is used to request the second terminal to upload a stored first chat record of an instant chat to a cloud server, and accounts participating in the instant chat include the first instant messaging account and the second instant messaging account;
a second sending module 12, configured to send, when the receiving module 11 receives a first response message sent by the second terminal, a second request message to the cloud server, where the second request message is used to request the cloud server for the first chat record, and the first response message is used to indicate to the first terminal that the first chat record has been successfully uploaded to the cloud server;
a receiving module 11, configured to receive the first chat record sent by the cloud server.
To sum up, the apparatus for obtaining an instant chat record provided in the embodiment of the present disclosure sends a first request message to a second terminal through a first sending module when a first terminal does not locally store a chat record between a first instant messaging account and a second instant messaging account, or does not store a chat record between the first instant messaging account and the second instant messaging account on a cloud server, and sends a second request message to the cloud server through a second sending module when a receiving module receives a first response message sent by the second terminal, so as to obtain the first chat record from the cloud server. That is, in this embodiment, the chat records between the first instant messaging account and the second instant messaging account can be restored to the local of the first terminal through the second terminal, so that the possibility of complete data loss is reduced, the backup reliability and flexibility of the chat records are greatly improved, and the user experience is improved.
Fig. 9 is a block diagram illustrating an apparatus for obtaining an instant chat record according to another exemplary embodiment, and on the basis of the above embodiment illustrated in fig. 8, the apparatus may further include: a third sending module 13 and a judging module 14;
the third sending module 13 is configured to send a third request message to the cloud server before the first sending module 10 sends a first request message to a second terminal bound to a second instant messaging account, where the third request message is used to request a second chat record of the instant chat from the cloud server, and the second chat record is a chat record of the instant chat uploaded by the first terminal to the cloud server;
the determining module 14 is configured to determine whether the second chat record obtained from the cloud server is complete, and instruct the first sending module to send the first request message to the second terminal when the second chat record is determined to be incomplete.
Optionally, with continuing reference to fig. 9, the determining module 14 may include:
a first judging unit 141 configured to judge whether the ending time of the second chat record matches a target time;
a first determining unit 142 configured to determine that the second chat log is incomplete when the deadline time of the second chat log does not match the target time.
Optionally, as shown in fig. 9, the determining module 14 may further include:
a second determining unit 143, configured to determine whether the memory occupied by the second chat record matches a target memory;
a second determining unit 144, configured to determine that the second chat log is incomplete when the memory occupied by the second chat log does not match the target memory.
Further, the first request message and the fourth request message of the following embodiments further include at least one of a start time and an end time of the instant chat.
To sum up, the apparatus for acquiring an instant chat record according to the embodiment of the present disclosure acquires, from a cloud server through a third sending module and a receiving module, a second chat record of an instant chat between a first instant messaging account and a second instant messaging account uploaded by the apparatus in advance through a third request message, and determines whether to send a first request message to a second terminal by determining whether the second chat record is complete through a determining module, so that the apparatus for acquiring an instant chat record does not need to send the first request message to the second terminal every time, but determines whether to send the first request message to the second terminal after corresponding determination, thereby greatly saving the overhead of the apparatus for acquiring an instant chat record, and simultaneously ensuring the integrity of a chat record between the first instant messaging account and the second instant messaging account recovered by the apparatus for acquiring an instant chat record, the loss of important data is avoided, and the user experience is improved.
Fig. 10 is a block diagram of an apparatus for obtaining an instant chat record according to yet another exemplary embodiment, if the account participating in the instant chat further includes at least one third instant messaging account, on the basis of the embodiment shown in fig. 9, the apparatus may further include: a fourth transmitting module 15 and a fifth transmitting module 16;
a fourth sending module 15, configured to send a fourth request message to a third terminal bound with the third instant messaging account when the receiving module 11 receives a second response message sent by the second terminal; the fourth request message is used for requesting the third terminal to upload a saved third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server;
a fifth sending module 16, configured to send a fifth request message to the cloud server when the receiving module 11 receives a third response message sent by the third terminal; the fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server;
the receiving module 11 is configured to receive the third chat record sent by the cloud server.
To sum up, in the apparatus for obtaining an instant chat record provided in the embodiment of the present disclosure, when an account participating in a current instant chat includes at least one third instant messaging account in addition to a first instant messaging account and a second instant messaging account, and when the first terminal receives a second response message sent by the second terminal, the fourth sending module sends a fourth request message to the third terminal bound with the third instant messaging account, so as to request the third terminal to upload a third chat record related to the instant chat on the third terminal to the cloud server, and when the receiving module receives a third response message sent by the third terminal, sends a fifth request message to the cloud server through the fifth sending module, so as to obtain the third chat record from the cloud server. That is, in the instant chat scene of a group including at least three account numbers, when the second terminal does not successfully upload the first chat record to the cloud server, the instant chat record acquisition device can also restore the chat record of the instant chat to the local through other terminals participating in the instant chat, thereby further reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat record, and improving the user experience.
Fig. 11 is a block diagram illustrating an apparatus for processing an instant chat log, in accordance with an exemplary embodiment. The device may be the second terminal in the above method embodiment, and may also be a device integrated in the second terminal. As shown in fig. 11, the apparatus includes: a receiving module 20 and a transmitting module 21.
The receiving module 20 is configured to receive a first request message sent by a first terminal bound to a first instant messaging account, where the first request message is used to request the second terminal to upload a stored first chat record of an instant chat to a cloud server, and the accounts participating in the instant chat include the first instant messaging account and the second instant messaging account;
the sending module 21 is configured to send a first response message or a second response message to the first terminal according to an uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
To sum up, according to the processing device for instant chat records provided by the embodiment of the present disclosure, when the first terminal does not store the chat records between the first instant messaging account and the second instant messaging account on the cloud server, the processing device for instant chat records can assist the first terminal to restore the chat records between the first instant messaging account and the second instant messaging account to the local of the first terminal, thereby reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat records, and improving the user experience.
Fig. 12 is a block diagram illustrating an apparatus for processing an instant chat log, in accordance with yet another illustrative embodiment. In addition to the embodiment shown in fig. 11, the sending module 21 may further include: a first judgment unit 211, a second judgment unit 212, and a transmission unit 213;
the first determining unit 211 is configured to determine whether the first chat record is successfully uploaded to the cloud server;
the sending unit 213 is configured to send the first response message to the first terminal when the first determining unit 211 determines that the first chat record has been successfully uploaded to the cloud server;
the second determining unit 212 is configured to determine whether the number of accounts participating in the instant chat is greater than 2 when the first determining unit 211 determines that the first chat record is not successfully uploaded to the cloud server;
the sending unit 213 is configured to, when the second determining unit 212 determines that the number of accounts participating in the instant chat is equal to 2, upload the first chat record to the cloud server until the upload is successful or the number of times of upload execution reaches a preset number of times, and send the first response message or the second response message to the first terminal based on an upload result; and when the second determining unit 212 determines that the number of the accounts participating in the instant chat is greater than 2, sending the second response message to the first terminal.
To sum up, the processing apparatus for instant chat records provided by the embodiment of the present disclosure, when the first terminal does not store the chat records related to the instant chat between the first instant messaging account and the second instant messaging account on the cloud server, and the processing apparatus for instant chat records also detects that the first chat record of the instant chat is not successfully uploaded to the cloud server, the first terminal may also restore the chat records of the instant chat to the local through other terminals participating in the instant chat, thereby further reducing the possibility of complete data loss, greatly improving the backup reliability and flexibility of the chat records, and improving the user experience.
With regard to the apparatus in the above-described embodiment, the specific manner in which the respective modules and units perform operations has been described in detail in the embodiment related to the method, and will not be elaborated upon here.
Having described the internal functional modules and structural schematic of the instant chat log obtaining device and the instant chat log processing device, fig. 13 is a block diagram of an instant chat log obtaining device according to an exemplary embodiment, where the instant chat log obtaining device may be the first terminal in the foregoing method embodiment. As shown in fig. 13, the means for obtaining the instant chat record may include: a first processor 31 for controlling the execution of instructions, a first memory 32 for storing instructions executable by the first processor 31;
wherein the first processor 31 is configured to: sending a first request message to a second terminal bound with a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
when receiving the first response message sent by the second terminal, sending a second request message to the cloud server, wherein the second request message is used for requesting the first chat record to the cloud server, and the first response message is used for indicating that the first chat record is successfully uploaded to the cloud server to a first terminal bound with the first instant messaging account;
and receiving the first chat record sent by the cloud server.
Fig. 14 is a block diagram illustrating an apparatus for processing an instant chat log according to an exemplary embodiment, where the apparatus for processing an instant chat log may be a second terminal in the foregoing method embodiment. As shown in fig. 14, the processing device of the instant chat log may include: a second processor 41, a second memory 42 for storing instructions executable by the second processor 41;
wherein the second processor 41 is configured to: receiving a first request message sent by a first terminal bound with a first instant messaging account, wherein the first request message is used for requesting a second terminal bound with a second instant messaging account to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
sending a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
In the embodiment of the entity of the apparatus for obtaining the instant chat records and the entity of the apparatus for Processing the instant chat records, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, the processor may be any conventional processor, and the memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
Fig. 15 is a block diagram illustrating an apparatus 1300 for obtaining an instant chat log according to an exemplary embodiment. For example, the instant chat log obtaining apparatus 1300 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 15, the apparatus 1300 for obtaining an instant chat record may include one or more of the following components: a processing component 1302, a memory 1304, a power component 1306, a multimedia component 1308, an audio component 1310, an input/output (I/O) interface 1312, a sensor component 1314, and a communication component 1316. Optionally, the apparatus 1300 for obtaining the instant chat record may also be replaced with the processing apparatus for the instant chat record, and the components included therein are similar and will not be described herein again.
The processing component 1302 generally controls the overall operation of the instant chat log retrieval apparatus 1300, such as operations associated with display, telephone calls, data communications, camera operations, and logging operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1302 can include one or more modules that facilitate interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate interaction between the multimedia component 1308 and the processing component 1302.
The memory 1304 is configured to store various types of data to support the operation of the instant chat log retrieval apparatus 1300. Examples of such data include instructions for any application or method operating on the instant chat log retrieval device 1300, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1304 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 1306 provides power to the various components of instant chat log retrieval device 1300. Power components 1306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the retrieval device 1300 of the instant chat log.
The multimedia component 1308 includes a touch-sensitive display screen that provides an output interface between the instant chat history obtaining device 1300 and the user. In some embodiments, the touch display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1300 for acquiring an instant chat record is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1310 is configured to output and/or input audio signals. For example, the audio component 1310 includes a Microphone (MIC) configured to receive an external audio signal when the apparatus 1300 for acquiring a live chat recording is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1304 or transmitted via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
The I/O interface 1312 provides an interface between the processing component 1302 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 1314 includes one or more sensors for providing various aspects of status assessment for the instant chat log capture device 1300. For example, the sensor assembly 1314 may detect the open/closed status of the instant chat log retrieval device 1300, the relative positioning of the components, such as the display and keypad of the instant chat log retrieval device 1300, the sensor assembly 1314 may also detect a change in the position of the instant chat log retrieval device 1300 or a component of the instant chat log retrieval device 1300, the presence or absence of user contact with the instant chat log retrieval device 1300, the orientation or acceleration/deceleration of the instant chat log retrieval device 1300, and a change in the temperature of the instant chat log retrieval device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1316 is configured to facilitate communication between the apparatus 1300 for obtaining instant chat records and other devices in a wired or wireless manner. The instant chat log obtaining apparatus 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1316 also includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the instant chat record obtaining apparatus 1300 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components, for performing the instant chat record obtaining method. When the apparatus 1300 for obtaining an instant chat record is replaced with the apparatus for processing an instant chat record, the apparatus can be used to execute the method for processing an instant chat record.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as the memory 1304, including instructions executable by the processor 1320 of the apparatus 1300 for obtaining an instant chat record to perform the method for obtaining an instant chat record, or executable by the processor of the apparatus for processing an instant chat record to perform the method for processing an instant chat record. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
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 application 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 limited only by the appended claims.

Claims (11)

1. A method for obtaining instant chat records is characterized by comprising the following steps:
a first terminal binding a first instant messaging account sends a first request message to a second terminal binding a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
when the first terminal receives a first response message sent by the second terminal, sending a second request message to the cloud server, wherein the second request message is used for requesting the first chat record from the cloud server, and the first response message is used for indicating the first chat record to the first terminal to be successfully uploaded to the cloud server;
the first terminal receives the first chat record sent by the cloud server;
before the first terminal binding the first instant messaging account sends the first request message to the second terminal binding the second instant messaging account, the method further includes:
when an instant chat record between the first instant messaging account and a second instant messaging account is not stored locally, the first terminal sends a third request message to the cloud server, wherein the third request message carries a cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, and the second chat record is a chat record of the instant chat uploaded to the cloud server by the first terminal;
the first terminal judges whether the second chat record acquired from the cloud server is complete or not;
if the first terminal judges that the second chat record is incomplete, the first terminal sends the first request message to the second terminal;
wherein, the first terminal judges whether the second chat record obtained from the cloud server is complete or not, including:
the first terminal judges whether the ending time of the second chat record is matched with a target time, and if the ending time of the second chat record is not matched with the target time, the first terminal determines that the second chat record is incomplete;
or, the first terminal judges whether the memory occupied by the second chat record is matched with a target memory, and if the memory occupied by the second chat record is not matched with the target memory, the first terminal determines that the second chat record is incomplete.
2. The method of claim 1, wherein if the account participating in the instant chat further comprises at least a third instant messaging account, the method further comprises:
when the first terminal receives a second response message sent by the second terminal, sending a fourth request message to a third terminal bound with the third instant messaging account; the fourth request message is used for requesting the third terminal to upload a saved third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server;
when the first terminal receives a third response message sent by the third terminal, sending a fifth request message to the cloud server; the fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server;
and the first terminal receives the third chat record sent by the cloud server.
3. The method of claim 2, wherein the first request message and the fourth request message comprise at least one of a start time of the instant chat and an end time of the instant chat.
4. A method for processing instant chat records is characterized by comprising the following steps:
a second terminal binding a second instant messaging account receives a first request message sent by a first terminal binding a first instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account; wherein the first request message is a third request message sent by the first terminal to the cloud server when the instant chat record between the first instant messaging account and the second instant messaging account is not locally saved by the first terminal, wherein the third request message carries the cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal, the first terminal judges whether the ending time of the second chat record is matched with the target time or judges whether the memory occupied by the second chat record is matched with the target memory, if not, determining that the second chat record is incomplete, and sending the second chat record when the first terminal determines that the second chat record is incomplete;
the second terminal sends a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
5. The method of claim 4, wherein the sending, by the second terminal, the first response message or the second response message to the first terminal according to the uploading result of the first chat record comprises:
the second terminal judges whether the first chat record is successfully uploaded to the cloud server;
if the first chat record is successfully uploaded to the cloud server, the second terminal sends the first response message to the first terminal;
if the first chat record is not successfully uploaded to the cloud server, the second terminal judges whether the number of the account numbers participating in the instant chat is greater than 2 or not;
if the number of the account numbers participating in the instant chat is judged to be equal to 2, the second terminal uploads the first chat record to the cloud server until the uploading is successful or the uploading execution times reach a preset number, and sends the first response message or the second response message to the first terminal based on the uploading result;
and if the number of the account numbers participating in the instant chat is judged to be larger than 2, the second terminal sends the second response message to the first terminal.
6. An apparatus for obtaining an instant chat record, comprising: the device comprises a first sending module, a receiving module and a second sending module;
the first sending module is configured to send a first request message to a second terminal bound with a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
the second sending module is configured to send a second request message to the cloud server when the receiving module receives a first response message sent by the second terminal, wherein the second request message is used for requesting the first chat record from the cloud server, and the first response message is used for indicating that the first chat record is successfully uploaded to the cloud server to the first terminal;
the receiving module is configured to receive the first chat record sent by the cloud server;
wherein the apparatus further comprises: a third sending module and a judging module;
the third sending module is configured to send a third request message to the cloud server when an instant chat record between the first instant messaging account and a second instant messaging account is not locally stored in a first terminal before the first sending module sends a first request message to a second terminal bound with the second instant messaging account, wherein the third request message carries a cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, and the second chat record is a chat record of the instant chat uploaded to the cloud server by the first terminal;
the judging module is configured to judge whether the second chat record acquired from the cloud server is complete, and instruct the first sending module to send the first request message to the second terminal when the second chat record is judged to be incomplete;
wherein, the judging module comprises:
a first judging unit configured to judge whether an ending time of the second chat log matches a target time, a first determining unit configured to determine that the second chat log is incomplete when the ending time of the second chat log does not match the target time;
alternatively, the first and second electrodes may be,
the judging module comprises:
and the second determining unit is configured to determine that the second chat log is incomplete when the memory occupied by the second chat log is not matched with the target memory.
7. The apparatus of claim 6, wherein if the account participating in the instant chat further comprises at least a third instant messaging account, the apparatus further comprises:
a fourth sending module, configured to send a fourth request message to a third terminal bound with the third instant messaging account when the receiving module receives a second response message sent by the second terminal; the fourth request message is used for requesting the third terminal to upload a saved third chat record of the instant chat to the cloud server, and the second response message is used for indicating to the first terminal that the first chat record is not successfully uploaded to the cloud server;
a fifth sending module, configured to send a fifth request message to the cloud server when the receiving module receives a third response message sent by the third terminal; the fifth request message is used for requesting the cloud server for the third chat record, and the third response message is used for indicating the first terminal that the third chat record is successfully uploaded to the cloud server;
the receiving module is configured to receive the third chat record sent by the cloud server.
8. An apparatus for processing an instant chat log, comprising: the device comprises a receiving module and a sending module;
the receiving module is configured to receive a first request message sent by a first terminal bound with a first instant messaging account, wherein the first request message is used for requesting a second terminal to upload a stored first chat record of an instant chat to a cloud server, and accounts participating in the instant chat comprise the first instant messaging account and a second instant messaging account; wherein the first request message is a third request message sent by the first terminal to the cloud server when the instant chat record between the first instant messaging account and the second instant messaging account is not locally saved by the first terminal, wherein the third request message carries the cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal, the first terminal judges whether the ending time of the second chat record is matched with the target time or judges whether the memory occupied by the second chat record is matched with the target memory, if not, determining that the second chat history is incomplete and sending the second chat history when the first terminal determines that the second chat history is incomplete;
the sending module is configured to send a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
9. The apparatus of claim 8, wherein the sending module comprises: the device comprises a first judging unit, a second judging unit and a sending unit;
the first judging unit is configured to judge whether the first chat record is successfully uploaded to the cloud server;
the sending unit is configured to send the first response message to the first terminal when the first judging unit judges that the first chat record is successfully uploaded to the cloud server;
the second judging unit is configured to judge whether the number of the account numbers participating in the instant chat is greater than 2 when the first judging unit judges that the first chat record is not successfully uploaded to the cloud server;
the sending unit is configured to, when the second judging unit judges that the number of the account numbers participating in the instant chat is equal to 2, upload the first chat record to the cloud server until the upload is successful or the number of upload execution times reaches a preset number, and send the first response message or the second response message to the first terminal based on an upload result; and when the second judging unit judges that the number of the account numbers participating in the instant chat is greater than 2, sending the second response message to the first terminal.
10. An apparatus for obtaining an instant chat record, comprising:
a first processor;
a first memory for storing first processor-executable instructions;
wherein the first processor is configured to:
sending a first request message to a second terminal bound with a second instant messaging account, wherein the first request message is used for requesting the second terminal to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account;
when a first response message sent by the second terminal is received, sending a second request message to the cloud server, wherein the second request message is used for requesting the first chat record to the cloud server, and the first response message is used for indicating that the first chat record is successfully uploaded to the cloud server to a first terminal bound with the first instant messaging account;
receiving the first chat record sent by the cloud server;
wherein the first processor is further configured to: before sending a first request message to a second terminal bound with a second instant messaging account, when an instant chat record between a first instant messaging account and the second instant messaging account is not locally stored in the first terminal, sending a third request message to the cloud server, wherein the third request message carries the cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, and the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal;
judging whether the second chat record acquired from the cloud server is complete or not, and sending the first request message to the second terminal when the second chat record is judged to be incomplete;
wherein, the first terminal judges whether the second chat record obtained from the cloud server is complete or not, including:
the first terminal judges whether the ending time of the second chat record is matched with a target time, and if the ending time of the second chat record is not matched with the target time, the first terminal determines that the second chat record is incomplete;
or, the first terminal judges whether the memory occupied by the second chat record is matched with a target memory, and if the memory occupied by the second chat record is not matched with the target memory, the first terminal determines that the second chat record is incomplete.
11. An apparatus for processing an instant chat log, comprising:
a second processor;
a second memory for storing second processor-executable instructions;
wherein the second processor is configured to:
receiving a first request message sent by a first terminal bound with a first instant messaging account, wherein the first request message is used for requesting a second terminal bound with a second instant messaging account to upload a stored first chat record of instant chat to a cloud server, and the accounts participating in the instant chat comprise the first instant messaging account and the second instant messaging account; wherein the first request message is a third request message sent by the first terminal to the cloud server when the instant chat record between the first instant messaging account and the second instant messaging account is not locally saved by the first terminal, wherein the third request message carries the cloud account corresponding to the first instant messaging account, the third request message is used for requesting a second chat record of the instant chat from the cloud server, the second chat record is the chat record of the instant chat uploaded to the cloud server by the first terminal, the first terminal judges whether the ending time of the second chat record is matched with the target time or judges whether the memory occupied by the second chat record is matched with the target memory, if not, determining that the second chat record is incomplete, and sending the second chat record when the first terminal judges that the second chat record is incomplete;
sending a first response message or a second response message to the first terminal according to the uploading result of the first chat record; the first response message is used for indicating the first terminal that the first chat record is successfully uploaded to the cloud server, and the second response message is used for indicating the first terminal that the first chat record is unsuccessfully uploaded to the cloud server.
CN201710088855.8A 2017-02-20 2017-02-20 Method and device for acquiring and processing instant chat records Active CN106713127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710088855.8A CN106713127B (en) 2017-02-20 2017-02-20 Method and device for acquiring and processing instant chat records

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710088855.8A CN106713127B (en) 2017-02-20 2017-02-20 Method and device for acquiring and processing instant chat records

Publications (2)

Publication Number Publication Date
CN106713127A CN106713127A (en) 2017-05-24
CN106713127B true CN106713127B (en) 2021-03-09

Family

ID=58911876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710088855.8A Active CN106713127B (en) 2017-02-20 2017-02-20 Method and device for acquiring and processing instant chat records

Country Status (1)

Country Link
CN (1) CN106713127B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111357245B (en) * 2017-11-15 2022-08-09 华为技术有限公司 Information searching method, terminal, network equipment and system
CN114024926A (en) * 2018-02-28 2022-02-08 创新先进技术有限公司 Communication data recovery method, device and equipment
CN108881403A (en) * 2018-05-29 2018-11-23 珠海格力电器股份有限公司 A kind of method and device of backup chat record
CN114500445A (en) * 2022-01-04 2022-05-13 维沃移动通信有限公司 Communication record acquisition method and device, electronic equipment and storage medium
CN116450635B8 (en) * 2023-06-15 2024-03-22 中免日上互联科技有限公司 Data cleaning method and system based on artificial intelligence

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125135A (en) * 2013-04-28 2014-10-29 腾讯科技(深圳)有限公司 Instant messaging application chatting record management method and terminal thereof
CN105429846A (en) * 2014-09-18 2016-03-23 中兴通讯股份有限公司 Instant chat tool chat record synchronization methods and terminal equipment
CN106230703A (en) * 2016-08-30 2016-12-14 腾讯科技(深圳)有限公司 The process of chat record and acquisition methods and device
CN106375197A (en) * 2016-10-07 2017-02-01 苏州高精特专信息科技有限公司 Chatting record keeping method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125135A (en) * 2013-04-28 2014-10-29 腾讯科技(深圳)有限公司 Instant messaging application chatting record management method and terminal thereof
CN105429846A (en) * 2014-09-18 2016-03-23 中兴通讯股份有限公司 Instant chat tool chat record synchronization methods and terminal equipment
CN106230703A (en) * 2016-08-30 2016-12-14 腾讯科技(深圳)有限公司 The process of chat record and acquisition methods and device
CN106375197A (en) * 2016-10-07 2017-02-01 苏州高精特专信息科技有限公司 Chatting record keeping method

Also Published As

Publication number Publication date
CN106713127A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106713127B (en) Method and device for acquiring and processing instant chat records
CN106488335B (en) Live-broadcast control method and device
US10608988B2 (en) Method and apparatus for bluetooth-based identity recognition
JP6259158B2 (en) Smart device detection method, apparatus, program, and recording medium
CN111031332B (en) Data interaction method, device, server and storage medium
CN108702763B (en) Method and device for sending lead code and scheduling request
US20150119011A1 (en) Information processing method and device
CN109814942B (en) Parameter processing method and device
WO2017214763A1 (en) Method and device for uploading video, and camera device
CN111368232A (en) Password sharing reflux method and device, electronic equipment and storage medium
CN108989062B (en) Method, device, terminal, system and storage medium for updating group member data
CN109302341B (en) Instant messaging method, instant messaging device, electronic equipment and storage medium
CN105578401A (en) Locating information collection method, locating information collection device and mobile terminal
CN111385349B (en) Communication processing method, communication processing device, terminal, server and storage medium
CN113177093A (en) Data synchronization method and device, electronic equipment and storage medium
CN115208873A (en) File transmission method, device and storage medium
CN112202582A (en) Group establishing method and device, electronic equipment and storage medium
CN113596175A (en) Scene synchronization method, terminal, server and system
CN107222576B (en) Photo album synchronization method and device
CN109245992B (en) Request processing method and device, electronic equipment and storage medium
CN110908814A (en) Message processing method and device, electronic equipment and storage medium
CN108401529B (en) System message acquisition method and device, and system message transmission method and device
CN105607958B (en) Information input method and device
CN115706966A (en) Method and device for connecting network and readable storage medium
CN112769677A (en) Data synchronization method, data synchronization device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant