CN110365739A - Message synchronization method, apparatus, computer installation and computer readable storage medium - Google Patents

Message synchronization method, apparatus, computer installation and computer readable storage medium Download PDF

Info

Publication number
CN110365739A
CN110365739A CN201910488459.3A CN201910488459A CN110365739A CN 110365739 A CN110365739 A CN 110365739A CN 201910488459 A CN201910488459 A CN 201910488459A CN 110365739 A CN110365739 A CN 110365739A
Authority
CN
China
Prior art keywords
message
synchronized
conversation message
local cache
cache system
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.)
Pending
Application number
CN201910488459.3A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910488459.3A priority Critical patent/CN110365739A/en
Publication of CN110365739A publication Critical patent/CN110365739A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/216Handling conversation history, e.g. grouping of messages in sessions or threads
    • 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

Abstract

The present invention provides a kind of message synchronization method, apparatus, computer installation and computer readable storage medium.The message synchronization method includes: the instruction for receiving and entering with the chat window of designated user;Acquisition need to be in the message identifier for the conversation message to be synchronized that the chat window is shown;Judge whether local cache system preserves the conversation message to be synchronized;If the local cache system preserves the conversation message to be synchronized, the conversation message to be synchronized is pulled from the local cache system according to the message identifier;If the local cache system does not preserve the conversation message to be synchronized, the conversation message to be synchronized is pulled from default background server according to the message identifier.The present invention relates to multiple terminals data synchronizing function optimisation technique, it can be achieved that the concurrent pressure that the data for reducing background server synchronize, saves the flow power resources of user.

Description

