CN114885005A - Method, apparatus, device and medium for reducing synchronous message data - Google Patents

Method, apparatus, device and medium for reducing synchronous message data Download PDF

Info

Publication number
CN114885005A
CN114885005A CN202210370068.3A CN202210370068A CN114885005A CN 114885005 A CN114885005 A CN 114885005A CN 202210370068 A CN202210370068 A CN 202210370068A CN 114885005 A CN114885005 A CN 114885005A
Authority
CN
China
Prior art keywords
user
list
message
server
synchronization
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
CN202210370068.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.)
Beijing Cheerbright Technologies Co Ltd
Original Assignee
Beijing Cheerbright Technologies 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 Cheerbright Technologies Co Ltd filed Critical Beijing Cheerbright Technologies Co Ltd
Priority to CN202210370068.3A priority Critical patent/CN114885005A/en
Publication of CN114885005A publication Critical patent/CN114885005A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for reducing synchronous message data, which comprises the following steps: acquiring time information of the last time that a user logs in a server; setting a threshold value of user login activity according to the time information of the last time that the user logs in the server, and acquiring a list of user login activity; and according to the user login activity list, carrying out message synchronization on the active user, and compensating the synchronous message when the inactive user is online. The method and the device can relieve the instant writing pressure of the synchronous message, reduce data storage resources, and ensure the integrity of data acquisition for the inactive users.

Description

