CN110311855B - User message processing method and device, electronic equipment and storage medium - Google Patents

User message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110311855B
CN110311855B CN201910557165.1A CN201910557165A CN110311855B CN 110311855 B CN110311855 B CN 110311855B CN 201910557165 A CN201910557165 A CN 201910557165A CN 110311855 B CN110311855 B CN 110311855B
Authority
CN
China
Prior art keywords
message
user
record
list
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910557165.1A
Other languages
Chinese (zh)
Other versions
CN110311855A (en
Inventor
陈慕仪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN201910557165.1A priority Critical patent/CN110311855B/en
Publication of CN110311855A publication Critical patent/CN110311855A/en
Application granted granted Critical
Publication of CN110311855B publication Critical patent/CN110311855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression
    • 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/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • 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/226Delivery according to priorities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • 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/133Protocols for remote procedure calls [RPC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a user message processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a message sent by a first user to a second user, wherein the first user is associated with a message sending list and the second user is associated with a message receiving list; storing a transmission record for the message in a message transmission list; storing a reception record for the message in a message reception list; the message is stored. The sending list and the receiving list can be used for respectively storing the information of the sending party and the information of the receiving party, so that the information of the sending and receiving parties of the message can store one part of data in the server, and redundant data is reduced. The server can originally store the storage space of the redundant data, can be used for storing more data, and improves the resource utilization rate.

Description

User message processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to data processing technologies, and in particular, to a method and an apparatus for processing a user message, an electronic device, and a storage medium.
Background
With the continuous increase of network traffic, the traffic of users and other users is higher and higher. The network side needs to record the history of the user and provide the user interaction record for the user.
For the interaction records between users, the records are usually stored in the form of a main list and a standby list. The master list includes sender information, transmission time, content of a transmitted message, recipient information, reception time, and the like. The standby list is used as a backup of the main list and stores the same data content as the main list.
When the data is stored in the main list and the standby list, the same data is stored twice, redundant data exists, and the redundant data occupies system resources, so that the resource utilization rate is poor.
Disclosure of Invention
The invention provides a user message processing method, a user message processing device, electronic equipment and a storage medium, which are used for reducing redundant data and improving the utilization rate of system resources.
In a first aspect, an embodiment of the present invention provides a user message processing method, including:
receiving a message sent by a first user to a second user, wherein the first user is associated with a message sending list and the second user is associated with a message receiving list;
storing a transmission record for the message in a message transmission list;
storing a reception record for the message in a message reception list;
the message is stored.
In a second aspect, an embodiment of the present invention further provides a user message processing method, including:
receiving a message request sent by a client, wherein the client logs in a first user and the first user is associated with a message sending list;
in response to the message request, searching a sending record stored for a message in a message sending list;
if the sending record is found, determining a second user for receiving the message according to the sending record and a message receiving list associated with the second user;
searching a message receiving list for a receiving record stored for the message;
if the receiving record is found, searching the message, and sending the message to the client for display.
In a third aspect, an embodiment of the present invention further provides a user message processing method, including:
receiving a message request sent by a client, wherein the client logs in a second user, and the second user is associated with a message receiving list;
searching a receiving record stored aiming at a message in a message receiving list in response to the message request;
if the receiving record is found, determining a first user for sending the message and a message sending list associated with the first user according to the receiving record;
searching a sending record stored aiming at the message in a message sending list;
if the sending record is found, the message is found and sent to the client side for displaying.
In a fourth aspect, an embodiment of the present invention further provides a user message processing apparatus, including:
the message receiving module is used for receiving a message sent by a first user to a second user, a first user associated message sending list and a second user associated message receiving list;
a transmission record storage module for storing a transmission record for a message in a message transmission list;
a reception record storage module for storing a reception record for a message in a message reception list;
and the message storage module is used for storing the messages.
In a fifth aspect, an embodiment of the present invention further provides a user message processing apparatus, including:
the first message request receiving module is used for receiving a message request sent by a client, wherein the client logs in a first user and the first user is associated with a message sending list;
a first transmission record searching module, configured to search a transmission record stored for a message in a message transmission list in response to a message request;
the second user determining module is used for determining a second user for receiving the message and a message receiving list associated with the second user according to the sending record if the sending record is found;
the first receiving record searching module is used for searching the receiving record stored aiming at the message in the message receiving list;
and the first message searching module is used for searching for the message and sending the message to the client side for displaying if the receiving record is searched.
In a sixth aspect, an embodiment of the present invention further provides a user message processing apparatus, including:
the second message request receiving module is used for receiving a message request sent by the client, the client logs in a second user, and the second user is associated with a message receiving list;
a second received record searching module, configured to search a received record stored for a message in a message received list in response to a message request;
the first user determining module is used for determining a first user for sending the message and a message sending list associated with the first user according to the receiving record if the receiving record is found;
the second sending record searching module is used for searching the sending record stored aiming at the message in the message sending list;
and the second message searching module is used for searching the message and sending the message to the client for displaying if the sending record is searched.
In a seventh aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the user message processing method according to the first aspect.
In an eighth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the user message processing method as shown in the second aspect is implemented.
In a ninth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the user message processing method as shown in the third aspect is implemented.
In a tenth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the user message processing method as shown in the first aspect.
In an eleventh aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the user message processing method as shown in the second aspect.
In a twelfth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the user message processing method shown in the third aspect.
According to the user message processing scheme provided by the embodiment of the invention, when receiving the message sent by the first user to the second user, the server can store the sending record aiming at the message in the message sending list associated with the first user, store the receiving record aiming at the message in the message receiving list associated with the second user and store the message. The server only stores the sending record in the sending list, only stores the receiving record in the receiving list, and stores the message, thereby realizing the purpose of storing only one message. Compared with the mode of using the main list and the standby list, the sending list and the receiving list can be used for respectively storing the information of the sender and the information of the receiver, so that the information of the sender and the receiver of the message can store one part of data in the server, and redundant data is reduced. The server can originally store the storage space of the redundant data, can be used for storing more data, and improves the resource utilization rate.
Drawings
FIG. 1 is a schematic diagram of a system architecture in which embodiments of the present invention are suitable;
fig. 2 is a flowchart illustrating a user message processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating another user message processing method in an embodiment of the present invention;
FIG. 4 is a flow chart illustrating another user message processing method according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating another user message processing method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a user message processing apparatus in an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of another user message processing apparatus in the embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another user message processing apparatus in the embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device in the embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a system architecture scenario used in the embodiment of the present invention, in which a plurality of terminals are accessed in a network, wherein a first user logs in a first terminal 001, and a second user logs in a second terminal 002. Optionally, live applications are installed in both the first terminal 001 and the second terminal 002, the first user starts the live application in the first terminal 001, logs in a login account of the first user in the live application, and the second user starts the live application in the second terminal 002, and logs in a login account of the second user in the live application. Optionally, browsers capable of accessing the live broadcast platform are installed in both the first terminal 001 and the second terminal 002, the first user starts the browser in the first terminal 001 and accesses the live broadcast platform, and logs in a login account of the first user on the live broadcast platform; the second user starts the browser in the second terminal 002 and accesses the live platform, and logs in the login account of the second user on the live platform. When the first user sends a message to the second user, the server 003 receives the message, and the server 003 stores the message. The first user or the second user may query the recorded message from the server by sending a message request to the server.
The first user may initiate an invitation message to the second user. The initiated invitation includes: a live access service invitation or a game interaction service invitation. The first user may also conduct instant messaging services with the second user.
Taking the live access service invitation as an example, the first user initiates the live access service invitation to the second user, so that the first user invites the second user to have live access to the first user. At this time, the second user may receive a live access service invitation initiated by the first user. The server stores the live access service invitation. The first user may then initiate a message request for a live access service invitation to the server for querying an invitation record and an invited record associated with the first user in the live access service.
The game interaction service invitation is used for the first user to invite the second user to participate in the game together with the first user. The first user may send a game interaction service invitation to the second user, and at this time, the second user may receive the game interaction service invitation initiated by the first user. The server stores the game interaction service invitation. Then, the first user may initiate a game interaction service invitation message request to the server, so as to query an invitation record and an invited record related to the first user in the game interaction service.
The first user may also be in instant communication with the second user. In the process that a first user sends an instant messaging message to a second user or the second user sends the instant messaging message to the first user, the server records the instant messaging message sent between the first user and the second user. The instant communication message includes a text format, an audio format, or a video format.
Fig. 2 is a flowchart of a user message processing method provided in an embodiment of the present invention, which is applicable to a case of storing messages sent among multiple users, and the method is applied to a server, and includes:
step 110, receiving a message sent by a first user to a second user.
The first user is associated with a message sending list, and the second user is associated with a message receiving list.
Each user is associated with a send list and a receive list. The embodiment of the invention is described in terms of sending messages once. For the same user, in the same service scenario, such as instant messaging, game interaction, etc., it may be used as a first user to send a message, and correspondingly, it may also be used as a second user to receive a message.
The message sent by the first user to the second user can be obtained through the live broadcast server, or the message can be sent to the server when the first user sends the message to the second user, and then the server stores the message and sends the message to the second user. The message includes the message of the live access service, the game interaction service or the instant communication service shown in the above embodiment.
In the server, a send list and a receive list may be associated with each user for each user. For example, the first user is associated with a send list and a receive list associated with the first user. The sending list is used for recording the characteristics of the message sent by the first user. The receiving list associated with the first user is used for recording the message characteristics received by the first user. Similarly, the second user is associated with a receive list and a send list associated with the second user. The receiving list is used for recording the message characteristics received by the second user. The second user associated transmission list is used for recording the message characteristics transmitted by the second user. The message characteristics may include: timestamp of message transmission (or reception), peer user identification, etc., wherein the timestamp can be used for ordering of messages.
In the process of sending a message from a first user to a second user, the related lists are a sending list associated with the first user and a receiving list associated with the second user. Similarly, in the process of sending a message to the first user by the second user, the related lists are a sending list associated with the second user and a receiving list associated with the first user. The first user may be a sender in one message transmission or may be a recipient in another message transmission. For convenience of description, the embodiment of the present invention is described by taking the example that the first user sends a message to the second user.
Step 120, storing a transmission record for the message in a message transmission list.
The message delivery list includes a plurality of delivery records. One message for each transmission record. The send record is used to indicate that a message was sent to a user. The user can be represented by the user identifier of the second user, and only the identifier of the message can be recorded in the sending record without recording the content of the message body. The message body content is stored independently, and the body content of the message can be searched from the independent storage space through the identification of the message. Further, the message transmission list can be more lightweight.
Optionally, step 120 may also be implemented by: determining the number of the message; determining a user identification of a second user; and storing the number of the message and the user identification of the second user in a message sending list as a sending record of the message.
The numbering of the messages may be one implementation of the identification of the messages. And configuring a number for the message, and forming a sending record in a message sending list associated with the first user according to the second user characteristic, the number and the time characteristic of the message. And thus record when a numbered message is sent to a user. It should be noted that, in the embodiment of the present application, the number in the transmission record is used as a key value of the message body, and the unique corresponding message body can be found through one number. The number may be a serial number of a sequential number, or a number generated according to a preset algorithm. The sequence number may be an integer sequence that increases sequentially from 0, such as "0", "1", "2", "3" … … "N", where N is a last integer of the ascending sequence, and the server configures a corresponding number for the received message. The presetting algorithm is described in the following examples.
And taking the number of the message and the user identification of the second user as a sending record of the message, wherein the sending record shows that the first user sends a certain message with the number of the message to the second user.
Further, for more accurate recording of the characteristics of the message, a timestamp of the message may be added to the transmission record. The timestamp may be included in the number or a recording parameter may be added to the transmission record to record the timestamp of the message.
And if the timestamp is recorded in a mode of increasing the recording parameter, taking the number of the message, the user identification of the second user and the timestamp of the message as the sending record of the message. The time stamp is a time stamp of a transmission message described by the first user. If the timestamp is contained in the number, the timestamp may be used as a main field, and a random number (or an ordered number) may be used as an auxiliary field to form the number of the message.
The preset algorithm for generating the number may be: firstly, a timestamp, platform type information, service type information, number type identification and a random character string of the message are determined, wherein the timestamp is used for determining the sequence of sending records in a message sending list or the sequence of receiving records in a message receiving list. And then combining the timestamp, the platform type information, the service type information, the number type identification and the random character string of the message into the number of the message.
The time granularity of the timestamps of the messages can be as accurate as minutes or seconds. The platform class type information is used to indicate a platform used by the first user to send out the message. The platform comprises live broadcast platforms or audio and video playing platforms of different brands and the like. The service type information is used for indicating which service the message comes from, and the service type comprises a live broadcast access service, a game interaction service or an instant messaging service. The number type identification is used to identify that the generated number belongs to a number generated from a plurality of characteristics of the message, and may also be referred to as an incremental ID identification bit. The random character string is used for distinguishing a plurality of messages generated by the same service type at the same time and the same platform.
In one implementation, the encoding consists of a 32-bit string consisting of a concatenation of multiple fields. Specifically, the message number sequentially includes a field with 1-14 bits as a timestamp, a field with 15-16 bits as platform type information, a field with 17-19 bits as service type information, a field with 20 bits as a number type identifier, and a field with 21-32 bits as a random character string.
Step 130, storing a reception record for the message in a message reception list.
The message reception list includes a plurality of reception records. One for each received record. A receipt record is used to indicate that a message was received to a user. The user can be represented by the user identifier of the first user, and only the identifier of the message can be recorded in the receiving record without recording the content of the message body. The message body content is stored independently, and the body content of the message can be searched from the independent storage space through the identification of the message. Further, the message transmission list can be more lightweight.
It should be noted that, in the embodiment of the present invention, step 120 is used for storing the sending record, step 130 is used for storing the receiving record, and step 140 is used for storing the message body. The execution sequence of the three steps is not sequential. Illustratively, the steps 120, 130, 140 may be performed in this order. Or may be performed in the order of step 130, step 120, and step 140. It can also be executed in the order of step 140, step 130, and step 120. Steps 120, 130 and 140 each include storing according to the number of the message. After the number of the message is generated in the previously performed step (e.g., performed first in step 120), the number of the message generated in the previously performed step is directly read in the subsequently performed step (e.g., performed after steps 130 and 140), without repeatedly generating the number of the message.
Optionally, step 120 may also be implemented by: optionally, determining the number of the message; determining a user identification of a first user; and storing the number of the message and the user identification of the first user as a receiving record of the message in a message receiving list, wherein the timestamp is used for determining the ordering of the receiving record in the message receiving list.
The numbering of the messages may be one implementation of the identification of the messages. And configuring a number for the message, and forming a receiving record in a message receiving list associated with the second user according to the first user characteristic, the number and the time characteristic of the message. And then record when a certain number of messages sent by a certain user are received. It should be noted that, in the embodiment of the present application, the number in the received record is used as a key value of the message body, and the unique corresponding message body can be found through one number. The number used in step 130 is the same as the number used in step 120, and reference may be made to the description of the number in step 120, which is not repeated here.
And taking the number of the message and the user identification of the first user as a receiving record of the message, wherein the receiving record shows that the second user receives a certain message which is sent by the first user and has the number of the message.
Further, for more accurate recording of the characteristics of the message, a timestamp of the message may be added to the received record. The time stamp may be included in the number or a recording parameter may be added to the received record to record the time stamp of the message.
And if the time stamp is recorded in a mode of increasing the recording parameters, taking the number of the message, the user identification of the first user and the time stamp of the message as the receiving record of the message. The time stamp is a time stamp of a transmission message described by the first user. It should be noted that, the timestamp corresponding to one message in the server is unique, and the time when the first user sends the message may be used as the timestamp, or the time when the second user receives the message may be used as the timestamp. The two are used alternatively, so that the same timestamp can be used for the same message in the sending record and the receiving record. The specific form of the timestamp may refer to the description of the timestamp in step 120, which is not described herein again.
Step 140, store the message.
The server sets a sending list and a receiving list for each user corresponding to different service types, and also develops an independent storage space for storing the main content of the message. Different types of messages have different stored main contents, and are not exhaustive. The parameters contained in the message can be stored according to the display requirement of the data. Including, for example, time of creation of the message, price information, quantity information, etc.
According to the user message processing method provided by the embodiment of the invention, when receiving the message sent by the first user to the second user, the server can store the sending record aiming at the message in the message sending list associated with the first user, store the receiving record aiming at the message in the message receiving list associated with the second user, and store the message. The server only stores the sending record in the sending list, only stores the receiving record in the receiving list, and stores the message, thereby realizing the storage of only one message. Compared with the mode of using the main list and the standby list, the sending list and the receiving list can be used for respectively storing the information of the sender and the information of the receiver, so that the information of the sender and the receiver of the message can store one part of data in the server, and redundant data is reduced. The server can originally store the storage space of the redundant data, can be used for storing more data, and improves the resource utilization rate.
Fig. 3 is a user message processing method provided in an embodiment of the present invention, as a further description of the foregoing embodiment, in the embodiment of the present invention, the method may respectively include:
step 210, receiving a message sent by a first user to a second user.
Obtaining the service type of the message, wherein the service type comprises a live broadcast access service, a game interaction service or an instant communication service
Step 220, storing a sending record for the message in a message sending list associated with the first user and belonging to the service type.
The server constructs different processing modules aiming at different service types, and the processing modules are used for storing the messages of the associated service types. And each processing module comprises two lists for each user operation and maintenance, namely a sending list and a receiving list. The service types comprise a live access service invitation, a game interaction service invitation or an instant communication service.
And after receiving the message sent by the first user to the second user, the message is in a sending list which is associated with the first user and belongs to the service type.
Step 230, storing a reception record for the message in a message reception list associated with the second user and belonging to the service type.
And searching a message receiving list associated with the second user in a message processing module, and storing a receiving record aiming at the message.
Step 240, store the message.
The user message processing method provided by the embodiment of the invention can configure a plurality of processing modules based on the service types on the basis of the embodiment, and each processing module respectively operates and maintains the sending list and the receiving list of the user, thereby avoiding the problems of high maintenance risk, low data access speed and the like when different services use the same list in a cross way, and improving the reliability and the storage efficiency of message storage.
Fig. 4 is a schematic flowchart of a user message processing method provided in an embodiment of the present invention, where the method is applied to a server, and is suitable for the server to respond to a message request sent by a first user and feed back a sending record to the first user, and includes:
step 310, receiving a message request sent by a client, wherein the client logs in a first user, and the first user is associated with a message sending list.
After the first user logs in the client, a message request can be sent to the server. The message request is used to request the server to send a message that the first user has sent. The sent message may be all messages sent by the first user in one service type. Further, the message request may contain service type information, a timestamp, and target object information. The service type information indicates a transmission record of the first user requesting in a certain service type. The timestamp indicates that a message record within the time period is requested. The target object information represents a request to find a message between the first user and the target object(s).
Step 320, in response to the message request, looks up a transmission record stored for a message in the message transmission list.
After receiving the message request, reading a sending list associated with the first user. And reading the transmission record stored in the transmission list. And determining the sending lists of different service types according to the parameters carried in the message request. And screening the sending records in the sending list according to the time stamp and the target object information.
Step 330, if the sending record is found, determining a second user receiving the message according to the sending record, and a message receiving list associated with the second user.
The transmission record contains the user identification of the received message. And finding the sending record meeting the searching condition, and determining a second user according to the user identification recorded in the sending record. Reading the user identification recorded by the sending record; the user represented by the user identification is determined to be the second user to receive the message.
Step 340, look up the received record stored for the message in the message received list.
And searching a message receiving list associated with the second user, and searching a receiving record corresponding to the sending record in the message list. And when the sending list of the first user and the receiving list of the second user both have the receiving and sending records corresponding to the messages, determining that the second user has received the messages sent by the first user.
Optionally, acquiring the number of the message in the sending record; the message receipt list is looked up for a receipt record containing the number of the message.
When searching for the receiving record of the sending record pair, the receiving record of the number of the message can be searched in the message receiving list according to the number of the message recorded in the sending record, so that the quick and accurate searching can be realized.
Further, after the step 340 of searching the message receiving list for the received record stored for the message, the method further includes:
and if the receiving record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
When storing a message, the storage order is to store a transmission record, store a reception record, and store the message. The received record can be looked up according to the number of the message. If the receiving record is found, whether the message main body content matched with the number of the message is stored in the independent storage space or not is continuously found. If the content of the message body is not searched, the server is abnormal when storing the message body. If the receiving record containing the number of the message is not found, it indicates that an exception occurs when the second user receives the message, or an exception occurs when the server writes the receiving record into the message receiving list, so that the message does not exist in the message receiving list. At this time, the message is prohibited from being sent to the first user, and therefore the message records inquired by the sender (the first user) and the receiver (the second user) are ensured to be consistent.
And 350, if the receiving record is found, searching for a message, and sending the message to the client for displaying.
And if the receiving record is found, searching the message associated with the receiving record in the independent storage space. And sending the message to the client for display.
Optionally, the searching for the message includes: acquiring the number of the message in the sending record or the receiving record; and searching the message according to the number of the message.
Since the message number can be used to accurately locate the message, the number of the message described in the transmission record or the reception record can be read. And searching the message body content in the independent storage space by using the number of the message, and sending the message body content to the client.
It should be noted that, for the instant messaging message, after the first user initiates a message request to the server, the server will query the message sent by the first user and the message received by the first user. And sending the message sent by the first user and the message received by the first user to the client of the first user.
Further, the data may be checked by the asynchronous thread. The data comprises a sending list, a receiving list and a message body stored in an independent storage space. The verification is used for verifying the coexistence of the three. If there is a record that lacks a message, the check is determined to be not qualified. If all the three have a certain message, the verification is determined to be qualified. If not, the data is considered to be dirty data. The server cleans up the dirty data and recovers the available resources. The asynchronous processing mode does not affect the processing speed of a Remote Procedure Call (rpc) interface for the communication between the server and the client.
The user message processing method provided by the embodiment of the invention can receive the message request sent by the client; in response to the message request, searching a sending record stored for a message in a message sending list; if the sending record is found, determining a second user receiving the message according to the sending record; searching a receiving record stored aiming at the message in a message receiving list associated with the second user; if the receiving record is found, searching the message, and sending the message to the client for display. If the client or the server is abnormal in the sending or receiving stage of the user, the sending record and the receiving record are not matched with the query result of the message body, namely one or two of the sending record and the receiving record cannot be found, the storage abnormality is determined, and the message is forbidden to be sent to the client at the moment. And only when the three exist, the message is sent to the client, so that the consistency of historical record query is realized. The server does not need to forward and roll back the dirty data of the list, so that the performance of the message query interface is improved, and the messages queried by the initiator and the receiver of the messages are consistent.
Fig. 5 is a schematic flowchart of a user message processing method provided in an embodiment of the present invention, where the method is applied to a server, and is adapted to respond to a message request sent by a second user by the server and feed back a reception record to the second user, and includes:
step 410, receiving a message request sent by a client, wherein the client logs in a second user, and the second user is associated with a message receiving list.
After the second user logs on to the client, a message request may be sent to the server. The message request is used for requesting the server to send a message that the second user has received. The received message may be all messages sent by the second user in one service type. Further, the message request may contain service type information, a timestamp, and target object information. The service type information indicates a transmission record of the first user requesting in a certain service type. The timestamp indicates that a message record within the time period is requested. The target object information represents a request to find a message between the second user and the target object(s).
Step 420, in response to the message request, searches the message receipt list for a receipt record stored for a message.
Upon receiving the message request, the received list associated with the second user is read. And reading the receiving record stored in the receiving list. And determining receiving lists of different service types according to the parameters carried in the message request. And filtering the receiving records in the receiving list according to the time stamp and the target object information.
Step 430, if the receiving record is found, determining the first user sending the message and a message sending list associated with the first user according to the receiving record.
The received record contains the user identification of the received message. And finding the receiving record meeting the searching condition, and determining the first user according to the user identification recorded in the receiving record. Reading the user identification recorded by the receiving record; the user represented by the user identity is determined to be the first user to send the message.
Step 440 looks up the delivery record stored for the message in the message delivery list.
And searching a message sending list associated with the first user, and searching a sending record corresponding to the receiving record in the message list. And when the receiving list of the second user and the sending list of the first user both have receiving and sending records corresponding to the messages, determining that the second user has received the messages sent by the first user.
Optionally, acquiring a number of the message in the receiving record; a send record containing the number of the message is looked up in the message send list.
When searching for the sending record matched with the receiving record, the sending record of the number of the message can be searched in the message sending list according to the number of the message recorded in the receiving record, so that the quick and accurate searching can be realized.
Further, after searching the sending record stored for the message in the message sending list, step 440 further includes:
and if the sending record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
If the storage sequence is storage sending record, storage receiving record and storage message when the message is stored, the message is searched, and if the message is not searched, the message is forbidden to be sent to the client side for displaying.
When storing a message, the storage order is storing a reception record, storing a transmission record, and storing the message. The transmission record can be looked up according to the number of the message. If the sending record is found, whether the message main body content matched with the number of the message is stored in the independent storage space or not is continuously found. If the content of the message body is not searched, the server is abnormal when storing the message body. If the receiving record containing the number of the message is not found, the server is indicated that an exception occurs when the sending record is written into the message sending list, so that the message does not exist in the message sending list. At this time, the message is prohibited from being sent to the second user, so that the message records inquired by the sender (the first user) and the receiver (the second user) are consistent.
And step 450, if the sending record is found, searching for a message, and sending the message to the client for displaying.
And if the sending record is found, searching the message associated with the sending record in the independent storage space. And sending the message to the client for display.
Optionally, the searching for the message includes: acquiring the number of the message in the sending record or the receiving record; and searching the message according to the number of the message.
Since the message can be accurately located by using the message number, the message number described in the reception record or the transmission record can be read. And searching the message body content in the independent storage space by using the number of the message, and sending the message body content to the client.
The user message processing method provided by the embodiment of the invention can receive a message request sent by a second user through a client; in response to the message request, searching a receiving record stored for a message in a message receiving list associated with the second user; if the receiving record is found, determining a first user sending the message according to the receiving record; searching a sending record stored aiming at the message in a message sending list; if the sending record is found, the message is found and sent to the client side for displaying. If the client or the server is abnormal in the sending or receiving stage of the user, the sending record and the receiving record are not matched with the query result of the message body, namely one or two of the sending record and the receiving record cannot be found, the storage abnormality is determined, and the message is forbidden to be sent to the client at the moment. And only when the three exist, the message is sent to the client, so that the consistency of historical record query is realized.
Fig. 6 is a schematic block diagram of a user message processing apparatus according to an embodiment of the present invention. As shown in fig. 6, the apparatus is applied to a server, and includes: a message receiving module 41, a sending record storage module 42, a receiving record storage module 43 and a message storage module 44.
A message receiving module 41, configured to receive a message sent by a first user to a second user, where the first user is associated with a message sending list and the second user is associated with a message receiving list;
a transmission record storage module 42 for storing a transmission record for a message in a message transmission list;
a reception record storage module 43 for storing a reception record for a message in a message reception list;
a message storage module 44 for storing messages.
On the basis of the foregoing embodiments, the transmission record storage module 42 is configured to:
determining the number of the message;
determining a user identification of a second user;
and storing the number of the message and the user identification of the second user in a message sending list as a sending record of the message.
On the basis of the foregoing embodiments, the reception record storage module 43 is configured to:
determining the number of the message;
determining a user identification of a first user;
and storing the number of the message and the user identification of the first user as a receiving record of the message in a message receiving list.
On the basis of the foregoing embodiments, the reception record storage module 43 is configured to:
determining a timestamp, platform type information, service type information, number type identification and a random character string of the message, wherein the timestamp is used for determining the sequence of sending records in a message sending list or receiving the sequence of receiving records in a message receiving list;
and combining the timestamp, the platform type information, the service type information, the number type identifier and the random character string of the message into a message number.
On the basis of the above embodiments, the message number sequentially includes the following fields, where bits 1 to 14 are a timestamp field, bits 15 to 16 are a platform type information field, bits 17 to 19 are a service type information field, bits 20 are a number type identifier field, and bits 21 to 32 are a random string field.
On the basis of the above embodiments, the system further comprises a service type obtaining module, configured to obtain a service type to which the message belongs, where the service type includes a live broadcast access service, a game interaction service, or an instant messaging service;
the transmission record storage module 42 is configured to: storing a sending record aiming at a message in a message sending list which is associated with a first user and belongs to a service type;
the reception record storage module 43 is configured to: in a message receipt list associated with the second user and belonging to the service type, a receipt record is stored for the message.
In the user message processing apparatus provided in the embodiment of the present invention, when the message receiving module 41 receives a message sent by a first user to a second user, the sending record storage module 42 stores a sending record for the message in the message sending list associated with the first user, the receiving record storage module 43 stores a receiving record for the message in the message receiving list associated with the second user, and the message storage module 44 stores the message. The server only stores the sending record in the sending list, only stores the receiving record in the receiving list, and stores the message, thereby realizing the purpose of storing only one message. Compared with the mode of using the main list and the standby list, the sending list and the receiving list can be used for respectively storing the information of the sender and the information of the receiver, so that the information of the sender and the receiver of the message can store one part of data in the server, and redundant data is reduced. The server can originally store the storage space of the redundant data, can be used for storing more data, and improves the resource utilization rate.
Fig. 7 is a schematic block diagram of a user message processing apparatus according to an embodiment of the present invention. As shown in fig. 7, the apparatus is applied to a server, and includes: a first message request receiving module 51, a first transmission record searching module 52, a second user determining module 53, a first reception record searching module 54 and a first message searching module 55.
A first message request receiving module 51, configured to receive a message request sent by a client, where the client logs in a first user and the first user is associated with a message sending list;
a first transmission record searching module 52, configured to search, in response to the message request, a transmission record stored for a message in the message transmission list;
a second user determining module 53, configured to determine, if the sending record is found, a second user that receives the message according to the sending record, and a message receiving list associated with the second user;
a first received record searching module 54, configured to search a received record stored for the message in the message received list;
and a first message searching module 55, configured to search for a message if the receiving record is found, and send the message to the client for display.
On the basis of the foregoing embodiments, the second user determination module 53 is configured to:
reading the user identification recorded by the sending record;
the user represented by the user identification is determined to be the second user to receive the message.
On the basis of the foregoing embodiments, the first received record searching module 54 is configured to:
acquiring the number of the message in the sending record;
the message receipt list is looked up for a receipt record containing the number of the message.
On the basis of the foregoing embodiments, the first message lookup module 55 is configured to:
acquiring the number of the message in the sending record or the receiving record;
and searching the message according to the number of the message.
On the basis of the foregoing embodiments, the system further includes a message prohibition module, configured to:
and if the receiving record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
The user message processing device provided by the embodiment of the invention can receive the message request sent by the client; in response to the message request, searching a sending record stored for a message in a message sending list; if the sending record is found, determining a second user receiving the message according to the sending record; searching a receiving record stored aiming at the message in a message receiving list associated with the second user; if the receiving record is found, searching the message, and sending the message to the client for display. If the client or the server is abnormal in the sending or receiving stage of the user, the sending record and the receiving record are not matched with the query result of the message body, namely one or two of the sending record and the receiving record cannot be found, the storage abnormality is determined, and the message is forbidden to be sent to the client at the moment. And only when the three exist, the message is sent to the client, so that the consistency of historical record query is realized. The server does not need to forward and roll back the dirty data of the list, so that the performance of the message query interface is improved, and the messages queried by the initiator and the receiver of the messages are consistent.
Fig. 8 is a schematic block diagram of a user message processing apparatus according to an embodiment of the present invention. As shown in fig. 8, the apparatus is applied to a server, and includes: a second message request receiving module 61, a second received record searching module 62, a first user determining module 63, a second sent record searching module 64 and a second message searching module 65.
A second message request receiving module 61, configured to receive a message request sent by a client, where the client logs in a second user and the second user is associated with a message receiving list;
a second received record searching module 62, configured to search a received record stored for a message in the message received list in response to the message request;
a first user determining module 63, configured to determine, if the receiving record is found, a first user that sends the message and a message sending list associated with the first user according to the receiving record;
a second transmission record searching module 64, configured to search a transmission record stored for the message in the message transmission list;
and a second message searching module 65, configured to search for a message if the sending record is found, and send the message to the client for display.
On the basis of the foregoing embodiments, the first user determining module 63 is configured to:
reading the user identification recorded by the receiving record;
and determining that the user represented by the user identification is the second user for sending the message.
On the basis of the foregoing embodiments, the second transmission record searching module 64 is configured to:
acquiring the number of the message in the receiving record;
a send record containing the number of the message is looked up in the message send list.
On the basis of the above embodiments, the system further includes a prohibition module configured to prohibit sending the message to the client for displaying if the sending record is not found or the message is not found.
The user message processing device provided by the embodiment of the invention can receive a message request sent by a second user through a client; in response to the message request, searching a receiving record stored for a message in a message receiving list associated with the second user; if the receiving record is found, determining a first user sending the message according to the receiving record; searching a sending record stored aiming at the message in a message sending list; if the sending record is found, the message is found and sent to the client side for displaying. If the client or the server is abnormal in the sending or receiving stage of the user, the sending record and the receiving record are not matched with the query result of the message body, namely one or two of the sending record and the receiving record cannot be found, the storage abnormality is determined, and the message is forbidden to be sent to the client at the moment. And only when the three exist, the message is sent to the client, so that the consistency of historical record query is realized.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention. It should be noted that, in the embodiment of the user message processing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 9, the electronic device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of the processors 70 in the computer device may be one or more, and one processor 70 is taken as an example in fig. 9; the processor 70, the memory 71, the input device 72 and the output device 73 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 9.
The memory 71 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the user message processing method in the embodiment of the present invention. The processor 70 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 71, that is, implements the user message processing method described above.
Optionally, the electronic device may be a server, and the method includes:
receiving a message sent by a first user to a second user, wherein the first user is associated with a message sending list and the second user is associated with a message receiving list;
storing a transmission record for the message in a message transmission list;
storing a reception record for the message in a message reception list;
the message is stored.
Further, storing a transmission record for the message in a message transmission list, comprising:
determining the number of the message;
determining a user identification of a second user;
and storing the number of the message and the user identification of the second user as a sending record of the message in a message sending list.
Further, storing a reception record for the message in a message reception list, comprising:
determining the number of the message;
determining a user identification of a first user;
and storing the number of the message and the user identification of the first user as a receiving record of the message in a message receiving list.
Further, determining the number of the message includes:
determining a timestamp, platform type information, service type information, number type identification and a random character string of the message, wherein the timestamp is used for determining the sequence of sending records in a message sending list or receiving the sequence of receiving records in a message receiving list;
and combining the timestamp, the platform type information, the service type information, the number type identifier and the random character string of the message into a message number.
Further, the message number sequentially includes fields, where bits 1 to 14 are a timestamp field, bits 15 to 16 are a platform type information field, bits 17 to 19 are a service type information field, bits 20 are a number type identifier field, and bits 21 to 32 are a random string field.
Further, after receiving the message sent by the first user to the second user, the method further includes:
acquiring the service type of the message, wherein the service type comprises a live broadcast access service, a game interaction service or an instant messaging service;
accordingly, storing a transmission record for a message in a message transmission list includes:
storing a sending record aiming at a message in a message sending list which is associated with a first user and belongs to a service type;
accordingly, storing a receipt record for a message in a message receipt list, comprising:
in a message receipt list associated with the second user and belonging to the service type, a receipt record is stored for the message.
Optionally, the electronic device may be a server, and the method includes:
receiving a message request sent by a client, wherein the client logs in a first user and the first user is associated with a message sending list;
in response to the message request, searching a sending record stored for a message in a message sending list;
if the sending record is found, determining a second user for receiving the message according to the sending record and a message receiving list associated with the second user;
searching a message receiving list for a receiving record stored for the message;
if the receiving record is found, searching the message, and sending the message to the client for displaying.
Further, determining a second user to receive the message based on the transmission record, comprising:
reading the user identification recorded by the sending record;
and determining the user represented by the user identification as a second user for receiving the message.
Further, searching a message receiving list for a receiving record stored for the message includes:
acquiring the number of the message in the sending record;
the message receipt list is looked up for a receipt record containing the number of the message.
Further, the searching for the message includes:
acquiring the number of the message in the sending record or the receiving record;
and searching the message according to the number of the message.
Further, after searching the reception record stored for the message in the message reception list, the method further includes:
and if the receiving record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
Optionally, the electronic device may be a server, and the method includes:
receiving a message request sent by a client, wherein the client logs in a second user, and the second user is associated with a message receiving list;
searching a receiving record stored aiming at a message in a message receiving list in response to the message request;
if the receiving record is found, determining a first user sending the message and a message sending list associated with the first user according to the receiving record;
searching a sending record stored aiming at the message in a message sending list;
if the sending record is found, the message is found and sent to the client side for displaying.
Optionally, determining the first user sending the message according to the receiving record includes:
reading the user identification recorded by the receiving record;
and determining that the user represented by the user identification is the second user for sending the message.
Optionally, searching for a sending record stored for the message in the message sending list includes:
acquiring the number of the message in the receiving record;
a send record containing the number of the message is looked up in the message send list.
Optionally, after searching for the transmission record stored for the message in the message transmission list, the method further includes:
and if the sending record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 73 may include a display device such as a display screen.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a computer processor is configured to perform a user message processing method. Optionally, when the execution device is a server, the method includes:
receiving a message sent by a first user to a second user, wherein the first user is associated with a message sending list and the second user is associated with a message receiving list;
storing a transmission record for the message in a message transmission list;
storing a reception record for the message in a message reception list;
the message is stored.
Further, storing a transmission record for the message in the message transmission list, including:
determining the number of the message;
determining a user identification of a second user;
and storing the number of the message and the user identification of the second user in a message sending list as a sending record of the message.
Further, storing a reception record for the message in a message reception list, comprising:
determining the number of the message;
determining a user identification of a first user;
and storing the number of the message and the user identification of the first user as a receiving record of the message in a message receiving list.
Further, determining the number of the message includes:
determining a timestamp, platform type information, service type information, number type identification and a random character string of the message, wherein the timestamp is used for determining the sequence of sending records in a message sending list or receiving the sequence of receiving records in a message receiving list;
and combining the timestamp, the platform type information, the service type information, the number type identifier and the random character string of the message into a message number.
Further, the message number sequentially includes fields, where bits 1 to 14 are a timestamp field, bits 15 to 16 are a platform type information field, bits 17 to 19 are a service type information field, bits 20 are a number type identifier field, and bits 21 to 32 are a random string field.
Further, after receiving the message sent by the first user to the second user, the method further includes:
acquiring the service type of the message, wherein the service type comprises a live broadcast access service, a game interaction service or an instant messaging service;
accordingly, storing a transmission record for a message in a message transmission list includes:
storing a sending record aiming at a message in a message sending list which is associated with a first user and belongs to a service type;
accordingly, storing a receipt record for a message in a message receipt list, comprising:
in a message receipt list associated with the second user and belonging to the service type, a receipt record is stored for the message.
Optionally, when the execution device is a server, the method includes:
receiving a message request sent by a client, wherein the client logs in a first user and the first user is associated with a message sending list;
searching a sending record stored aiming at a message in a message sending list in response to the message request;
if the sending record is found, determining a second user for receiving the message according to the sending record and a message receiving list associated with the second user;
searching a message receiving list for a receiving record stored for the message;
if the receiving record is found, searching the message, and sending the message to the client for display.
Further, determining a second user to receive the message based on the transmission record, comprising:
reading the user identification recorded by the sending record;
the user represented by the user identification is determined to be the second user to receive the message.
Further, searching a message receiving list for a receiving record stored for the message includes:
acquiring the number of the message in the sending record;
the message receipt list is looked up for a receipt record containing the number of the message.
Further, the searching for the message includes:
acquiring the number of the message in the sending record or the receiving record;
and searching the message according to the number of the message.
Further, after searching the message receiving list for the received record stored for the message, the method further includes:
and if the receiving record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
Optionally, when the execution device is a server, the method includes:
receiving a message request sent by a client, wherein the client logs in a second user, and the second user is associated with a message receiving list;
searching a receiving record stored aiming at a message in a message receiving list in response to the message request;
if the receiving record is found, determining a first user for sending the message and a message sending list associated with the first user according to the receiving record;
searching a sending record stored aiming at the message in a message sending list;
if the sending record is found, the message is found and sent to the client side for displaying.
Optionally, determining the first user sending the message according to the receiving record includes:
reading the user identification recorded by the receiving record;
and determining that the user represented by the user identification is the second user for sending the message.
Optionally, searching for a sending record stored for the message in the message sending list includes:
acquiring the number of the message in the receiving record;
a send record containing the number of the message is looked up in the message send list.
Optionally, after searching the sending record stored for the message in the message sending list, the method further includes:
and if the sending record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
Of course, the computer program of the computer-readable storage medium storing the computer program provided in the embodiments of the present invention is not limited to the above method operations, and may also perform related operations in the user message processing method provided in any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods of the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (16)

1. A user message processing method is used for a live broadcast server, and is characterized by comprising the following steps:
receiving a message sent by a first user to a second user, wherein the first user is associated with a message sending list, and the second user is associated with a message receiving list;
storing a transmission record for the message in the message transmission list;
storing a receipt record for the message in the message receipt list;
storing the message;
after receiving the message sent by the first user to the second user, the method further comprises the following steps:
acquiring the service type of the message, wherein the service type comprises a live broadcast access service, a game interaction service or an instant messaging service;
correspondingly, the storing a sending record for the message in the message sending list includes:
storing a sending record aiming at the message in a message sending list which is associated with the first user and belongs to the service type;
correspondingly, storing a reception record for the message in the message reception list includes:
storing a reception record for the message in a message reception list associated with the second user and belonging to the service type.
2. The method of claim 1, wherein storing a transmission record for the message in the message transmission list comprises:
determining the number of the message;
determining a user identification of the second user;
and taking the number of the message and the user identification of the second user as a sending record of the message and storing the sending record in the message sending list.
3. The method of claim 2, wherein storing a receipt record for the message in the message receipt list comprises:
determining the number of the message;
determining a user identification of the first user;
and storing the number of the message and the user identification of the first user in the message receiving list as a receiving record of the message.
4. The method of claim 2 or 3, wherein the determining the number of the message comprises:
determining a timestamp, platform type information, service type information, number type identification and a random character string of the message, wherein the timestamp is used for determining the sequence of the sending record in the message sending list or the sequence of the receiving record in the message receiving list;
and combining the timestamp of the message, the platform type information, the service type information, the number type identifier and the random character string into the number of the message.
5. The method according to claim 4, wherein the message number comprises fields in sequence, where bits 1-14 are the fields of the timestamp, bits 15-16 are the fields of the platform type information, bits 17-19 are the fields of the service type information, bits 20 are the fields of the number type identifier, and bits 21-32 are the fields of a random string.
6. A method for processing a user message, comprising:
receiving a message request sent by a client, wherein the client logs in a first user, and the first user is associated with a message sending list;
in response to the message request, searching a sending record stored for a message in the message sending list;
if the sending record is found, determining a second user receiving the message according to the sending record, and a message receiving list associated with the second user;
searching a receiving record stored for the message in the message receiving list;
and if the receiving record is found, the message is found, and the message is sent to the client side for displaying.
7. The method of claim 6, wherein determining a second user to receive the message based on the transmission record comprises:
reading the user identification recorded by the sending record;
and determining that the user represented by the user identification is the second user for receiving the message.
8. The method of claim 6, wherein searching the message receipt list for a receipt record stored for the message comprises:
acquiring the number of the message in the sending record;
and searching a receiving record containing the number of the message in the message receiving list.
9. The method of claim 6, wherein searching for the message comprises:
acquiring the number of the message in the sending record or the receiving record;
and searching the message according to the number of the message.
10. The method of claim 6, wherein after searching the message receipt list for the receipt record stored for the message, further comprising:
and if the receiving record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
11. A method for processing a user message, comprising:
receiving a message request sent by a client, wherein the client logs in a second user, and the second user is associated with a message receiving list;
in response to the message request, searching a receiving record stored for a message in the message receiving list;
if the receiving record is found, determining a first user for sending the message and a message sending list associated with the first user according to the receiving record;
searching a sending record stored aiming at the message in the message sending list;
and if the sending record is found, the message is found, and the message is sent to the client side for displaying.
12. The method of claim 11, wherein determining the first user to send the message based on the received record comprises:
reading the user identification recorded by the receiving record;
and determining that the user represented by the user identification is the first user sending the message.
13. The method of claim 11, wherein searching the message delivery list for a delivery record stored for the message comprises:
acquiring the number of the message in the receiving record;
and searching a sending record containing the number of the message in the message sending list.
14. The method of claim 11, wherein after searching the message transmission list for the transmission record stored for the message, further comprising:
and if the sending record is not found or the message is not found, the message is forbidden to be sent to the client side for displaying.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the user message handling method of any of claims 1-12 when executing the program.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a user message handling method according to any one of claims 1-12.
CN201910557165.1A 2019-06-25 2019-06-25 User message processing method and device, electronic equipment and storage medium Active CN110311855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910557165.1A CN110311855B (en) 2019-06-25 2019-06-25 User message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910557165.1A CN110311855B (en) 2019-06-25 2019-06-25 User message processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110311855A CN110311855A (en) 2019-10-08
CN110311855B true CN110311855B (en) 2022-05-31

Family

ID=68076134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910557165.1A Active CN110311855B (en) 2019-06-25 2019-06-25 User message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110311855B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327687B (en) * 2020-01-21 2023-02-21 卓米私人有限公司 Data transmission method and device, electronic equipment and storage medium
CN112295239B (en) * 2020-10-23 2024-09-17 网易(杭州)网络有限公司 Historical message prompting method and device, storage medium and electronic equipment
CN113905002A (en) * 2021-09-30 2022-01-07 北京字跳网络技术有限公司 Message pushing method, device, system and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282201A (en) * 2008-03-28 2008-10-08 中兴通讯股份有限公司 Method and equipment for monitoring message in communication apparatus
CN101299829A (en) * 2007-04-30 2008-11-05 华为技术有限公司 Method and message system implementing medium content management of unification storage
CN101453483A (en) * 2007-11-29 2009-06-10 华为技术有限公司 Storage processing and inquiry method, system and apparatus for session historic record
CN103023750A (en) * 2012-08-01 2013-04-03 福建星网视易信息系统有限公司 Method for getting message by terminal
CN103188297A (en) * 2011-12-29 2013-07-03 北大方正集团有限公司 Method and system for storing and obtaining information
CN104796322A (en) * 2015-03-25 2015-07-22 腾讯科技(深圳)有限公司 Message processing method and equipment
CN106385430A (en) * 2016-08-23 2017-02-08 北京小米移动软件有限公司 Communication message management method and device
CN109600240A (en) * 2018-12-21 2019-04-09 北京云中融信网络科技有限公司 Group Communications method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE0200451L (en) * 2002-02-15 2003-04-15 Hotsip Ab A procedure for distributing information

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299829A (en) * 2007-04-30 2008-11-05 华为技术有限公司 Method and message system implementing medium content management of unification storage
CN101453483A (en) * 2007-11-29 2009-06-10 华为技术有限公司 Storage processing and inquiry method, system and apparatus for session historic record
CN101282201A (en) * 2008-03-28 2008-10-08 中兴通讯股份有限公司 Method and equipment for monitoring message in communication apparatus
CN103188297A (en) * 2011-12-29 2013-07-03 北大方正集团有限公司 Method and system for storing and obtaining information
CN103023750A (en) * 2012-08-01 2013-04-03 福建星网视易信息系统有限公司 Method for getting message by terminal
CN104796322A (en) * 2015-03-25 2015-07-22 腾讯科技(深圳)有限公司 Message processing method and equipment
CN106385430A (en) * 2016-08-23 2017-02-08 北京小米移动软件有限公司 Communication message management method and device
CN109600240A (en) * 2018-12-21 2019-04-09 北京云中融信网络科技有限公司 Group Communications method and device

Also Published As

Publication number Publication date
CN110311855A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN109522330B (en) Cloud platform data processing method, device, equipment and medium based on block chain
CN110311855B (en) User message processing method and device, electronic equipment and storage medium
US20100229212A1 (en) Method and terminal for sharing information in iptv service system
KR20060094855A (en) Method and system for locating contact information collected from contact sources
KR20060094853A (en) Method and system for aggregating contact information from multiple contact sources
CN109522462B (en) Cloud query method, device, equipment and storage medium based on block chain
US8489695B2 (en) Proxy communications on a social network
CN101771723A (en) Data synchronization method
CN111163130A (en) Network service system and data transmission method thereof
CN108429739B (en) Method, system and terminal equipment for identifying honeypots
CN111277483B (en) Multi-terminal message synchronization method, server and storage medium
CN113507475B (en) Cross-domain access method and device
CN113220684A (en) Data packet storage and query method, device, system and storage medium
CN101778131A (en) Data synchronization system
CN109213955B (en) Data processing method and related equipment
CN101789963A (en) Data synchronization system
CN104270357A (en) Service information sending method and device
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN105991683A (en) Data transmission method and device
CN104580084A (en) Method, terminals and system for sharing multimedia file
CN113612811B (en) Method, system, equipment and medium for client mounting in multiple channels
CN104346228A (en) Application program sharing method and terminal
CN112131263B (en) Software package acquisition method, system, device, electronic equipment and storage medium
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN113132928B (en) Charging method and device for video short message service

Legal Events

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