Message synchronization method, apparatus, computer installation and computer readable storage medium
Technical field
The present invention relates to field of communication technology more particularly to a kind of message synchronization method, apparatus, computer installation and calculating Machine readable storage medium storing program for executing.
Background technique
In today of mobile Internet high speed development, various mobile device/end PC instant chats that are based on are communicated Software is widely used by more and more users.Existing instant chat communication software, user can be same by multiple terminals Step system sees same chat record on the end PC, mobile terminal, and the prior art needs every time in order to realize that chat messages are synchronous Synchronous chat messages are requested to backstage server system, there are problems that consuming customer flow resource excessively.
Summary of the invention
In view of above-mentioned, the present invention provides a kind of message synchronization method, apparatus, computer installation and computer-readable storage medium Matter, can realize to pull conversation message from traditional direct request background server and become having ready conditions and logically pull, and reduce The concurrent pressure of background server, saves the flow power resources of user.
One embodiment of the application provides a kind of message synchronization method, which comprises
Receive the instruction entered with the chat window of designated user;
Acquisition need to be in the message identifier for the conversation message to be synchronized that the chat window is shown;
Judge whether local cache system preserves the conversation message to be synchronized;
If the local cache system preserves the conversation message to be synchronized, according to the message identifier from described Ground caching system pulls the conversation message to be synchronized;And
If the local cache system does not preserve the conversation message to be synchronized, according to the message identifier from default Background server pulls the conversation message to be synchronized.
Preferably, the message identifier includes session contact people information, request time stamp and message shot.
Preferably, the acquisition need to be in the step of the message identifier for the conversation message to be synchronized that the chat window is shown Before rapid further include:
Obtain the user right information for initiating to enter the instruction of the chat window;And
It is determined whether to synchronize the conversation message to be synchronized according to the user right information.
Preferably, described to judge the step of whether the local cache system preserves the conversation message to be synchronized packet It includes:
Obtain first session information that the local cache system is cached to the last item conversation message first when Between section;
Being obtained according to the message identifier need to be at the second of the conversation message to be synchronized that the chat window is shown Between section;
Judge whether second time interval belongs to the subset in the first time section;
If second time interval belongs to the subset in the first time section, determine that the local cache system is protected There is the conversation message to be synchronized.
Preferably, it is described judge the step of whether second time interval belongs to the subset in the first time section it Afterwards further include:
If second time interval is not belonging to the subset in the first time section, the local cache system is determined The conversation message to be synchronized is not preserved.
Preferably, the step for pulling the conversation message to be synchronized from default background server according to the message identifier Suddenly include:
Judge whether the local cache system preserves part conversation message to be synchronized;
If the local cache system preserves part conversation message to be synchronized, institute is pulled from the local cache system Part conversation message to be synchronized is stated, and pulls the conversation message to be synchronized of rest part from the default background server;And
Integration processing is carried out to the conversation message pulled from the local cache system and the default background server, with It is shown in the chat window.
Preferably, it is described judge the step of whether the local cache system preserves part conversation message to be synchronized after Further include:
If the local cache system does not preserve any Message Record of the conversation message to be synchronized, according to Message identifier pulls the conversation message to be synchronized from the default background server.
One embodiment of the application provides a kind of message synchronization device, and described device includes:
Receiving module, for receiving into the instruction with the chat window of designated user;
Module is obtained, it need to be in the message identifier for the conversation message to be synchronized that the chat window is shown for obtaining;
Judgment module, for judging whether local cache system preserves the conversation message to be synchronized;
First pulls module, for when the local cache system preserves the conversation message to be synchronized, according to institute It states message identifier and pulls the conversation message to be synchronized from the local cache system;And
Second pulls module, for when the local cache system does not preserve the conversation message to be synchronized, according to The message identifier pulls the conversation message to be synchronized from default background server.
One embodiment of the application provides a kind of computer installation, and the computer installation includes processor and memory, Several computer programs are stored on the memory, the processor is for when executing the computer program stored in memory The step of realizing message synchronization method as elucidated before.
One embodiment of the application provides a kind of computer readable storage medium, is stored thereon with computer program, described The step of message synchronization method as elucidated before is realized when computer program is executed by processor.
Above-mentioned message synchronization method, apparatus, computer installation and computer readable storage medium, when carrying out message synchronization First determine whether local cache system is stored with conversation message to be synchronized, realizes and drawn from traditional direct request background server It takes conversation message to be changed into have ready conditions and logically pull, considerably reduces the concurrent pressure of background server, improve system Stability, the reduction for pulling message frequency can also save the resources such as flow, the electricity of user, disappear for the session pulled Ceasing user is directly to read from local cache when seeing, message pulls faster.
Detailed description of the invention
It, below will be to required in embodiment description in order to illustrate more clearly of the technical solution of embodiment of the present invention The attached drawing used is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the step flow chart of message synchronization method in one embodiment of the invention.
Fig. 2 is the functional block diagram of message synchronization device in one embodiment of the invention.
Fig. 3 is computer schematic device in one embodiment of the invention.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying mode, the present invention will be described in detail.It should be noted that in the absence of conflict, presently filed embodiment and reality The feature applied in mode can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment Only some embodiments of the invention, rather than whole embodiments.Based on the embodiment in the present invention, this field Those of ordinary skill's every other embodiment obtained without making creative work, belongs to guarantor of the present invention The range of shield.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Preferably, message synchronization method of the invention is applied in one or more computer installation.The computer Device is that one kind can be according to the instruction for being previously set or storing, the automatic equipment for carrying out numerical value calculating and/or information processing, Hardware includes but is not limited to microprocessor, specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processing unit (Digital Signal Processor, DSP), embedded device etc..
The computer installation can be the meter such as desktop PC, laptop, tablet computer, server, mobile phone Calculate equipment.The computer installation can with user by the modes such as keyboard, mouse, remote controler, touch tablet or voice-operated device into Row human-computer interaction.
Embodiment one:
Fig. 1 is the step flow chart of message synchronization method preferred embodiment of the present invention.The process according to different requirements, The sequence of step can change in figure, and certain steps can be omitted.
As shown in fig.1, the message synchronization method specifically includes following steps.
Step S11, the instruction entered with the chat window of designated user is received.
In one embodiment, when subscriber sign-in conversation software and the finger for entering chat window between designated user is initiated Enable, user can enter chat window between designated user, at this time user can by the chat window and designated user into Guild's words, for example text, expression, picture, video, file are sent/receive, carry out online voice communication, video calling etc..This refers to Determining user can be personal user or user group, i.e., the chat window can be personal session window, be also possible to group session Window.
Step S12, obtaining need to be in the message identifier for the conversation message to be synchronized that the chat window is shown.
In one embodiment, can set previously according to the displayable conversation message quantity of present chatting window need to be The quantity for the conversation message to be synchronized that the chat window is shown, for example it is set as 5 conversation messages, and 5 sessions Message is 5 nearest conversation messages, and then can make user in login sessions software and enter chatting between designated user When skylight opening, user can be allowed to feel just as using same always in nearest 5 conversation messages of chat window simultaneous display The same illusion of equipment.The conversation message to be synchronized may include text, expression, picture, video, file, voice communication hair Play record, video calling initiates the information such as record.
In one embodiment, the message identifier may include contact information, request time stamp and message shot. For example, then the contact information is user A1's when subscriber sign-in conversation software and when entering with chat window between user A1 Information.When synchronizing message, it is thus necessary to determine that request time stamp and message shot, i.e. request are before request time stamp Conversation message, the request time stamp can be current time, message shot can be request time stamp before preset quantity Conversation message, such as request time stamp before 5 conversation messages.It, can be according to message identifier after obtaining message identifier The contact information that includes, request time stamp, message shot are requested to initiate message synchronization request according to the message synchronization To obtain corresponding conversation message queue and be shown in the chat window.
In one embodiment, it also needs before the message identifier for obtaining the conversation message to be synchronized to active user Identity is verified, specifically: the user right information for initiating to enter the instruction of the chat window is obtained, according to the user Authority information determines whether to synchronize the conversation message to be synchronized, if it is determined that disappearing to allow to synchronize the session to be synchronized Breath, then obtaining need to be in the message identifier for the conversation message to be synchronized that the chat window is shown, if it is determined that same not allow The conversation message to be synchronized is walked, then does not obtain the message identifier of the conversation message to be synchronized, and exports prompt information.
In one embodiment, synchronous institute can be determined whether by fingerprint recognition, recognition of face, password authentification etc. Conversation message to be synchronized is stated, and then the safety of the synchronization of conversation message can be improved, can avoid illegal request.If conversation message is It is saved in a manner of encryption, then also needs first to treat simultaneous session message when conversating message synchronization and be decrypted.
Step S13, judges whether local cache system preserves the conversation message to be synchronized.
In one embodiment, the local cache system is preferably that user currently logs in used in the session software eventually The caching system of end equipment.The terminal device can be computer installation above-mentioned.It need to be carried out in chat window when detecting When conversation message is synchronous, first determine whether the conversation message to be synchronized has storage in local cache system, if it is described to Simultaneous session message has storage in local cache system, then directly can pull conversation message from local cache system, if The conversation message to be synchronized, then can be from default background service when local cache system does not store or stores imperfect The device message that conversates pulls.
In one embodiment, can be accomplished by the following way judge local cache system whether preserve it is described to Simultaneous session message: first article of session information that the local cache system is cached is obtained to the of the last item conversation message One time interval;It need to be the second of the conversation message to be synchronized that the chat window is shown according to message identifier acquisition Time interval;Judge whether second time interval belongs to the subset in the first time section;If second time zone Between belong to the subset in the first time section, then determine that the local cache system preserves the conversation message to be synchronized; If second time interval is not belonging to the subset in the first time section, determine that the local cache system is not preserved The conversation message to be synchronized.
In one embodiment, when user, which enters chat window request, pulls conversation message to be synchronized, session software meeting A local cache table is created on the terminal device, which can recorde this conversation message time pulled Section, the local cache system meeting when the conversation message that this is pulled is pulled from default background server, on terminal device This conversation message pulled is stored, while the local cache system on terminal device can also store this conversation message.When again It is secondary that the session software is logged on the terminal device, and when the entrance chat window synchronization message, if the session that request pulls disappears Breath can not have to request default background server system synchronization message, directly from local slow when local cache system has storage Deposit system pulls conversation message and shows user.
In one embodiment, if second time interval belongs to the subset in the first time section, show this Ground caching system is stored with the conversation message to be synchronized, it is possible to determine that the local cache system preserves the meeting to be synchronized Talk about message;If second time interval is not belonging to the subset in the first time section, show that local cache system is not deposited The conversation message to be synchronized for containing the conversation message to be synchronized or storage is imperfect, it is possible to determine that the local cache system The conversation message to be synchronized is not preserved.
For example, first session information of local cache system cache to the last item conversation message first time Section is 2018-1-11,08:00:00-2018-1-12,14:00:30, and the second time interval of conversation message to be synchronized is 2018-1-12,12:00:00-2018-1-12,14:00:30, since the first time section covers second time Section, then it is assumed that second time interval belongs to the subset in the first time section, can be directly from local cache system Conversation message to be synchronized is pulled, without pulling conversation message to be synchronized from default background server system by network, can be reduced The concurrent pressure of the default background server, improve system stability, and due to this conversation message pulled be directly from What local cache was read, while flow/power resources of user can be also saved, message reading is faster, without waiting for request net The return of network data.
If the second time interval of conversation message to be synchronized is 2018-1-12,14:00:00-2018-1-12,14:20: 30, since second time interval is not covered in the first time section all, show the local cache system storage Conversation message to be synchronized is imperfect, needs to pull the conversation message to be synchronized from default background server system by network. If the second time interval of conversation message to be synchronized is 2018-1-12,14:02:59-2018-1-12,14:20:30, by institute It states first time section and is not covered by second time interval, show that the local cache system is not stored and need simultaneous session and disappear Breath, also needs to pull the conversation message to be synchronized from default background server system by network.
In one embodiment, when the local cache system carry out local cache table maintenance when, have new session every time When the time interval insertion of message, it can be inserted into according to combined principle, two time intervals for having intersection are (local slow Deposit the time interval of table dimension storage and the time interval of new session message) it is updated to a bigger message time section, it can be with The record number in message time section is reduced, improves and updates efficiency.
If step S14, the described local cache system preserves the conversation message to be synchronized, according to the message identifier The conversation message to be synchronized is pulled from the local cache system.
In one embodiment, if the conversation message to be synchronized has storage in local cache system, showing can be with The conversation message to be synchronized is directly pulled from local cache system, without pulling institute from default background server by network Conversation message to be synchronized is stated, the floating resources of user can be saved, and directly pulling conversation message from local cache will be faster.
If step S15, the described local cache system does not preserve the conversation message to be synchronized, according to the message mark Know from default background server and pulls the conversation message to be synchronized.
It in one embodiment, can root if the local cache system does not preserve the conversation message to be synchronized The conversation message to be synchronized is pulled from default background server according to the message identifier.
It in one embodiment, can when determining that the local cache system does not preserve the conversation message to be synchronized Further to judge whether the local cache system preserves part conversation message to be synchronized, if the local cache system is protected There is part conversation message to be synchronized, then pulls part conversation message to be synchronized from the local cache system, and from institute State the conversation message to be synchronized that default background server pulls rest part, then to from the local cache system and described default The conversation message that background server pulls carries out integration processing, to be shown in the chat window.If the local cache System does not preserve any Message Record of the conversation message to be synchronized, then according to the message identifier from the default backstage Conversation message to be synchronized described in server pull.
It in one embodiment, can be by multithreading parallel from the local cache system and the default backstage Server pull conversation message pulls the time to save conversation message.
Above-mentioned message synchronization method, it is to be synchronized when carrying out message synchronization first to determine whether local cache system is stored with Conversation message, realizes from traditional direct request background server to pull conversation message and be changed into have ready conditions and logically pulls, The concurrent pressure of background server is considerably reduced, system stability is improved, the reduction for pulling message frequency can also save use The resources such as flow, the electricity at family are directly to read from local cache when seeing for the conversation message user pulled , message pulls faster.
Embodiment two:
Fig. 2 is the functional block diagram of message synchronization device preferred embodiment of the present invention.
As shown in fig.2, the message synchronization device 10 may include receiving module 101, obtain module 102, judge mould Block 103, first pull module 104 and second pull module 105.
The receiving module 101 is used to receive the instruction into the chat window of designated user.
In one embodiment, when subscriber sign-in conversation software and the finger for entering chat window between designated user is initiated Enable, user can enter chat window between designated user, at this time user can by the chat window and designated user into Guild's words, for example text, expression, picture, video, file are sent/receive, carry out online voice communication, video calling etc..This refers to Determining user can be personal user or user group, i.e., the chat window can be personal session window, be also possible to group session Window.
The acquisition module 102 need to be in the message for the conversation message to be synchronized that the chat window is shown for obtaining Mark.
In one embodiment, can set previously according to the displayable conversation message quantity of present chatting window need to be The quantity for the conversation message to be synchronized that the chat window is shown, for example it is set as 5 conversation messages, and 5 sessions Message is 5 nearest conversation messages, and then can make user in login sessions software and enter chatting between designated user When skylight opening, user can be allowed to feel just as using same always in nearest 5 conversation messages of chat window simultaneous display The same illusion of equipment.The conversation message to be synchronized may include text, expression, picture, video, file, voice communication hair Play record, video calling initiates the information such as record.
In one embodiment, the message identifier may include contact information, request time stamp and message shot. For example, then the contact information is user A1's when subscriber sign-in conversation software and when entering with chat window between user A1 Information.When synchronizing message, it is thus necessary to determine that request time stamp and message shot, i.e. request are before request time stamp Conversation message, the request time stamp can be current time, message shot can be request time stamp before preset quantity Conversation message, such as request time stamp before 5 conversation messages.It, can be according to message identifier after obtaining message identifier The contact information that includes, request time stamp, message shot are requested to initiate message synchronization request according to the message synchronization To obtain corresponding conversation message queue and be shown in the chat window.
In one embodiment, the module 102 that obtains is before the message identifier for obtaining the conversation message to be synchronized It also needs to verify current user identities, specifically: the module 102 that obtains obtains initiation into the chat window The user right information of instruction determines whether to synchronize the conversation message to be synchronized according to the user right information, if It is judged to allowing to synchronize the conversation message to be synchronized, then obtains the session to be synchronized that need to be shown in the chat window and disappear The message identifier of breath, if it is determined that not obtaining the conversation message to be synchronized then not allow to synchronize the conversation message to be synchronized Message identifier, and export prompt information.
In one embodiment, the acquisition module 102 can be recognized by fingerprint recognition, recognition of face, password authentification etc. Card mode to determine whether allow to synchronize the conversation message to be synchronized, and then the safety of the synchronization of conversation message can be improved, It can avoid illegal request.If conversation message is saved in a manner of encryption, it is first right also to need when conversating message synchronization Conversation message to be synchronized is decrypted.
The judgment module 103 is for judging whether local cache system preserves the conversation message to be synchronized.
In one embodiment, the local cache system is preferably that user currently logs in used in the session software eventually The caching system of end equipment.The terminal device can be computer installation above-mentioned.It need to be carried out in chat window when detecting When conversation message is synchronous, first determine whether the conversation message to be synchronized has storage in local cache system, if it is described to Simultaneous session message has storage in local cache system, then directly can pull conversation message from local cache system, if The conversation message to be synchronized, then can be from default background service when local cache system does not store or stores imperfect The device message that conversates pulls.
In one embodiment, the judgment module 103, which can be accomplished by the following way, judges local cache system Whether preserve the conversation message to be synchronized: obtaining first session information that the local cache system is cached to last The first time section of one conversation message;According to the message identifier obtain need to the chat window shown to same Walk the second time interval of conversation message;Judge whether second time interval belongs to the subset in the first time section; If second time interval belongs to the subset in the first time section, it is described to determine that the local cache system is preserved Conversation message to be synchronized;If second time interval is not belonging to the subset in the first time section, the local is determined Caching system does not preserve the conversation message to be synchronized.
In one embodiment, when user, which enters chat window request, pulls conversation message to be synchronized, session software meeting A local cache table is created on the terminal device, which can recorde this conversation message time pulled Section, the local cache system meeting when the conversation message that this is pulled is pulled from default background server, on terminal device This conversation message pulled is stored, while the local cache system on terminal device can also store this conversation message.When again It is secondary that the session software is logged on the terminal device, and when the entrance chat window synchronization message, if the session that request pulls disappears Breath can not have to request default background server system synchronization message, directly from local slow when local cache system has storage Deposit system pulls conversation message and shows user.
In one embodiment, if second time interval belongs to the subset in the first time section, show this Ground caching system is stored with the conversation message to be synchronized, and the judgment module 103 can be determined that the local cache system is protected There is the conversation message to be synchronized;If second time interval is not belonging to the subset in the first time section, show The not stored conversation message to be synchronized for having the conversation message to be synchronized or storage of local cache system is imperfect, the judgement Module 103 can be determined that the local cache system does not preserve the conversation message to be synchronized.
For example, first session information of local cache system cache to the last item conversation message first time Section is 2018-1-11,08:00:00-2018-1-12,14:00:30, and the second time interval of conversation message to be synchronized is 2018-1-12,12:00:00-2018-1-12,14:00:30, since the first time section covers second time Section, then it is assumed that second time interval belongs to the subset in the first time section, can be directly from local cache system Conversation message to be synchronized is pulled, without pulling conversation message to be synchronized from default background server system by network, can be reduced The concurrent pressure of the default background server, improve system stability, and due to this conversation message pulled be directly from What local cache was read, while flow/power resources of user can be also saved, message reading is faster, without waiting for request net The return of network data.
If the second time interval of conversation message to be synchronized is 2018-1-12,14:00:00-2018-1-12,14:20: 30, since second time interval is not covered in the first time section all, show the local cache system storage Conversation message to be synchronized is imperfect, needs to pull the conversation message to be synchronized from default background server system by network. If the second time interval of conversation message to be synchronized is 2018-1-12,14:02:59-2018-1-12,14:20:30, by institute It states first time section and is not covered by second time interval, show that the local cache system is not stored and need simultaneous session and disappear Breath, also needs to pull the conversation message to be synchronized from default background server system by network.
In one embodiment, when the local cache system carry out local cache table maintenance when, have new session every time When the time interval insertion of message, it can be inserted into according to combined principle, two time intervals for having intersection are (local slow Deposit the time interval of table dimension storage and the time interval of new session message) it is updated to a bigger message time section, it can be with The record number in message time section is reduced, improves and updates efficiency.
Described first, which pulls module 104, is used for when the local cache system preserves the conversation message to be synchronized, The conversation message to be synchronized is pulled from the local cache system according to the message identifier.
In one embodiment, if the conversation message to be synchronized has storage in local cache system, showing can be with The conversation message to be synchronized is directly pulled from local cache system, without pulling institute from default background server by network State conversation message to be synchronized, described first pulls module 104 can be directly according to the message identifier from the local cache system System pulls the conversation message to be synchronized, it can be achieved that saving the floating resources of user, and directly pull session from local cache and disappear Breath will be faster.
Described second pulls module 105 for not preserving the conversation message to be synchronized in the local cache system When, the conversation message to be synchronized is pulled from default background server according to the message identifier.
In one embodiment, if the local cache system does not preserve the conversation message to be synchronized, described Two, which pull module 105, can pull the conversation message to be synchronized from default background server according to the message identifier.
It in one embodiment, can when determining that the local cache system does not preserve the conversation message to be synchronized Further to judge whether the local cache system preserves part conversation message to be synchronized, if the local cache system is protected Have part conversation message to be synchronized, then described second pull module 105 from the local cache system pull the part to Simultaneous session message, and the conversation message to be synchronized of rest part is pulled from the default background server, then to from described The conversation message that ground caching system and the default background server pull carries out integration processing, to carry out in the chat window Display.If the local cache system does not preserve any Message Record of the conversation message to be synchronized, described second is drawn Modulus block 105 pulls the conversation message to be synchronized from the default background server according to the message identifier.
In one embodiment, described second pull module 105 can be slow from the local parallel by multithreading Deposit system and the default background server pull conversation message, pull the time to save conversation message.
Above-mentioned message synchronization device, it is to be synchronized when carrying out message synchronization first to determine whether local cache system is stored with Conversation message, realizes from traditional direct request background server to pull conversation message and be changed into have ready conditions and logically pulls, The concurrent pressure of background server is considerably reduced, system stability is improved, the reduction for pulling message frequency can also save use The resources such as flow, the electricity at family are directly to read from local cache when seeing for the conversation message user pulled , message pulls faster.
Fig. 3 is the schematic diagram of computer installation preferred embodiment of the present invention.
The computer installation 1 includes memory 20, processor 30 and is stored in the memory 20 and can be in institute State the computer program 40 run on processor 30, such as message synchronization program.The processor 30 executes the computer journey The step in above-mentioned message synchronization embodiment of the method, such as step S11~S15 shown in FIG. 1 are realized when sequence 40.Alternatively, described Processor 30 realizes the function of each module in above-mentioned message synchronization Installation practice when executing the computer program 40, such as schemes Module 101~105 in 2.
Illustratively, the computer program 40 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 20, and are executed by the processor 30, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, and described instruction section is used In implementation procedure of the description computer program 40 in the computer installation 1.For example, the computer program 40 can be with It is divided into the receiving module 101 in Fig. 2, obtains module 102, determination module 103, first pulls module 104 and second pull Module 105.Each module concrete function is referring to embodiment two.
The computer installation 1 can be desktop PC, notebook, palm PC, mobile phone, tablet computer and cloud Server etc. calculates equipment.It will be understood by those skilled in the art that the schematic diagram is only the example of computer installation 1, and The restriction to computer installation 1 is not constituted, may include components more more or fewer than diagram, or combine certain components, or The different component of person, such as the computer installation 1 can also include input-output equipment, network access equipment, bus etc..
Alleged processor 30 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor 30 is also possible to any conventional processing Device etc., the processor 30 are the control centres of the computer installation 1, utilize various interfaces and the entire computer of connection The various pieces of device 1.
The memory 20 can be used for storing the computer program 40 and/or module/unit, and the processor 30 passes through Operation executes the computer program and/or module/unit being stored in the memory 20, and calls and be stored in memory Data in 20 realize the various functions of the computer installation 1.The memory 20 can mainly include storing program area and deposit Store up data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound is broadcast Playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (ratio according to computer installation 1 Such as audio data, phone directory) etc..In addition, memory 20 may include high-speed random access memory, it can also include non-easy The property lost memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other Volatile solid-state part.
If the integrated module/unit of the computer installation 1 is realized in the form of SFU software functional unit and as independence Product when selling or using, can store in a computer readable storage medium.Based on this understanding, of the invention It realizes all or part of the process in above-described embodiment method, can also instruct relevant hardware come complete by computer program At the computer program can be stored in a computer readable storage medium, and the computer program is held by processor When row, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, institute Stating computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..It is described Computer-readable medium may include: any entity or device, recording medium, U that can carry the computer program code Disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs It is bright, the content that the computer-readable medium includes can according in jurisdiction make laws and patent practice requirement into Row increase and decrease appropriate, such as do not include electric load according to legislation and patent practice, computer-readable medium in certain jurisdictions Wave signal and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed computer installation and method, it can be with It realizes by another way.For example, computer installation embodiment described above is only schematical, for example, described The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in same treatment unit It is that each unit physically exists alone, can also be integrated in same unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.It is stated in computer installation claim Multiple units or computer installation can also be implemented through software or hardware by the same unit or computer installation.The One, the second equal words are used to indicate names, and are not indicated any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. a kind of message synchronization method, which is characterized in that the described method includes:
Receive the instruction entered with the chat window of designated user;
Acquisition need to be in the message identifier for the conversation message to be synchronized that the chat window is shown;
Judge whether local cache system preserves the conversation message to be synchronized;
It is slow from the local according to the message identifier if the local cache system preserves the conversation message to be synchronized Deposit system pulls the conversation message to be synchronized;And
If the local cache system does not preserve the conversation message to be synchronized, according to the message identifier from default backstage Conversation message to be synchronized described in server pull.
2. message synchronization method as described in claim 1, which is characterized in that the message identifier includes session contact people letter Breath, request time stamp and message shot.
3. message synchronization method as claimed in claim 1 or 2, which is characterized in that the acquisition need to the chat window into Before the step of message identifier of the conversation message to be synchronized of row display further include:
Obtain the user right information for initiating to enter the instruction of the chat window;And
It is determined whether to synchronize the conversation message to be synchronized according to the user right information.
4. message synchronization method as claimed in claim 1 or 2, which is characterized in that described to judge that the local cache system is No the step of preserving the conversation message to be synchronized includes:
First session information that the local cache system is cached is obtained to the first time area of the last item conversation message Between;
It need to be in the second time zone of the conversation message to be synchronized that the chat window is shown according to message identifier acquisition Between;
Judge whether second time interval belongs to the subset in the first time section;
If second time interval belongs to the subset in the first time section, determine that the local cache system is preserved The conversation message to be synchronized.
5. message synchronization method as claimed in claim 4, which is characterized in that described to judge whether second time interval belongs to After in the subset in the first time section the step of further include:
If second time interval is not belonging to the subset in the first time section, determine that the local cache system is not protected There is the conversation message to be synchronized.
6. message synchronization method as claimed in claim 1 or 2, which is characterized in that it is described according to the message identifier from default Background server pulls the step of conversation message to be synchronized and includes:
Judge whether the local cache system preserves part conversation message to be synchronized;
If the local cache system preserves part conversation message to be synchronized, the portion is pulled from the local cache system Divide conversation message to be synchronized, and pulls the conversation message to be synchronized of rest part from the default background server;And
Integration processing is carried out to the conversation message pulled from the local cache system and the default background server, in institute Chat window is stated to be shown.
7. message synchronization method as claimed in claim 6, which is characterized in that described to judge whether the local cache system protects After having the step of part conversation message to be synchronized further include:
If the local cache system does not preserve any Message Record of the conversation message to be synchronized, according to the message Mark pulls the conversation message to be synchronized from the default background server.
8. a kind of message synchronization device, which is characterized in that described device includes:
Receiving module, for receiving into the instruction with the chat window of designated user;
Module is obtained, it need to be in the message identifier for the conversation message to be synchronized that the chat window is shown for obtaining;
Judgment module, for judging whether local cache system preserves the conversation message to be synchronized;
First pulls module, for being disappeared according to described when the local cache system preserves the conversation message to be synchronized Breath mark pulls the conversation message to be synchronized from the local cache system;And
Second pulls module, for when the local cache system does not preserve the conversation message to be synchronized, according to described Message identifier pulls the conversation message to be synchronized from default background server.
9. a kind of computer installation, the computer installation includes processor and memory, is stored on the memory several Computer program, which is characterized in that such as right is realized when the processor is for executing the computer program stored in memory It is required that described in any one of 1-7 the step of message synchronization method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of message synchronization method as described in any one of claim 1-7 is realized when being executed by processor.
CN201910488459.3A 2019-06-05 2019-06-05 Message synchronization method, apparatus, computer installation and computer readable storage medium Pending CN110365739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910488459.3A CN110365739A (en) 2019-06-05 2019-06-05 Message synchronization method, apparatus, computer installation and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910488459.3A CN110365739A (en) 2019-06-05 2019-06-05 Message synchronization method, apparatus, computer installation and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110365739A true CN110365739A (en) 2019-10-22