Method, apparatus, device and medium for reducing synchronous message data
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for reducing synchronous message data, an electronic device, and a storage medium.
Background
The message synchronization is a core function of the communication system, the message is sent to the server, the server needs to synchronize the message to the message lists of all target users, and the users can obtain all session unread messages through the message lists. In the prior art, there are two main ways to realize message synchronization, one is read diffusion, at this time, only one part of the message exists in a session message list, and the user actively goes to the session message list to pull the message, which has the disadvantage that the user must first obtain and determine the own session relationship, and then traverse the sessions to respectively obtain the unread messages of the target sessions, because it cannot be determined whether the unread messages exist in the sessions or not, it is necessary to traverse all the sessions to obtain, this way will cause a lot of empty reading, and if the session volume is large, the efficiency is very poor; the other is write diffusion, the message is synchronized to the message list of each target user at this time, the user can obtain all unread messages only from the message list of the user, the conversation relationship does not need to be determined first, and the message does not need to be obtained in a traversing manner, so that unnecessary empty reading is caused, and the write diffusion has the defect that the pressure of instant message writing is increased due to the synchronization of all messages, and meanwhile, storage resources are increased.
Therefore, there is a need for a method for reducing the data storage resources of synchronous messages by using different message synchronization methods for different users.
Disclosure of Invention
To this end, the present invention provides a method, apparatus, electronic device and storage medium for reducing synchronization message data in an effort to solve or at least mitigate at least one of the problems identified above.
According to one aspect of the present invention, a method for reducing synchronous message data is provided, the method classifies users into active users and inactive users according to the last time when the users log in a server, performs message synchronization on the active users, compensates synchronous messages when the inactive users are online, and reduces data storage resources of the synchronous messages, the method comprises the steps of: acquiring time information of the last time that a user logs in a server; setting a user login activity threshold value according to the time information of the last time that the user logs in the server, and acquiring a user login activity list, wherein the user login activity list comprises an active user list and an inactive user list; and according to the user login activity list, carrying out message synchronization on the active user, and compensating the synchronous message when the inactive user is online.
Optionally, the step of obtaining the time information of the last time the user logs in the server includes: acquiring user list information connected with a server side; according to the user list information connected with the server side, adding a user last login time information list in the user list information; and adding a user last login time information list in the user list information to acquire the time information of the user after the user logs in the server for the last time.
Optionally, the step of setting a threshold of user login activity according to the time information of the last time the user logs in the server, and acquiring the list of user login activity includes: setting a user login activity threshold according to the time parameter of the user login server; acquiring the login activity of the user according to the login activity threshold of the user and the time information of the last time that the user logs in the server; and acquiring a user login activity list according to the login activity of the user.
Optionally, the step of obtaining the login activity of the user according to the threshold of the login activity of the user and the time information of the last login of the user to the server includes: comparing whether the last time that the user logs in the server is greater than a set threshold value of the login activity of the user; if yes, setting the user as an inactive user; if not, the user is set as an active user.
Optionally, the step of synchronizing the messages of the active users according to the user login activity list includes: acquiring user list information connected with a server side; adding a message synchronization list in the user list information according to the user list information connected with the server side; acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list; and acquiring message synchronization information of the active user according to the association between the message synchronization list and the user login activity list and the active user list.
Optionally, the step of compensating the synchronization message when the inactive user is online according to the user login activity list includes: acquiring user list information connected with a server side; adding a message synchronization list in the user list information according to the user list information connected with the server side; acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list; and acquiring the message information for compensating the non-active user according to the association between the message synchronization list and the user login activity list and the non-active user login server information in the non-active user list.
Optionally, the step of obtaining the information of the synchronization message for compensating the inactive user according to the association between the message synchronization list and the user login activity list and the information of the inactive user login server in the inactive user list includes: according to the message synchronization list, obtaining the message serial number of the synchronization message which is obtained by the inactive user at last; acquiring a session relation between the inactive user and the server according to a message serial number of a synchronous message acquired by the inactive user last; according to the conversation relationship between the inactive user and the server and the information of the inactive user logging in the server, the inactive user traverses unsynchronized messages corresponding to the server conversation relationship; acquiring the unsynchronized message synchronized to the message synchronization list information according to the unsynchronized message corresponding to the server dialogue relation traversed by the inactive user; and according to the message synchronization list information synchronized by the unsynchronized message, acquiring bit synchronization message information acquired by the non-active user through the message synchronization list.
According to another aspect of the present invention, a device for reducing synchronous message data is disclosed, the device classifies users into active users and inactive users according to the last time when the users log in a server, performs message synchronization on the active users, compensates synchronous messages when the inactive users are online, and reduces data storage resources of the synchronous messages, the device comprising: the acquisition module is used for acquiring the time information of the last time that the user logs in the server; the user login activity degree distinguishing module is used for setting a user login activity degree threshold value according to the time information of the last time that the user logs in the server, and acquiring a user login activity degree list, wherein the user login activity degree list comprises an active user list and an inactive user list; and the message synchronization module is used for carrying out message synchronization on the active users according to the user login activity list and compensating the synchronous messages when the inactive users are online.
According to yet another aspect of the present invention, there is provided a computing device comprising: one or more processors; and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods of reducing synchronization message data as described above.
According to a further aspect of the invention there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of the methods of reducing synchronization message data as described above.
According to the scheme for reducing the synchronous message data, the time information of the last time that the user logs in the server is obtained; setting a threshold value of user login activity according to the time information of the last time that the user logs in the server, and acquiring a list of user login activity; and according to the user login activity list, carrying out message synchronization on the active user, and compensating the synchronous message when the inactive user is online. The method and the device can relieve the instant writing pressure of the synchronous message, reduce data storage resources, and ensure the integrity of data acquisition for the inactive users.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of an application scenario according to an embodiment of the invention; and
FIG. 2 shows a schematic block diagram of a computing device 100, according to an embodiment of the invention; and
FIG. 3 illustrates a flow diagram of a method 200 of reducing synchronization message data according to one embodiment of the invention; and
fig. 4 is a schematic structural diagram of an apparatus 300 for reducing synchronous message data according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic application scenario diagram of an embodiment of the present invention, and the method for reducing synchronous message data provided in the present application may be applied to the application environment shown in fig. 1. The method for reducing the synchronous message data is applied to a device for reducing the synchronous message data. The device for reducing synchronous message data is configured in the server 010, or partially configured in the terminal 020 and partially configured in the server 010, and the method for reducing synchronous message data is completed by the interaction between the terminal 020 and the server 010.
Wherein the terminal 020 and the server 010 can communicate through a network.
The terminal 020 can be but is not limited to various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, the server 010 classifies users into active users and inactive users according to the last time when the terminal 020 logs in the server, performs message synchronization on the active users, compensates synchronous messages when the inactive users are online, reduces data storage resources of the synchronous messages, and the server 010 can be realized by an independent server or a server cluster formed by a plurality of servers.
This method of reducing the synchronization message data is performed in the server 010, and is an improvement of the write flooding manner. The server 010 has a session message list and a plurality of message synchronization lists, each message synchronization list corresponds to a user, a user sends a message in a session to the server 010, the server 010 writes the message into the session message list and synchronizes the message into the message synchronization list of the corresponding user, for an active user, the server 010 immediately synchronizes the message into the message synchronization list, and for an inactive user, the server 010 delays synchronizing the message into the message synchronization list. The user who has logged in the server 010 within the predetermined time period is an active user, and the user who has not logged in the server 010 within the predetermined time period is an inactive user. In this embodiment, the user is the terminal 020.
Fig. 2 is a block diagram of an example computing device 100. In a basic configuration 102, computing device 100 typically includes system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, application 122 may be arranged to operate with program data 124 on an operating system. In some embodiments, computing device 100 is configured to perform a method 200 for reducing synchronization message data, the method 200 being capable of classifying users as active users and inactive users based on the last time the user logged into the server, synchronizing messages to active users, compensating for synchronization messages when inactive users are online, reducing data storage resources for synchronization messages, and instructions for performing the method 200 being included in program data 124.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media. In some embodiments, one or more programs are stored in a computer readable medium, the one or more programs including instructions for performing certain methods, such as the method 200 for reducing synchronization message data performed by the computing device 100 according to embodiments of the present invention.
Computing device 100 may be implemented as part of a small-form factor portable (or mobile) electronic device such as a cellular telephone, a Personal Digital Assistant (PDA), a personal media player device, a wireless web-watch device, a personal headset device, an application specific device, or a hybrid device that include any of the above functions. Computing device 100 may also be implemented as a personal computer including both desktop and notebook computer configurations.
Fig. 3 shows a flow diagram of a method 200 of reducing synchronization message data according to one embodiment of the invention. As shown in fig. 2, the method 200 classifies users into an active user and an inactive user according to the time when the user last logs in the server, performs message synchronization on the active user, compensates for a synchronization message when the inactive user is online, and reduces data storage resources of the synchronization message, and the method 200 starts with step S210, and obtains time information when the user last logs in the server.
Specifically, different users have different requirements for data acquisition, and therefore, the frequency of accessing the server by the users is different, for example, some users need to acquire data of the server in real time, and then need to acquire synchronization messages in real time, some users may need to acquire some data from the server for a long time, and then need not to acquire synchronization messages immediately, the time of the user logging in the server for the last time reflects the requirements of the user on the messages of the server, if the time of the last time the user logs in the server is short from the current time and the user logs in the server again at the moment, the real-time requirement of the user on the server data is higher, if the time of the user logging in the server for the last time is very long from the current time, and the user logs in the server again at the moment, the requirement of the user on the real-time performance of the server data is not high.
Specifically, in an embodiment of the present application, the step of obtaining time information of the last time the user logs in the server includes:
acquiring user list information connected with a server side; specifically, the user list information includes a user login server and user list information of a corresponding data service of the server, the user list information generally includes a user serial number, user network parameter information and the like, and unique network connection information between the user and the server can be established through the user list information;
according to the user list information connected with the server side, adding a user last login time information list in the user list information; specifically, the purpose of adding the user last login time information list in the user list information is to record the time when the user last logs in the server, so as to compare the time when the user last logs in the server with the time length of the current time, and then to distinguish whether the user has a need for the server to provide the data service in real time or not according to the time length.
And adding a user last login time information list in the user list information to acquire the time information of the user after the user logs in the server for the last time. Specifically, after the list of the last login time information of the user is added to the user list information, the last login time of the user to the server is recorded after the user logs in the server each time.
Through step S220, setting a threshold of user login activity according to the time information of the last time the user logs in the server, and acquiring a user login activity list, where the user login activity list includes an active user list and an inactive user list.
Specifically, the threshold value of the user login activity is set to distinguish whether the user needs real-time synchronization messages, the user logs in the server frequently and can be considered as that the user needs real-time synchronization messages, message synchronization needs to be performed on the user at this time, if the time interval of the user logging in the server is long, the user can be considered as that the user does not need real-time synchronization messages, the synchronization messages can be temporarily stored, and the user is compensated for the synchronization messages after the user logs in the server.
Specifically, in an embodiment of the present application, the step of setting a threshold of user login activity according to the time information of the last time the user logs in the server, and acquiring the list of user login activity includes:
setting a user login activity threshold according to the time parameter of the user login server; specifically, the time parameter of the user logging in the server includes the time of the user logging in the server for the last time, and the time length between the time of the user logging in the server for the last time and the time of the user logging in the server currently, the setting of the threshold value of the user logging activity is to set a time length, and whether the frequency of the user logging in the server needs real-time synchronization information is judged by setting the threshold value of the user logging activity.
Acquiring the login activity of the user according to the login activity threshold of the user and the time information of the last time that the user logs in the server; specifically, the login activity of the user reflects the frequency of logging in the server by the user and also reflects the timeliness requirement of the user for providing the synchronous message for the server, whether the frequency of logging in the server by the user meets the threshold of the login activity of the user can be judged through the set threshold of the login activity of the user and the time information of logging in the server by the user for the last time, and the login activity of the user is obtained through the comparison between the frequency of logging in the server by the user and the threshold of the login activity of the user.
And acquiring a user login activity list according to the login activity of the user. Specifically, for all users logging in to the server, after the login activity of the user is obtained, the login activity of all users can be expressed in a list form.
Specifically, in an embodiment of the present application, the step of obtaining the login activity of the user according to the threshold of the login activity of the user and the time information of the last login of the user to the server includes:
comparing whether the last time that the user logs in the server is greater than a set threshold value of the login activity of the user;
if yes, setting the user as an inactive user;
if not, setting the user as an active user
Specifically, the login activity of the user is divided into an active user and an inactive user, the active user may be considered to need the server to provide real-time synchronization messages, the inactive user may be considered to be a user who logs in the server infrequently and does not need the server to provide real-time synchronization messages, but when the user logs in the server, the server is required to push all messages after the user last obtains the messages to the user at one time. Specifically, for example, the user login activity threshold is set to 24 hours, if the time of the last time the user logs in the server is longer than the current time by 24 hours, the user is considered as an inactive user, and at this time, the server is not required to perform message synchronization on the user, and if the time of the last time the user logs in the server is shorter than the current time by 24 hours, the user is considered as an active user, and at this time, the server is required to perform message synchronization on the user.
Through step S230, according to the user login activity list, performing message synchronization on the active user, and performing compensation synchronization message when the inactive user is online.
Specifically, different users have different requirements for providing messages by the server, and therefore, for different users, the server needs to transmit data in different manners, for example, for an active user, since message synchronization needs to be performed, the server needs to transmit a synchronization message to the user in real time, for an inactive user, since the server logs in infrequently, that is, there is no real-time requirement for the server to transmit a message, the server can temporarily store the message, and when the inactive user logs in the server, the server compensates the synchronization message for the user.
Specifically, in an embodiment of the present application, the step of synchronizing the messages of the active users according to the user login activity list includes:
acquiring user list information connected with a server side;
adding a message synchronization list in the user list information according to the user list information connected with the server side; specifically, the addition of the message synchronization list in the user list information is to satisfy the requirement that a user can obtain synchronization message data in time after logging in, the message synchronization list corresponds to the synchronization message information and includes one or more synchronization messages that need to be sent to the corresponding user in the user list information, and after the user logs in the server, the unsent synchronization messages are sent to the corresponding user through the message synchronization list.
Acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list; specifically, the purpose of associating the message synchronization list with the user login activity list is to send a message to the message synchronization list in real time for an active user, so that the active user can acquire the synchronization message in time, and for an inactive user in the user login activity list, temporarily store the message without sending the message to the message synchronization list, and send the synchronization message to the inactive user after the inactive user logs in.
And acquiring message synchronization information of the active user according to the association between the message synchronization list and the user login activity list and the active user list. Specifically, the active user list is associated with the message synchronization list, so that when the server sends corresponding synchronization data, the active user can acquire a corresponding synchronization message in time.
Specifically, in an embodiment of the present application, the step of compensating the synchronization message when the inactive user is online according to the user login activity list includes:
acquiring user list information connected with a server side;
according to the user list information connected with the server side, adding a message synchronization list in the user list information;
acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list;
and acquiring the message information for compensating the non-active user according to the association between the message synchronization list and the user login activity list and the non-active user login server information in the non-active user list.
Specifically, for the inactive user, since the time for the inactive user to log in the server for the last time is relatively long, that is, the time interval for logging in the server for two times is relatively long, it is not necessary to put the synchronization message in the message synchronization list in real time, but after the inactive user logs in the server, the server sends the synchronization message again in a compensation manner.
Specifically, in an embodiment of the present application, the step of obtaining, according to the association between the message synchronization list and the user login activity list and the inactive user login server information in the inactive user list, synchronization message information for compensating the inactive user includes:
according to the message synchronization list, obtaining the message serial number of the synchronization message which is obtained by the inactive user at last; in the message synchronization list, the sequence numbers of all messages corresponding to the user are stored, the sequence number of each message corresponds to the message entity, the message can be obtained by obtaining the sequence number of the message, and the storage space can be greatly reduced compared with the storage of the message body by storing the sequence number of the message.
Acquiring a session relation between the inactive user and the server according to a message serial number of a synchronous message acquired by the inactive user last; the conversation relation between the inactive users and the server refers to a path of the message provided by the server or a corresponding database, the source of the message acquired by the inactive users can be acquired by acquiring the conversation relation between the inactive users and the server, and if the message is required to be sent from the source of the message, the message sequence number of the message can be stored in a synchronous message list of the corresponding inactive users.
According to the conversation relationship between the inactive user and the server and the information of the inactive user logging in the server, the inactive user traverses unsynchronized messages corresponding to the server conversation relationship; specifically, since the synchronization message list of the inactive user stores the sequence number of the message sent by the server in a certain time period, the sequence number of the message that is not received by the inactive user can be found by traversing the synchronization message list, and since the synchronization message list is arranged according to the first-in first-out sequence, after the sequence number of the message that is obtained by the inactive user last time is found, all the messages that are not received can be found.
Acquiring the unsynchronized message synchronized to the message synchronization list information according to the unsynchronized message corresponding to the server dialogue relation traversed by the inactive user;
and according to the message synchronization list information synchronized by the unsynchronized message, acquiring bit synchronization message information acquired by the non-active user through the message synchronization list.
According to the scheme for reducing the synchronous message data, the time information of the last time that the user logs in the server is obtained; setting a threshold value of user login activity according to the time information of the last time that the user logs in the server, and acquiring a list of user login activity; and according to the user login activity list, carrying out message synchronization on the active user, and compensating the synchronous message when the inactive user is online. The method and the device can relieve the instant writing pressure of the synchronous message, reduce data storage resources, and ensure the integrity of data acquisition for the inactive users.
It should be understood that, although the steps in the flowchart of fig. 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, an apparatus 300 for reducing data of synchronization messages is provided, the apparatus 300 classifies users into active users and inactive users according to the last time when the users log in a server, performs message synchronization on the active users, compensates the synchronization messages when the inactive users go online, and reduces data storage resources of the synchronization messages, the apparatus 300 comprising: the system comprises an acquisition module, a user activity distinguishing module and a message synchronization module.
The acquisition module is used for acquiring the time information of the last time that the user logs in the server;
the user login activity degree distinguishing module is used for setting a user login activity degree threshold value according to the time information of the last time that the user logs in the server, and acquiring a user login activity degree list, wherein the user login activity degree list comprises an active user list and an inactive user list;
and the message synchronization module is used for carrying out message synchronization on the active users according to the user login activity list and compensating and synchronizing messages when the inactive users are online.
Specifically, in another embodiment of the present application, the obtaining module is configured to obtain user list information connected to a server; according to the user list information connected with the server side, adding a user last login time information list in the user list information; and adding a user last login time information list in the user list information to acquire the time information of the user after the user logs in the server for the last time.
Specifically, in another embodiment of the present application, the user activity distinguishing module is configured to set a threshold of user login activity according to a time parameter of the user logging in the server; acquiring the login activity of the user according to the login activity threshold of the user and the time information of the last time that the user logs in the server; and acquiring a user login activity list according to the login activity of the user.
Specifically, in another embodiment of the present application, the user activity distinguishing module is configured to compare whether the time that the user last logs in the server is greater than a set user login activity threshold; if yes, setting the user as an inactive user; if not, the user is set as an active user.
Specifically, in another embodiment of the present application, the message synchronization module is configured to obtain user list information connected to a server; according to the user list information connected with the server side, adding a message synchronization list in the user list information; acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list; and acquiring message synchronization information of the active user according to the association between the message synchronization list and the user login activity list and the active user list.
Specifically, in another embodiment of the present application, the message synchronization module is configured to obtain user list information connected to a server; adding a message synchronization list in the user list information according to the user list information connected with the server side; acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list; and acquiring the message information for compensating the non-active user according to the association between the message synchronization list and the user login activity list and the non-active user login server information in the non-active user list.
Specifically, in another embodiment of the present application, the message synchronization module is configured to obtain, according to the message synchronization list, a message sequence number of a synchronization message that is obtained last by the inactive user; acquiring a session relation between the inactive user and the server according to a message serial number of a synchronous message acquired by the inactive user last; according to the conversation relationship between the inactive user and the server and the information of the inactive user logging in the server, the inactive user traverses unsynchronized messages corresponding to the server conversation relationship; acquiring the unsynchronized message synchronized to the message synchronization list information according to the unsynchronized message corresponding to the server dialogue relation traversed by the inactive user; and according to the message synchronization list information synchronized by the unsynchronized message, acquiring bit synchronization message information acquired by the non-active user through the message synchronization list.
According to the scheme for reducing the synchronous message data, the time information of the last time that the user logs in the server is obtained through the obtaining module; the user login activity degree distinguishing module sets a user login activity degree threshold value according to the time information of the last time that the user logs in the server, and obtains a user login activity degree list, wherein the user login activity degree list comprises an active user list and an inactive user list; and the message synchronization module performs message synchronization on the active users according to the user login activity list and performs compensation synchronization on messages when the inactive users are online. The method and the device can relieve the instant writing pressure of the synchronous message, reduce data storage resources, and ensure the integrity of data acquisition for the inactive users.
It should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A method for reducing synchronous message data, the method classifies users as active users and inactive users according to the last time when the users log in a server, carries out message synchronization on the active users, compensates synchronous messages when the inactive users are online, and reduces data storage resources of the synchronous messages, the method comprises the following steps:
acquiring time information of the last time that a user logs in a server;
setting a user login activity threshold value according to the time information of the last time that the user logs in the server, and acquiring a user login activity list, wherein the user login activity list comprises an active user list and an inactive user list;
and according to the user login activity list, carrying out message synchronization on the active user, and compensating the synchronous message when the inactive user is online.
2. The method as claimed in claim 1, wherein the step of obtaining time information of the last time the user logs in the server comprises:
acquiring user list information connected with a server side;
according to the user list information connected with the server side, adding a user last login time information list in the user list information;
and adding a user last login time information list in the user list information to acquire the time information of the user after the user logs in the server for the last time.
3. The method as claimed in claim 1, wherein the step of setting a threshold of user login activity according to the time information of the last time the user logs in the server, and the step of obtaining the list of user login activity comprises:
setting a user login activity threshold according to the time parameter of the user login server;
acquiring the login activity of the user according to the login activity threshold of the user and the time information of the last time that the user logs in the server;
and acquiring a user login activity list according to the login activity of the user.
4. The method as claimed in claim 3, wherein the step of obtaining the login activity of the user according to the threshold of the login activity of the user and the time information of the last time the user logs in the server comprises:
comparing whether the last time that the user logs in the server is greater than a set threshold value of the login activity of the user;
if yes, setting the user as an inactive user;
if not, the user is set as an active user.
5. The method of claim 1, wherein said step of synchronizing messages to said active users in accordance with said user login activity list comprises:
acquiring user list information connected with a server side;
adding a message synchronization list in the user list information according to the user list information connected with the server side;
acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list;
and acquiring message synchronization information of the active user according to the association between the message synchronization list and the user login activity list and the active user list.
6. The method as claimed in claim 1, wherein the step of compensating the synchronization message when the inactive user is online according to the user login activity list comprises:
acquiring user list information connected with a server side;
adding a message synchronization list in the user list information according to the user list information connected with the server side;
acquiring the association between the message synchronization list and the user login activity list according to the message synchronization list and the user login activity list;
and acquiring the message information for compensating the non-active user according to the association between the message synchronization list and the user login activity list and the non-active user login server information in the non-active user list.
7. The method of claim 6, wherein the step of obtaining synchronization message information that compensates for the inactive user based on the association of the message synchronization list with the user login activity list and the inactive user login server information in the inactive user list comprises:
according to the message synchronization list, obtaining the message serial number of the synchronization message which is obtained by the inactive user at last;
acquiring a session relation between the inactive user and the server according to a message serial number of a synchronous message acquired by the inactive user last;
according to the conversation relationship between the inactive user and the server and the information of the inactive user logging in the server, the inactive user traverses unsynchronized messages corresponding to the server conversation relationship;
acquiring the unsynchronized message synchronized to the message synchronization list information according to the unsynchronized message corresponding to the server dialogue relation traversed by the inactive user;
and according to the message synchronization list information synchronized by the unsynchronized message, acquiring bit synchronization message information acquired by the non-active user through the message synchronization list.
8. An apparatus for reducing data of synchronization messages, the apparatus classifying users into active users and inactive users according to a time when the users last log in a server, performing message synchronization on the active users, compensating the synchronization messages when the inactive users are online, and reducing data storage resources of the synchronization messages, the apparatus comprising:
the acquisition module is used for acquiring the time information of the last time that the user logs in the server;
the user login activity degree distinguishing module is used for setting a user login activity degree threshold value according to the time information of the last time that the user logs in the server, and acquiring a user login activity degree list, wherein the user login activity degree list comprises an active user list and an inactive user list;
and the message synchronization module is used for carrying out message synchronization on the active users according to the user login activity list and compensating the synchronous messages when the inactive users are online.
9. An electronic device, comprising:
one or more processors; and
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of claims 1-7.
10. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of the methods of claims 1-7.
CN202210370068.3A 2022-04-08 2022-04-08 Method, apparatus, device and medium for reducing synchronous message data Pending CN114885005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210370068.3A CN114885005A (en) 2022-04-08 2022-04-08 Method, apparatus, device and medium for reducing synchronous message data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210370068.3A CN114885005A (en) 2022-04-08 2022-04-08 Method, apparatus, device and medium for reducing synchronous message data

Publications (1)

Publication Number Publication Date
CN114885005A true CN114885005A (en) 2022-08-09

Family

ID=82669387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210370068.3A Pending CN114885005A (en) 2022-04-08 2022-04-08 Method, apparatus, device and medium for reducing synchronous message data

Country Status (1)

Country Link
CN (1) CN114885005A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135145A (en) * 2017-04-19 2017-09-05 努比亚技术有限公司 Message pushes control method and device
CN107992564A (en) * 2017-11-29 2018-05-04 努比亚技术有限公司 Login authentication processing method, mobile terminal and computer-readable recording medium
WO2020233059A1 (en) * 2019-05-21 2020-11-26 深圳壹账通智能科技有限公司 Login processing method based on data processing and related apparatus
CN113783913A (en) * 2020-08-31 2021-12-10 北京沃东天骏信息技术有限公司 Message pushing management method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135145A (en) * 2017-04-19 2017-09-05 努比亚技术有限公司 Message pushes control method and device
CN107992564A (en) * 2017-11-29 2018-05-04 努比亚技术有限公司 Login authentication processing method, mobile terminal and computer-readable recording medium
WO2020233059A1 (en) * 2019-05-21 2020-11-26 深圳壹账通智能科技有限公司 Login processing method based on data processing and related apparatus
CN113783913A (en) * 2020-08-31 2021-12-10 北京沃东天骏信息技术有限公司 Message pushing management method and device