Family

ID=68215658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910488459.3A Pending CN110365739A (en) 2019-06-05 2019-06-05 Message synchronization method, apparatus, computer installation and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110365739A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932966A (en) * 2019-12-09 2020-03-27 网易(杭州)网络有限公司 Message processing method and device, computer storage medium and electronic equipment
CN112492048A (en) * 2020-12-14 2021-03-12 招商局金融科技有限公司 Message synchronization method and device, electronic equipment and readable storage medium
CN112769677A (en) * 2020-12-30 2021-05-07 北京达佳互联信息技术有限公司 Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN112838980A (en) * 2020-12-30 2021-05-25 北京奇艺世纪科技有限公司 Message processing method, system, device, electronic equipment and storage medium
CN113612676A (en) * 2021-02-01 2021-11-05 广州虎牙科技有限公司 Social group message synchronization method, device, equipment and storage medium
CN113973097A (en) * 2020-07-24 2022-01-25 腾讯科技(深圳)有限公司 Message display method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811366A (en) * 2014-01-26 2015-07-29 阿里巴巴集团控股有限公司 Network communication message roaming method and device
CN104836719A (en) * 2014-02-11 2015-08-12 阿里巴巴集团控股有限公司 Method and system for synchronizing instant communication unread messages
CN105471716A (en) * 2015-12-17 2016-04-06 网易(杭州)网络有限公司 Method for achieving message synchronization across clients, user equipment and server
CN108090079A (en) * 2016-11-22 2018-05-29 阿里巴巴集团控股有限公司 A kind of chat record processing method and processing device of instant messenger

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811366A (en) * 2014-01-26 2015-07-29 阿里巴巴集团控股有限公司 Network communication message roaming method and device
CN104836719A (en) * 2014-02-11 2015-08-12 阿里巴巴集团控股有限公司 Method and system for synchronizing instant communication unread messages
CN105471716A (en) * 2015-12-17 2016-04-06 网易(杭州)网络有限公司 Method for achieving message synchronization across clients, user equipment and server
CN108090079A (en) * 2016-11-22 2018-05-29 阿里巴巴集团控股有限公司 A kind of chat record processing method and processing device of instant messenger

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932966A (en) * 2019-12-09 2020-03-27 网易(杭州)网络有限公司 Message processing method and device, computer storage medium and electronic equipment
CN113973097A (en) * 2020-07-24 2022-01-25 腾讯科技(深圳)有限公司 Message display method, device and storage medium
CN112492048A (en) * 2020-12-14 2021-03-12 招商局金融科技有限公司 Message synchronization method and device, electronic equipment and readable storage medium
CN112492048B (en) * 2020-12-14 2022-05-20 招商局金融科技有限公司 Message synchronization method and device, electronic equipment and readable storage medium
CN112769677A (en) * 2020-12-30 2021-05-07 北京达佳互联信息技术有限公司 Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN112838980A (en) * 2020-12-30 2021-05-25 北京奇艺世纪科技有限公司 Message processing method, system, device, electronic equipment and storage medium
CN113612676A (en) * 2021-02-01 2021-11-05 广州虎牙科技有限公司 Social group message synchronization method, device, equipment and storage medium
CN113612676B (en) * 2021-02-01 2024-01-19 广州虎牙科技有限公司 Social group message synchronization method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110365739A (en) Message synchronization method, apparatus, computer installation and computer readable storage medium
US10356078B2 (en) Web ticket based upon a symmetric key usable for user authentication
EP2849411B1 (en) Session establishment methods and corresponding server
US20140344286A1 (en) Method and apparatus for displaying webcast roomss
CN102195935B (en) game hosting system and method
CN103475731A (en) Media information matching and processing method and device
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
US20100017483A1 (en) Multi-topic instant messaging chat session
EP4203478A1 (en) Multi-user live streaming method and apparatus, terminal, server, and storage medium
CN109146437B (en) Virtual resource processing method, client and storage medium
CN102138156A (en) Persisting a group in an instant messaging application
JP2007534076A (en) System and method for chat load management in a network chat environment
CN111314714B (en) Game live broadcast method and device
CN111432228B (en) Method, device and equipment for matching anchor and storage medium
CN112702640B (en) Live broadcast wheat connecting method and device, storage medium and electronic equipment
CN112672179A (en) Method, device and equipment for live game
CN106358065A (en) Multimedia information processing method and system
CN110377376A (en) Interface message method for refreshing, device, computer installation and readable storage medium storing program for executing
CN109831682A (en) Signal auditing method, device, electronic equipment and storage medium
US10063555B2 (en) Method, apparatus, and system for achieving privilege separation
CN106506443A (en) A kind of information inspection method and device
CN112929257B (en) Multi-scene message sending method, device, server and storage medium
CN110445667A (en) A kind of link delay detection method, device, storage medium and terminal
CN108335208B (en) Method and apparatus for processing information
CN107844562B (en) Intelligent consultation service method

Legal Events

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