Similar Documents

Publication Publication Date Title
WO2021036228A1 (en) File upload method and apparatus, terminal, server, system, and storage medium
CN110609872B (en) Method and apparatus for synchronizing node data
CN101080056B (en) A management method and system of network browser collection folder of mobile terminal
US8495249B2 (en) Providing sync notifications to client devices
CN106951521B (en) Method, device and system for reading and writing log file
WO2021082969A1 (en) Inter-core data processing method and system, system on chip and electronic device
CN110493122B (en) Session information synchronization method and device, computing equipment and storage medium
US20220394209A1 (en) Multimedia conference data processing method and apparatus, and electronic device
CN103793454A (en) Apparatus and method for displaying loading state of web browser
US20230030856A1 (en) Distributed table storage processing method, device and system
US10848530B2 (en) Conference system and method for interworking between audio conference and web conference
CN110955719B (en) Data access processing equipment, system and method
EP3040869A1 (en) Control system and method for cache coherency
CN111414383B (en) Data request method, data processing system and computing device
CN110708238B (en) Method and apparatus for processing information
CN114885005A (en) Method, apparatus, device and medium for reducing synchronous message data
US20030104833A1 (en) Data synchronization system and method
KR20110034598A (en) Adapter for synchronizing data over different networks
CN113836424A (en) Data acquisition method and device, electronic equipment and storage medium
CN114710482A (en) File detection method and device, electronic equipment and storage medium
US20190089753A1 (en) Conference system and method for handling conference connection thereof
US20190005453A1 (en) Method for performing mail data management in a mail system, and associated apparatus
WO2023179586A1 (en) Method for detecting wake-up signal, and device
US11983713B2 (en) Blockchain transaction privacy protection method and blockchain node device
WO2021189253A1 (en) Data transmission method and apparatus

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