WO2023241578A1 - 消息处理方法、装置、通信设备、存储介质及程序产品 - Google Patents

消息处理方法、装置、通信设备、存储介质及程序产品 Download PDF

Info

Publication number
WO2023241578A1
WO2023241578A1 PCT/CN2023/099950 CN2023099950W WO2023241578A1 WO 2023241578 A1 WO2023241578 A1 WO 2023241578A1 CN 2023099950 W CN2023099950 W CN 2023099950W WO 2023241578 A1 WO2023241578 A1 WO 2023241578A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
time
client
invitation message
invitation
Prior art date
Application number
PCT/CN2023/099950
Other languages
English (en)
French (fr)
Inventor
王毅旭
杨旭
Original Assignee
抖音视界(北京)有限公司
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 抖音视界(北京)有限公司 filed Critical 抖音视界(北京)有限公司
Publication of WO2023241578A1 publication Critical patent/WO2023241578A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26283Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for associating distribution time parameters to content, e.g. to generate electronic program guide data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Definitions

  • the present disclosure relates to the field of live broadcast technology, and in particular, to a message processing method, device, communication equipment, storage medium and program product.
  • the establishment process of the live streaming room may include the client A corresponding to the live broadcast room A sending an invitation message to the client B corresponding to the live broadcast room B for instructing the establishment of live broadcast room continuous streaming. After receiving the invitation message, the client B sends the invitation message to the client B corresponding to the live broadcast room B. Client A sends a reply message indicating that it agrees to establish a live broadcast room connection. After receiving the reply message, client A establishes a live broadcast room connection with client B.
  • a first aspect of an embodiment of the present disclosure provides a message processing method, applied to a first client.
  • the method includes: receiving a target message sent by the server, where the target message includes: used to instruct the second client to invite the first client.
  • the invitation message sends a reply message, and the reply message is used to indicate whether to agree to establish a live broadcast room connection with the second client; when the remaining valid time is less than the first time length threshold, the invitation message is ignored.
  • a second aspect of an embodiment of the present disclosure provides a message processing method, applied to a second client.
  • the method includes: sending an invitation message to a server, where the invitation message is used to instruct the second client to invite the first client to establish a live broadcast. Intermittent communication; wherein, the invitation message is used for the server to send a target message to the first client according to the invitation message, and the target message is used for the first client to obtain the corresponding information of the invitation message based on the time information carried by the target message. the remaining valid period, and if the remaining valid period is greater than or equal to the first duration threshold, the invitation message is displayed; if the remaining valid period is less than the first duration threshold, the invitation message is ignored.
  • a third aspect of an embodiment of the present disclosure provides a message processing method, applied to a server.
  • the method includes: receiving an invitation message sent by a second client, where the invitation message is used to instruct the second client to invite the first client to establish The live broadcast room connects the microphone; according to the invitation message, a target message is sent to the first client.
  • the target message is used by the first client to obtain the remaining validity period corresponding to the invitation message based on the time information carried in the target message, and the remaining validity period is If the duration is greater than or equal to the first duration threshold, the invitation message is displayed; if the remaining valid duration is less than the first duration threshold, the invitation message is ignored.
  • a fourth aspect of the embodiment of the present disclosure provides a message processing device, which includes: a receiving module, an acquisition module, and a processing module; the receiving module is used to receive a target message sent by the server, and the target message includes: used to indicate the first
  • the second client invites the first client to establish an invitation message for live broadcast room connection;
  • the acquisition module is used to obtain the remaining valid time corresponding to the invitation message based on the time information carried in the target message received by the receiving module;
  • the processing module Used to display the invitation message when the remaining valid period obtained by the acquisition module is greater than or equal to the first duration threshold, and to send a reply message according to the invitation message.
  • the reply message is used to indicate whether to agree to communicate with the second customer.
  • the client establishes a live broadcast room connection; when the remaining valid time obtained by the acquisition module is less than the first time duration threshold, the invitation message is ignored.
  • a fifth aspect of the embodiment of the present disclosure provides a message processing device.
  • the device includes: a sending module for sending an invitation message to the server.
  • the invitation message is used to instruct the second client to invite the first client to establish a live broadcast room. Continuous wheat; wherein, the invitation message is used for the server to send a target message to the first client according to the invitation message, and the target message is used for the first client to obtain the remaining valid time corresponding to the invitation message based on the time information carried by the target message. , and when the remaining valid period is greater than or equal to the first duration threshold, the invitation message is displayed, and when the remaining valid period is less than the first duration threshold, the invitation message is ignored.
  • a sixth aspect of the embodiment of the present disclosure provides a message processing device, which includes: a receiving module and a sending module; the receiving module is used to receive an invitation message sent by a second client, where the invitation message is used to indicate that the second client The client invites the first client to establish a live broadcast room connection; the sending module is used to send a target message to the first client according to the invitation message received by the receiving module, and the target message is used by the first client to carry the target message based on time information, obtain the remaining valid duration corresponding to the invitation message, and display the invitation message when the remaining valid duration is greater than or equal to the first duration threshold, and display the invitation message when the remaining valid duration is less than the first duration threshold, Ignore this invitation message.
  • a seventh aspect of the embodiment of the present disclosure provides a communication device.
  • the communication device includes a processor, a memory, and a computer program stored on the memory and executable on the processor.
  • the communication device is a first client, when the computer program is executed by the processor, the message processing method as described in the first aspect is implemented.
  • the communication device is a second client, when the computer program is executed by the processor, the message processing method as described in the second aspect is implemented.
  • Processing method when the communication device is a server, when the computer program is executed by the processor, the message processing method as described in the third aspect is implemented.
  • An eighth aspect of the embodiments of the present disclosure provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program When the computer program is executed by a processor, the computer program implements the first aspect, the second aspect, or the third aspect. The message processing method described.
  • a ninth aspect of the embodiments of the present disclosure provides a computer program product, wherein the computer program product includes a computer program.
  • the processor is caused to execute the computer program to implement the following steps: The message processing method described in the first aspect, the second aspect or the third aspect.
  • a tenth aspect of the embodiment of the present disclosure provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run program instructions to implement the first aspect and the second aspect. Or the message processing method described in the third aspect.
  • An eleventh aspect of an embodiment of the present disclosure provides a computer program, including: instructions that, when executed by a processor, cause the processor to perform as described in the first aspect, the second aspect, or the third aspect. message processing method.
  • Figure 1 is a schematic flowchart of a message processing method provided by an embodiment of the present disclosure
  • Figure 2 is one of the structural block diagrams of a message processing device provided by an embodiment of the present disclosure
  • Figure 3 is the second structural block diagram of the message processing device provided by an embodiment of the present disclosure.
  • Figure 4 is the third structural block diagram of the message processing device provided by the embodiment of the present disclosure.
  • Figure 5 is a structural block diagram of a communication device provided by an embodiment of the present disclosure.
  • first, second, etc. in the description and claims of the present disclosure are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that embodiments of the present disclosure can be practiced in sequences other than those illustrated or described herein, and that "first,” “second,” etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • the inviting party has a 20s invitation countdown logic. Specifically, within 20s after sending the invitation message (invite), the user cannot invite other users to mic. If 20s If a reply message (reply) from the invited party is received within 20 seconds, the invitation countdown will be cancelled, and if the reply message is to accept the invitation, a live broadcast room connection will be established with the invited party; if no reply from the invited party is received within 20s message, it is considered that the invitation has timed out. The inviting party will call the cancel (cancel) interface to notify the server. The server will also send a cancellation message to the invited party, and then the invited party will close the invited pop-up window. The invited party has a 10s acceptance countdown logic. Specifically, if the user clicks Agree or Deny within 10s after receiving the invitation message, a reply request will be sent directly. If no response is made within 10s, the invitation will be automatically rejected.
  • the reply message can reach the inviting party before the 20s invitation countdown times out. But for the remaining 5% of users, when the invitation message reaches the invited party, the invitation message may have timed out or is about to time out. At this time, if you use If the user accepts the invitation before the 10-second acceptance countdown times out, the reply message cannot reach the inviting party before the 20-second invitation countdown times out, which will cause the live broadcast room to fail to connect to the microphone, affecting the user experience.
  • the inviting party (Client A) is set to wait for up to 20s (that is, after the invitation message is sent, the invitation message is valid within 20s from the moment the invitation message is sent, and the invitation message becomes invalid after 20s). If the invitee is not received within 20s ( If the user device B) responds, the live broadcast room connection will be directly canceled due to the invalid invitation message. Therefore, there is a situation where the invited party sends a reply message to the inviting party after receiving the invitation message. However, before the reply message reaches the inviting party, the inviting party cancels the live broadcast room connection due to the invalidation of the invitation message, thus causing the live broadcast room to The connection was not successfully established, which degrades the user experience of the invited party.
  • the related technology has a long delay in the transmission process of the invitation message and/or the reply message, which leads to the failure to successfully establish the live broadcast room continuous microphone invitation when the invited party agrees to the live broadcast room continuous microphone invitation, and the user experience is poor. Bad question.
  • the target message sent by the server can be received; based on the time information carried by the target message, the remaining valid duration corresponding to the invitation message can be obtained; in the case that the remaining valid duration is greater than or equal to the first duration threshold , the invitation message is displayed; when the remaining validity period is less than the first duration threshold, the invitation message is ignored. That is, it can be determined whether to display the invitation message or ignore the invitation message based on the remaining valid time corresponding to the invitation message.
  • the invitation message when the invitation message is invalid or will be invalid (the remaining valid time is less than the first duration threshold), even if the invited user agrees to the live broadcast room Even if the reply message cannot reach the inviting party within the validity period of the invitation message, it will not be possible to connect to the live broadcast room. If the invitation message is successful, the invitation message will be ignored, that is, the invitation message will not be displayed, so that the invitation message that is about to be invalid can not be disturbed.
  • the user's effect is that when the remaining validity period of the invitation message is greater than or equal to the first duration threshold, that is, when the reply message can reach the inviting party within the validity period of the invitation message, the invitation message is displayed so that the user can determine whether to use the invitation message based on the invitation message. Agree to connect microphones in the live broadcast room, which can improve user experience.
  • the first client and the second client can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, a personal computer (PC), a television (television, TV) and other electronic equipment.
  • the first client is the inviter client
  • the second client is the inviter client.
  • an embodiment of the present disclosure provides a message processing method, which may include the following steps 101 Go to step 107.
  • the second client sends an invitation message to the server.
  • the invitation message is used to instruct the second client to invite the first client to establish a live broadcast room connection.
  • the server receives the invitation message.
  • the server sends the target message to the first client according to the invitation message.
  • the target message may be an invitation message, and the target message may also be a message generated by the server based on the invitation message.
  • the server generates a target message based on the invitation message, and sends the target message to the first client.
  • the target message is used by the first client to obtain the remaining valid duration corresponding to the invitation message based on the time information carried in the target message, and display the invitation message when the remaining valid duration is greater than or equal to the first duration threshold, If the remaining valid period is less than the first period threshold, the invitation message is ignored.
  • the time information may be generated by the second client based on the moment when the second client sends the invitation message and the total validity period of the invitation message.
  • the time information may also be generated by the server based on the total validity period of the invitation message. The specifics can be determined according to the actual situation and are not limited here.
  • the time information may be generated by the server based on the moment when the second client sends the invitation message and the total validity period of the invitation message, or it may be The server generates it based on the moment when the server receives the invitation message and the total validity period of the invitation message. It can also be generated by the server based on the moment when the server receives the invitation message and the total validity period of the invitation message, as well as the moment when the server sends the target message. It can also be generated by the server. It can be generated by the server based on other information. The details can be determined according to the actual situation and are not limited here.
  • the total validity period of the invitation message can be carried by the invitation message, or it can be a preset standard duration.
  • the specific duration can be determined according to the actual situation, and is not limited here.
  • the first client receives the target message sent by the server.
  • the target message includes: an invitation message used to instruct the second client to invite the first client to establish a live broadcast room connection.
  • the first client obtains the remaining valid time corresponding to the invitation message based on the time information carried in the target message.
  • the first client displays the invitation message and sends a reply message according to the invitation message.
  • the reply message is used to indicate whether to agree to establish a live broadcast room connection with the second client.
  • the first duration threshold can be determined according to actual conditions and is not limited here.
  • the first duration threshold may be half of the total valid duration of the invitation message, or one quarter of the total valid duration, etc.
  • the total valid duration is 20s
  • the first duration threshold is 5s.
  • the reply message may be a hypertext transfer protocol (hyper text transfer protocol, http) reply message, a real-time communication framework (real-time communication, rtc) reply message, or other forms of reply messages.
  • the specifics can be determined according to the actual situation and are not limited here.
  • the transmission speed of RTC reply messages is usually faster, so sending RTC reply messages can further improve the success rate of live broadcast room connection and improve user experience.
  • http reply messages and rtc reply messages can be sent separately. The two complement each other and further ensure that the live broadcast room can connect to the microphone successfully.
  • the first client ignores the invitation message when the remaining valid period is less than the first period threshold.
  • whether to display the invitation message or ignore the invitation message can be determined based on the remaining validity period corresponding to the invitation message. In this way, when the invitation message is invalid or is about to be invalid (the remaining validity period is less than the first duration threshold), even if the invited user agrees When connecting to the live broadcast room, the reply message cannot reach the inviting party within the validity period of the invitation message, resulting in failure. When the live broadcast room connects to the microphone successfully, the invitation message is ignored, that is, the invitation message is not displayed, and the invitation message that is about to be invalid can be realized.
  • the effect of not disturbing the user is to display the invitation message when the remaining validity of the invitation message is greater than or equal to the first duration threshold, that is, when the reply message can reach the inviting party within the validity time of the invitation message, so that the user can follow the invitation message Determine whether you agree to connect to the microphone in the live broadcast room, which can improve the user experience.
  • the time information includes the expiration time of the invitation message and the first sending time of the target message sent by the server; the above step 105 can be implemented specifically through the following step 105a.
  • the expiration time is obtained by the server based on the total validity period of the invitation message and the first reception time when the server receives the invitation message.
  • the first sending time is the time when the server sends the target message to the first client.
  • the remaining validity period may be the first difference between the failure time and the first transmission time when the server sends the target message, or it may be the first difference (ie, the failure time and the first transmission time when the server sends the target message).
  • the difference between the time) and the first preset duration can also be the product of the first difference and the preset value.
  • the preset value is a value greater than 0 and less than 1, which can be determined according to the actual situation.
  • the transmission delay is mainly caused by the server processing the message after receiving it and waiting for the message to be sent.
  • the remaining valid time is less than The first duration threshold, therefore, the remaining valid duration can be the first of the expiration time and the first sending time. difference.
  • the remaining effective time is calculated based on the server's time. In this way, the remaining effective time can be avoided due to the inconsistency in time points (time standards adopted) between the first client and the second client. Inaccurate calculation issues.
  • step 105a may be implemented through the following step 105a1.
  • the first preset duration can be determined according to actual conditions and is not limited here.
  • the remaining valid time is the difference between the first difference (ie, the difference between the failure time and the first sending time when the server sends the target message) and the first preset time length.
  • the first preset duration is a statistically average duration required from the server sending the first message to the first client to the first client receiving the first message.
  • the first preset duration can be updated periodically, thus ensuring the accuracy of the first preset duration.
  • the first message may be any message transmitted between the first client and the server, or may be a message of the same type as the above-mentioned target message transmitted between the first client and the server.
  • the server includes a business service module for processing business and a messaging module for sending and receiving messages (such as an Instant Messaging module).
  • the above-mentioned first sending time is the time when the messaging module sends the target message.
  • the above-mentioned first preset duration is the average duration required from the message transceiving module to send the first message to the first client to receive the first message under statistical historical circumstances. Therefore, it also indicates that the message transceiving module sends the target message to the first client. The amount of time it takes for a client to receive the target message.
  • the time from the message transceiver module sending the first message (target message) to the first client receiving the first message (target message) is generally short, usually a few hundred milliseconds, it can be ignored. In other words, the first duration threshold is relatively small and has little impact on the calculation of the remaining effective duration.
  • the remaining effective time is determined based on the failure time, the first sending time and the first preset time length, which can ensure that the calculated remaining effective time is more accurate, thereby improving the success probability of continuous microphone connection in the live broadcast room and improving user experience.
  • the failure time is obtained by the server based on the total valid time, the first receiving time and the second preset time.
  • the second preset time is statistically sent from the second client to the server. message, the average time it takes for the server to receive the second message.
  • the second message may be any message transmitted between the second client and the server, or may be a message of the same type as the above-mentioned invitation message transmitted between the second client and the server.
  • the total validity period may be fixed (preset standard duration) or dynamically configured (determined by the second client based on the actual situation and carried in the invitation message), which is determined based on the actual situation and is not specified here. Make limitations.
  • the failure time can be the sum of the total valid time and the first receiving time, and the failure time can also be the sum of the total valid time and the first receiving time, and the difference between the total valid time and the second preset time.
  • the above-mentioned step 103 can be specifically implemented through the following steps 108 to 109.
  • the server determines the expiration time based on the total validity period and the first receiving time.
  • the server sends the target message to the first client based on the invitation message, the expiration time and the first sending time.
  • the server calculates the expiration time, which can avoid the problem of inaccurate calculation of the remaining valid time due to inconsistent time points between the first client and the second client.
  • the failure moment may be the sum of the first reception moment and the total valid duration, and the failure moment may also be the sum of the first reception moment and the total valid duration, and then the difference from the second duration threshold.
  • the above step 109 may be that the server generates a target message based on the invitation message, the expiration time and the first sending time, and then the server sends the target message to the first client.
  • the above step 109 can also be replaced by the server sending the target message to the first client based on the invitation message and the expiration time, or it can also be replaced by the server sending the target message to the first client based on the invitation message and other information.
  • the specifics can be determined according to the actual situation and are not limited here.
  • step 108 can be specifically implemented through the following step 108a.
  • the server calculates the failure time based on the total valid time, the first receiving time and the second preset time.
  • the second preset duration can be determined according to actual conditions and is not limited here.
  • the second preset duration can be updated periodically, thus ensuring the accuracy of the second preset duration.
  • failure time is the sum of the first reception time and the total valid duration, and then the sum is subtracted from the second duration threshold.
  • the server includes a business service module for processing business and a messaging module for sending and receiving messages (such as an Instant Messaging module).
  • the above-mentioned first sending time is the time when the messaging module sends the target message.
  • the above-mentioned second preset duration is the average duration required from the second client to send the second message to the message transceiver module to receive the second message under statistical historical circumstances. Therefore, it also indicates that the second client sends the invitation message to The length of time it takes for the server to receive the invitation message.
  • the time from the second client sending the second message (invitation message) to the message transceiver module receiving the second message (invitation message) is generally short, usually a few hundred milliseconds, it can be ignored. In other words, the second duration threshold is relatively small and has little impact on the calculation of the remaining effective duration.
  • the failure time is calculated based on the total effective time, the first reception time and the second preset time, which can ensure that the calculated failure time is more accurate, thereby improving the success probability of continuous microphone connection in the live broadcast room and improving user experience.
  • the total validity period may be pre-stored in the server or carried in the invitation message.
  • the invitation message carries the total validity period of the invitation message; wherein, the invitation message is used for the server to send a target message to the first client according to the invitation message, and the target message is used for the first client.
  • the client Based on the time information carried in the target message, the client obtains the remaining valid duration corresponding to the invitation message, and displays the invitation message when the remaining valid duration is greater than or equal to the first duration threshold, and displays the invitation message when the remaining valid duration is less than the first duration threshold. If the duration threshold is exceeded, the invitation message will be ignored.
  • the time information includes the expiration time obtained by the server based on the total validity period and the first reception time of receiving the invitation message.
  • the invitation message carries the total valid time, which can ensure the accuracy of the total valid time.
  • the remaining valid time may be the time between the time when the first client receives the invitation message and the time when the invitation message expires, that is, the time between the time when the invitation message expires and the time when the first client receives the invitation message. difference.
  • the expiration time can be calculated by the second client based on the sending time of the invitation message and the total validity period of the invitation message, and the expiration time is carried in the invitation message; the expiration time can also be calculated by the server based on the time of receiving the invitation message and the invitation.
  • the total validity period of the message is calculated or calculated by the server based on the time when the invitation message is received, the second preset duration and the total validity period of the invitation message; the expiration time can also be calculated by the first client based on the sending time of the invitation message and the invitation message.
  • the total validity period of the invitation message is calculated. At this time, the sending time of the invitation message is carried in the invitation message.
  • the total validity period of the invitation message can be stored in the first client or carried in the invitation message.
  • the time information may include the total validity period of the invitation message, the first receiving moment when the server receives the invitation message, and the first sending moment when the server sends the target message. Furthermore, when the first client receives After the target message is received, the remaining valid time is determined based on the total valid time, the first receiving time and the first sending time.
  • the time information may include the total valid duration of the invitation message, the first receiving moment when the server receives the invitation message, the first sending moment when the server sends the target message and the first duration threshold, and then the first After receiving the target message, the client determines the remaining valid duration based on the total valid duration, the first receiving time, the first sending time and the first duration threshold.
  • the time information may include the total valid duration of the invitation message, the first receiving moment when the server receives the invitation message, the first sending moment when the server sends the target message, the first duration threshold and the second duration. threshold, and then after receiving the target message, the first client will The sending time and the first duration threshold and the second duration threshold determine the remaining valid duration.
  • the message processing method provided by the embodiment of the present disclosure may further include the following step 110.
  • the expiration reminder message is used to indicate that the invitation message expires after the target duration.
  • the target duration can be determined based on the actual situation and is not limited here.
  • the target duration is less than or equal to the remaining valid duration.
  • the user can be effectively prompted to promptly determine whether to establish a live broadcast room connection with the second client based on the invitation message, and trigger the first client to send a reply message (that is, by reducing the user's reaction time, improving the probability that the reply message can reach the invited party before the invitation message expires), which in turn can improve the success rate of the live broadcast room.
  • the target duration is the second duration threshold, and the first duration threshold is less than the second duration threshold; or when the remaining valid time is greater than or equal to If the first duration threshold is less than the second duration threshold, the target duration is the remaining effective duration.
  • the second duration threshold can be determined according to actual conditions and is not limited here.
  • the total valid duration is 20s
  • the first duration threshold is 5s
  • the second duration threshold is 10s. If the remaining valid time is less than 5s, the first client ignores the invitation message and does not process the invitation message; if the remaining valid time is greater than or equal to 5s and less than 10s, the first client displays the invitation message and displays the invitation after the remaining valid time. The message expires; if the remaining validity period is greater than or equal to 10s, the first client displays the invitation message and displays that the invitation message expires after 10s.
  • the user can be better prompted, and the user's reaction time can be reduced through the prompt, thereby increasing the probability that the reply message can reach the invited party before the invitation message expires, and ultimately improving the live broadcast.
  • the success rate of intermittent continuous wheat is the success rate of intermittent continuous wheat.
  • the above step 110 may be replaced by: displaying an expiration reminder message when the remaining valid period is greater than or equal to the first duration threshold and less than or equal to the third duration threshold. In this way, the expiration reminder message can be displayed when the remaining validity period is short, and there is no need to display the expiration reminder message when the remaining validity period is sufficient.
  • the first client can update the remaining valid time period as time goes by. Specifically, the first client can update the remaining valid time period according to the remaining valid time period, the time when the target message is received, and the current time.
  • Validity duration (the remaining valid duration after the update is the difference between the remaining valid duration and the second difference, and the second difference is the difference between the current moment and the moment when the target message is received), when the remaining valid duration after the update is greater than or equal to If the first duration threshold is less than or equal to the third duration threshold, an expiration reminder message is displayed. In this way, the invalidation reminder message can be displayed when the remaining valid time after the update is short. When the remaining valid time is sufficient, there is no need to display the invalidation reminder message. This has the effect of reminding the user in a timely manner without disturbing the user too much.
  • FIG. 2 is a structural block diagram of a message processing device according to an embodiment of the present disclosure. As shown in Figure 2, it includes: a receiving module 201, an acquisition module 202 and a processing module 203.
  • the receiving module 201 is configured to receive a target message sent by the server.
  • the target message includes: an invitation message used to instruct the second client to invite the first client to establish a live broadcast room connection.
  • the obtaining module 202 is configured to obtain the remaining valid time corresponding to the invitation message based on the time information carried in the target message received by the receiving module 201.
  • the processing module 203 is configured to display the invitation message when the remaining valid period obtained by the acquisition module 202 is greater than or equal to the first duration threshold, and to send a reply message according to the invitation message, where the reply message is used to indicate Whether to agree to establish a live broadcast room connection with the second client, and if the remaining valid time obtained by the acquisition module 202 is less than the first time duration threshold, ignore the invitation message.
  • the time information includes the expiration time of the invitation message and the first sending time of the target message sent by the server; the acquisition module 202 is specifically configured to determine the remaining time based on the expiration time and the first sending time. Validity duration; wherein, the expiration time is obtained by the server based on the total validity duration of the invitation message and the first reception moment when the server receives the invitation message.
  • the acquisition module 202 is specifically configured to determine the remaining valid time period based on the expiration time, the first sending time and a first preset time period.
  • the first preset time period is the statistical number of requests from the server to the third time period. The average time required from when a client sends the first message to when the first client receives the first message.
  • the failure time is obtained by the server based on the total valid time, the first receiving time and the second preset time.
  • the second preset time is statistically sent from the second client to the server. message, the average time it takes for the server to receive the second message.
  • the processing module 203 is also configured to display an expiration reminder message when the remaining valid duration is greater than or equal to the first duration threshold.
  • the expiration reminder message is used to indicate that the invitation message expires after the target duration. .
  • the target duration is the second duration threshold, and the first duration threshold is less than the second duration threshold; when the remaining valid time is greater than or equal to the second duration threshold, If the first duration threshold is less than the second duration threshold, the target duration is the remaining effective duration.
  • each module can implement the message processing method provided by the above method embodiment, and can achieve similar results.
  • the same technical effects are not repeated here to avoid repetition.
  • the invitation message carries the total validity period of the invitation message.
  • the time information includes an expiration time obtained by the server based on the total validity period and the first reception time of receiving the invitation message.
  • Figure 4 is a structural block diagram of a message processing device according to an embodiment of the present disclosure. As shown in Figure 4, it includes: a receiving module 401 and a sending module 402.
  • the receiving module 401 is used to receive an invitation message sent by the second client.
  • the invitation message is used to instruct the second client to invite the first client to establish a live broadcast room connection.
  • the sending module 402 is configured to send a target message to the first client based on the invitation message received by the receiving module 401.
  • the target message is used for the first client to obtain the remaining information corresponding to the invitation message based on the time information carried by the target message.
  • Valid duration and if the remaining valid duration is greater than or equal to the first duration threshold, the invitation message is displayed, and if the remaining valid duration is less than the first duration threshold, the invitation message is ignored.
  • the time information includes the expiration time of the invitation message and the first sending time of the target message sent by the server; the sending module is specifically configured to based on the total validity period of the invitation message and receipt of the invitation message. the first receiving time, determine the expiration time, and send the target message to the first client according to the invitation message, the expiration time and the first sending time.
  • the failure time is obtained by the server based on the total valid time, the first receiving time and the second preset time.
  • the second preset time is statistically sent from the second client to the server. message, the average time it takes for the server to receive the second message.
  • each module can implement the message processing method provided in the above method embodiment, and can achieve the same technical effect. To avoid duplication, details will not be described here.
  • FIG. 5 is a schematic structural diagram of a communication device provided by an embodiment of the present disclosure. It is used to illustrate a communication device that implements any message processing method in the embodiment of the present disclosure. It should not be understood as a specific limitation of the embodiment of the present disclosure.
  • the communication device 500 may include a processor (eg, central processing unit, graphics processor, etc.) 501, which may be loaded into a random access memory according to a program stored in a read-only memory (ROM) 502 or from a storage device 508.
  • the program in the memory (RAM) 503 executes various appropriate actions and processes.
  • various programs and data required for the operation of the communication device 500 are also stored.
  • the processor 501, ROM 502 and RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 509, or from storage device 508, or from ROM 502.
  • the processor 501 When the computer program is executed by the processor 501, the functions defined in any message processing method provided by the embodiments of the present disclosure can be executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmd read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • the computer-readable signal medium may also be Any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Data communications e.g., communications network
  • communications networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or developed in the future network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned communication device; it may also exist separately without being assembled into the communication device.
  • the computer-readable medium carries one or more programs.
  • the communication device When the one or more programs are executed by the communication device (the communication device is the second client), the communication device: sends an invitation message to the server.
  • the invitation message It is used to instruct the second client to invite the first client to establish a live broadcast room connection; wherein, the invitation message is used for the server to send a target message to the first client according to the invitation message, and the target message is used for the first client to send a target message to the first client based on the target message.
  • the time information carried in the message is used to obtain the remaining valid duration corresponding to the invitation message, and when the remaining valid duration is greater than or equal to the first duration threshold, the invitation message is displayed. When the remaining valid duration is less than the first duration threshold, the invitation message is displayed. , ignore the invitation message.
  • the computer-readable medium carries one or more programs.
  • the communication device is a server
  • the communication device receives the invitation message sent by the second client, The invitation message is used to instruct the second client to invite the first client to establish a live broadcast room connection; according to the invitation message, a target message is sent to the first client, and the target message is used by the first client based on the time information carried in the target message. , obtain the remaining valid duration corresponding to the invitation message, and when the remaining valid duration is greater than or equal to the first duration threshold , the invitation message is displayed, and if the remaining validity period is less than the first duration threshold, the invitation message is ignored.
  • computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages, or a combination thereof, such as Java, Smalltalk, C++, and also conventional procedural programming languages such as the "C" language or similar programming languages.
  • the program code may execute entirely on the computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as an Internet service provider) through the Internet. ).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as an Internet service provider
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • the units involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of a unit does not constitute a limitation on the unit itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLD Complex Programmable Logical device
  • computer-readable media may be tangible media that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • Computer-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • Computer readable storage media would include electrical connections based on one or more wires, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable Except for programmable read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • optical storage devices magnetic storage devices, or any suitable combination of the above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本公开涉及一种消息处理方法、装置、通信设备、存储介质及程序产品。该方法包括:接收服务器发送的目标消息,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息;基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长;在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息,该回复消息用于指示是否同意与第二客户端建立直播间连麦;和在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。

Description

消息处理方法、装置、通信设备、存储介质及程序产品
相关申请的交叉引用
本申请是以申请号为202210689078.3,申请日为2022年6月16日的中国申请为基础,并主张其优先权,该中国申请的公开内容在此作为整体引入本申请中。
技术领域
本公开涉及直播技术领域,尤其涉及一种消息处理方法、装置、通信设备、存储介质及程序产品。
背景技术
目前,随着直播技术的发展,出现了让两个主播进行连麦,使画面和声音都面向双方直播间粉丝的直播形态,以下称为直播间连麦。直播间连麦的建立过程可以包括A直播间对应的客户端A向B直播间对应的客户端B发送用于指示建立直播间连麦的邀请消息,客户端B接收到该邀请消息之后,向客户端A发送用于指示同意建立直播间连麦的回复消息,客户端A接收到该回复消息之后,与客户端B建立直播间连麦。
发明内容
本公开实施例的第一方面,提供一种消息处理方法,应用于第一客户端,该方法包括:接收服务器发送的目标消息,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息;基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长;在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息,该回复消息用于指示是否同意与第二客户端建立直播间连麦;在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第二方面,提供一种消息处理方法,应用于第二客户端,该方法包括:向服务器发送邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;其中,该邀请消息用于该服务器根据该邀请消息向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应 的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第三方面,提供一种消息处理方法,应用于服务器,该方法包括:接收第二客户端发送的邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;根据该邀请消息,向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第四方面,提供一种消息处理装置,该装置包括:接收模块、获取模块和处理模块;该接收模块,用于接收服务器发送的目标消息,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息;该获取模块,用于基于该接收模块接收的目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长;该处理模块,用于在该获取模块获取的该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息,该回复消息用于指示是否同意与第二客户端建立直播间连麦;在该获取模块获取的该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第五方面,提供一种消息处理装置,该装置包括:该发送模块,用于向服务器发送邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;其中,该邀请消息用于该服务器根据该邀请消息向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第六方面,提供一种消息处理装置,该装置包括:接收模块和发送模块;该接收模块,用于接收第二客户端发送的邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;该发送模块,用于根据该接收模块接收的该邀请消息,向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
本公开实施例的第七方面,提供一种通信设备,该通信设备包括处理器、存储器及存储在该存储器上并可在该处理器上运行的计算机程序,该通信设备为第一客户端时,该计算机程序被该处理器执行时实现如第一方面所述的消息处理方法,该通信设备为第二客户端时,该计算机程序被该处理器执行时实现如第二方面所述的消息处理方法,该通信设备为服务器时,该计算机程序被该处理器执行时实现如第三方面所述的消息处理方法。
本公开实施例的第八方面,提供一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现如第一方面、第二方面或第三方面所述的消息处理方法。
本公开实施例的第九方面,提供了一种计算机程序产品,其中,该计算机程序产品包括计算机程序,当该计算机程序产品在处理器上运行时,使得处理器执行该计算机程序,实现如第一方面、第二方面或第三方面所述的消息处理方法。
本公开实施例的第十方面,提供了一种芯片,该芯片包括处理器和通信接口,该通信接口和该处理器耦合,该处理器用于运行程序指令,实现如第一方面、第二方面或第三方面所述的消息处理方法。
本公开实施例的第十一方面,提供了一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行如第一方面、第二方面或第三方面所述的消息处理方法。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的一种消息处理方法的流程示意图;
图2为本公开实施例提供的消息处理装置的结构框图之一;
图3为本公开实施例提供的消息处理装置的结构框图之二;
图4为本公开实施例提供的消息处理装置的结构框图之三;
图5为本公开实施例提供的一种通信设备的结构框图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
本公开的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
在相关技术中,在直播间连麦机制时,邀请方有一个20s的邀请倒计时逻辑,具体为在发出邀请消息(invite)后的20s内,该用户不能邀请其他的用户进行上麦,如果20s内收到了被邀请方的回复消息(reply),则取消邀请倒计时,并在回复消息为接收邀请的情况下,与被邀请方建立直播间连麦;如果20s内未收到被邀请方的回复消息,则认为本次连麦邀请超时了,邀请方会调用取消(cancel)接口通知服务端,服务端也会给被邀请方发送取消的消息,进而被邀请方关闭被邀请的弹窗。被邀请方有一个10s的接受倒计时逻辑,具体为在接收到邀请消息后的10s内若用户点击了同意或者拒绝,则直接发出回复请求,如果10s内未做出任何响应,则自动拒绝邀请。
然而,尤其在网络和设备环境复杂(例如海外网络和设备环境复杂)的场景下,很容易导致直播间消息到达时延高(例如,直播间消息在传输过程中需要通过中心机房,若中心机房与其他服务器的距离较大,则会造成直播间消息在传输过程产生较大时延),进而降低直播间连麦的成功率。
通过大数据统计,在网络和设备环境复杂场景下,对于95%的用户来说,邀请消息到达被邀请方时20s的倒计时还剩15s,只要被邀请方用户在10s的接受倒计时超时前接受邀请,回复消息都是可以在20s的邀请倒计时超时前到达邀请方的。但是对于其余的5%的用户来说,邀请消息到达被邀请方时,邀请消息可能已经超时或者即将超时,此时若用 户在10s的接受倒计时超时前接受邀请,则回复消息是无法在20s的邀请倒计时超时前到达邀请方的,进而导致直播间连麦失败,影响用户体验。
也就是说,在直播间连麦的建立过程中,由于邀请消息和回复消息的时效性较差,因此可能会在传输过程中产生较长的延时,而相关技术中的连麦机制中又设置了邀请方(客户端A)最多等待20s(即邀请消息在发出之后从发送邀请消息的时刻起,20s内邀请消息有效,20s后邀请消息失效),20s内如果未收到被邀请方(用户设备B)的回应,则因邀请消息失效直接取消直播间连麦。因此,存在一种情况,被邀请方接到邀请消息之后,向邀请方发送了回复消息,但在回复消息到达邀请方之前,邀请方因邀请消息失效取消了直播间连麦,进而使得直播间连麦未成功建立,降低被邀请方的用户体验。
如此,相关技术存在由于邀请消息和/或回复消息在传输过程中产生较长的延时,导致在被邀请方同意直播间连麦邀请的情况下未能成功建立直播间连麦,用户体验较差的问题。
鉴于此,本公开实施例中,可以通过接收服务器发送的目标消息;基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长;在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息;在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。即可以根据该邀请消息对应的剩余有效时长,确定是显示邀请消息还是忽略邀请消息,如此,在邀请消息已经无效或即将无效(剩余有效时长小于第一时长阈值),即使被邀请用户同意直播间连麦,也会因回复消息无法在邀请消息的有效时间内到达邀请方而导致无法直播间连麦成功的情况下,忽略邀请消息,即邀请消息不显示,可以实现即将无效的邀请消息不打扰用户的效果,在该邀请消息的剩余有效时大于或等于第一时长阈值,即回复消息可以在邀请消息的有效时间内到达邀请方的情况下,显示邀请消息,以便于用户根据邀请消息确定是否同意直播间连麦,进而可以提高用户体验。
本公开实施例中,第一客户端、第二客户端可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、个人计算机(personal computer,PC)、电视机(television,TV)等电子设备。其中,第一客户端为受邀方客户端,第二客户端为邀请方客户端。
下面结合附图,通过具体的实施例及其应用场景对本公开实施例提供的消息处理方法进行详细地说明。
如图1所示,本公开实施例提供一种消息处理方法,该方法可以包括下述的步骤101 至步骤107。
101、第二客户端向服务器发送邀请消息。
其中,邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦。
102、服务器接收该邀请消息。
103、服务器根据邀请消息,向第一客户端发送目标消息。
例如,目标消息可以为邀请消息,目标消息也可以为服务器根据邀请消息生成的消息。
在一些实施例中,服务器根据该邀请消息,生成目标消息,并向第一客户端发送目标消息。
其中,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
在一些实施例中,时间信息可以是第二客户端根据第二客户端发送邀请消息的时刻和邀请消息的总有效时长生成的,时间信息也可以是服务器根据邀请消息的总有效时长生成的,具体可以根据实际情况确定,此处不做限定。
在一些实施例中,若时间信息是服务器根据邀请消息的总有效时长生成的,则时间信息可以是服务器根据第二客户端发送邀请消息的时刻和邀请消息的总有效时长生成的,也可以是服务器根据服务器接收到邀请消息的时刻和邀请消息的总有效时长生成的,也可以是服务器根据服务器接收到邀请消息的时刻和邀请消息的总有效时长,以及服务器发送目标消息的时刻生成的,还可以是服务器基于其他信息生成的,具体可以根据实际情况确定,此处不做限定。
其中,邀请消息的总有效时长可以是邀请消息携带的,也可以是预设的标准时长,具体可以根据实际情况确定,此处不做限定。
104、第一客户端接收服务器发送的目标消息。
其中,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息。
105、第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长。
106、第一客户端在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息。
其中,该回复消息用于指示是否同意与第二客户端建立直播间连麦。
其中,第一时长阈值可以根据实际情况确定,此处不做限定。示例性的,第一时长阈值可以为邀请消息的总有效时长的一半,或总有效时长的四分之一等。例如,总有效时长为20s,第一时长阈值为5s。
在一些实施例中,回复消息可以为超文本传输协议(hyper text transfer protocol,http)回复消息,也可以为实时通讯框架(real-time communication,rtc)回复消息,还可以为其他形式的回复消息,具体可以根据实际情况确定,此处不做限定。其中,通常情况下rtc回复消息的传输速度较快,因此发送rtc回复消息,可以进一步提高直播间连麦的成功率,提高用户体验。而且可以分别发送http回复消息和rtc回复消息,二者互补,进一步保证直播间连麦能够成功。
107、第一客户端在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
可以理解,可以根据该邀请消息对应的剩余有效时长,确定是显示邀请消息还是忽略邀请消息,如此,在邀请消息已经无效或即将无效(剩余有效时长小于第一时长阈值),即使被邀请用户同意直播间连麦,也会因回复消息无法在邀请消息的有效时间内到达邀请方而导致无法直播间连麦成功的情况下,忽略邀请消息,即邀请消息不显示,可以实现即将无效的邀请消息不打扰用户的效果,在该邀请消息的剩余有效时大于或等于第一时长阈值,即回复消息可以在邀请消息的有效时间内到达邀请方的情况下,显示邀请消息,以便于用户根据邀请消息确定是否同意直播间连麦,进而可以提高用户体验。
在一些实施例中,该时间信息包括该邀请消息的失效时刻和该服务器发送该目标消息的第一发送时刻;上述步骤105具体可以通过下述步骤105a实现。
105a、基于该失效时刻和第一发送时刻,确定该剩余有效时长。
其中,该失效时刻为该服务器基于该邀请消息的总有效时长和该服务器接收到该邀请消息的第一接收时刻得到的。
其中,第一发送时刻为该服务器向第一客户端发送目标消息的时刻。
可以理解,剩余有效时长可以为失效时刻和该服务器发送该目标消息的第一发送时刻的第一差值,也可以为第一差值(即失效时刻和该服务器发送该目标消息的第一发送时刻的差值)与第一预设时长的差值,也可以为第一差值与预设值的乘积,预设值为大于0且小于1的值,具体可以根据实际情况确定。
可以理解,因为在邀请消息的传输过程中,主要是在服务器收到消息之后对消息进行处理以及等待消息发送的过程中造成传输延时,导致邀请消息到达第一客户端之后,剩余有效时长小于第一时长阈值,因此,剩余有效时长可以为失效时刻和第一发送时刻的第一 差值。
本公开实施例中,以服务器的时间为基准,计算剩余有效时长,如此,可以避免因第一客户端和第二客户端之间的时间点(采用的时间标准)不统一,导致剩余有效时长计算不准确的问题。
在一些实施例中,上述步骤105a具体可以通过下述步骤105a1实现。
105a1、根据该失效时刻、第一发送时刻和第一预设时长,确定该剩余有效时长。
其中,第一预设时长可以根据实际情况确定,此处不做限定。
可以理解,剩余有效时长为第一差值(即失效时刻和该服务器发送该目标消息的第一发送时刻的差值)与第一预设时长的差值。
其中,第一预设时长为统计的从所述服务器向第一客户端发送第一消息,到第一客户端接收到第一消息所需的平均时长。第一预设时长可以周期性地更新,如此可以保证第一预设时长的准确性。
其中,第一消息可以为第一客户端与服务器之间传输的任意消息,也可以是第一客户端与服务器之间传输的上述目标消息同类型的消息。
可以理解,在服务器中包括用于处理业务的业务服务模块和用于收发消息的消息收发模块(如即时通讯(Instant Messaging)模块),上述第一发送时刻是消息收发模块发送目标消息的时刻,上述第一预设时长为统计的历史情况下从消息收发模块发送第一消息到第一客户端接收到第一消息所需的平均时长,因此也就指示了从消息收发模块发送目标消息到第一客户端接收到目标消息所需的时长。
需要说明的是,因为从消息收发模块发送第一消息(目标消息)到第一客户端接收到第一消息(目标消息)一般需要的时间较短,通常为几百毫秒,因此可以忽略不计,也就是说第一时长阈值比较小,对剩余有效时长的计算影响不大。
本公开实施例中,根据失效时刻、第一发送时刻和第一预设时长,确定该剩余有效时长,可以保证计算得到的剩余有效时长更准确,从而可以提高直播间连麦的成功概率,提高用户体验。
在一些实施例中,该失效时刻为该服务器根据该总有效时长、第一接收时刻和第二预设时长得到的,第二预设时长为统计的从第二客户端向该服务器发送第二消息,到该服务器接收到该第二消息所需的平均时长。
其中,第二消息可以为第二客户端与服务器之间传输的任意消息,也可以是第二客户端与服务器之间传输的上述邀请消息同类型的消息。
其中,总有效时长可以是固定(预设的标准时长)的,也可以是动态配置的(第二客户端根据实际情况确定的,携带在邀请消息中),具体根据实际情况确定,此处不做限定。
可以理解,该失效时刻可以为总有效时长和第一接收时刻之和,该失效时刻也可以为总有效时长和第一接收时刻之和,再与第二预设时长之差。
示例性地,在上述步骤102之后,上述步骤103具体可以通过下述的步骤108至步骤109实现。
108、服务器基于该总有效时长和第一接收时刻,确定失效时刻。
109、服务器根据邀请消息、失效时刻和第一发送时刻,向第一客户端发送目标消息。
本公开实施例中,通过服务器计算失效时刻,可以避免因第一客户端和第二客户端之间的时间点不统一,导致剩余有效时长计算不准确的问题。
在一些实施例中,失效时刻可以为第一接收时刻和总有效时长的和,失效时刻也可以是第一接收时刻和总有效时长的和,然后再与第二时长阈值的差值。
其中,上述步骤109具体可以为服务器基于邀请消息、失效时刻和第一发送时刻生成目标消息,然后服务器向第一客户端发送目标消息。
在一些实施例中,上述步骤109还可以替换为服务器基于邀请消息和失效时刻,向第一客户端发送目标消息,还可以替换为服务器基于邀请消息和其他信息,向第一客户端发送目标消息,具体可以根据实际情况确定,此处不做限定。
其中,上述步骤108具体可以通过下述步骤108a实现。
108a、服务器根据该总有效时长、第一接收时刻和第二预设时长,计算得到失效时刻。
其中,第二预设时长可以根据实际情况确定,此处不做限定。第二预设时长可以周期性地更新,如此可以保证第二预设时长的准确性。
可以理解,失效时刻为第一接收时刻与总有效时长的和,然后和再减去第二时长阈值。
可以理解,在服务器中包括用于处理业务的业务服务模块和用于收发消息的消息收发模块(如即时通讯(Instant Messaging)模块),上述第一发送时刻是消息收发模块发送目标消息的时刻,上述第二预设时长为统计的历史情况下从第二客户端发送第二消息到消息收发模块接收到第二消息所需的平均时长,因此也就指示了从第二客户端发送邀请消息到服务器接收到邀请消息所需的时长。
需要说明的是,因为从第二客户端发送第二消息(邀请消息)到消息收发模块接收到第二消息(邀请消息)一般需要的时间较短,通常为几百毫秒,因此可以忽略不计,也就是说第二时长阈值比较小,对剩余有效时长的计算影响不大。
本公开实施例中,根据总有效时长、第一接收时刻和第二预设时长计算失效时刻,可以保证计算得到的失效时刻更准确,从而可以提高直播间连麦的成功概率,提高用户体验。
在一些实施例中,总有效时长可以为服务器中预先存储的,也可以为邀请消息携带的。
示例性地,在上述步骤101中,邀请消息中携带该邀请消息的总有效时长;其中,该邀请消息用于该服务器根据该邀请消息向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。该时间信息包括该服务器基于该总有效时长和接收到该邀请消息的第一接收时刻得到的失效时刻。
本公开实施例中,邀请消息中携带总有效时长,可以保证总有效时长的准确性。
在一些实施例中,剩余有效时长可以为第一客户端接收到邀请消息的时刻与邀请消息的失效时刻之间的时长,即邀请消息的失效时刻与第一客户端接收到邀请消息的时刻的差值。其中,失效时刻可以是第二客户端根据邀请消息的发送时刻和邀请消息的总有效时长计算的,且失效时刻携带在邀请消息中;失效时刻也可以是服务器基于接收到邀请消息的时刻和邀请消息的总有效时长计算的或者服务器根据接收到邀请消息的时刻、第二预设时长和邀请消息的总有效时长计算的;失效时刻也可以是第一客户端根据邀请消息的发送时刻和邀请消息的总有效时长计算的,此时邀请消息的发送时刻携带在邀请消息中,邀请消息的总有效时长可以存储在第一客户端中或携带在邀请消息中。
本公开实施例中,提供了多种计算剩余有效时长的方式,具体可以根据实际情况确定,此处不做限定。
在一些实施例中,该时间信息可以包括该邀请消息的总有效时长、服务器接收该邀请消息的第一接收时刻和该服务器发送该目标消息的第一发送时刻,进而,第一客户端在接收到目标消息之后,基于总有效时长、第一接收时刻和第一发送时刻,确定剩余有效时长。
在一些实施例中,该时间信息可以包括该邀请消息的总有效时长、服务器接收该邀请消息的第一接收时刻、该服务器发送该目标消息的第一发送时刻和第一时长阈值,进而第一客户端在接收到目标消息之后,基于总有效时长、第一接收时刻、第一发送时刻和第一时长阈值,确定剩余有效时长。
在一些实施例中,该时间信息可以包括该邀请消息的总有效时长、服务器接收该邀请消息的第一接收时刻、该服务器发送该目标消息的第一发送时刻、第一时长阈值和第二时长阈值,进而第一客户端在接收到目标消息之后,基于总有效时长、第一接收时刻、第一 发送时刻和第一时长阈值和第二时长阈值,确定剩余有效时长。
其中,对总有效时长、第一接收时刻、第一发送时刻和第一时长阈值和第二时长阈值,剩余有效时长等的描述可以参考上述相关描述,此处不再赘述。
在一些实施例中,在上述步骤105之后,本公开实施例提供的消息处理方法还可以包括下述的步骤110。
110、在该剩余有效时长大于或等于第一时长阈值的情况下,显示失效提醒消息。
其中,该失效提醒消息用于指示在目标时长之后该邀请消息失效。目标时长可以根据实际情况确定,此处不做限定。目标时长小于或等于剩余有效时长。
本公开实施例中,通过显示失效提醒消息,可以有效提示用户及时根据邀请消息,确定是否与第二客户端建立直播间连麦,并触发第一客户端发送回复消息(即通过降低用户的反应时间,提高回复消息可以在邀请消息的失效之前,到达被邀请方的概率),进而可以提高直播间连麦的成功率。
在一些实施例中,在该剩余有效时长大于或等于第二时长阈值的情况下,该目标时长为第二时长阈值,第一时长阈值小于第二时长阈值;或者在该剩余有效时长大于或等于第一时长阈值,且小于第二时长阈值的情况下,该目标时长为该剩余有效时长。
其中,第二时长阈值可以根据实际情况确定,此处不做限定。
示例性地,总有效时长为20s,第一时长阈值为5s,第二时长阈值为10s。若剩余有效时长小于5s,则第一客户端忽略邀请消息,不处理邀请消息;若剩余有效时长大于或等于5s,且小于10s,则第一客户端显示邀请消息,并显示剩余有效时长之后邀请消息失效;若剩余有效时长大于或等于10s,则第一客户端显示邀请消息,并显示10s之后邀请消息失效。
本公开实施例中,通过设置第二时长阈值可以更好地提示用户,通过提示可以降低用户的反应时间,进而提高回复消息可以在邀请消息的失效之前,到达被邀请方的概率,最终提高直播间连麦的成功率。
在一些实施例中,上述步骤110可以替换为:在该剩余有效时长大于或等于第一时长阈值,且小于或等于第三时长阈值的情况下,显示失效提醒消息。如此可以在剩余有效时长较短的情况下,显示失效提醒消息,在剩余有效时长比较充足的情况下,无需显示失效提醒消息。
在一些实施例中,第一客户端在确定剩余有效时长之后,可以随着时间的推移更新剩余有效时长,具体地可以根据剩余有效时长、接收目标消息的时刻和当前时刻,更新剩余 有效时长(更新后的剩余有效时长为剩余有效时长与第二差值的差值,第二差值为当前时刻与接收目标消息的时刻的差值),在更新后的剩余有效时长大于或等于第一时长阈值,且小于或等于第三时长阈值的情况下,显示失效提醒消息。如此可以在更新后的剩余有效时长较短的情况下显示失效提醒消息,在剩余有效时长比较充足的情况下,无需显示失效提醒消息,如此起到及时提醒用户又不过分打扰用户的效果。
图2为本公开实施例示出的一种消息处理装置的结构框图,如图2所示,包括:接收模块201、获取模块202和处理模块203。该接收模块201,用于接收服务器发送的目标消息,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息。该获取模块202,用于基于该接收模块201接收的目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长。该处理模块203,用于在该获取模块202获取的该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息,该回复消息用于指示是否同意与第二客户端建立直播间连麦,以及在该获取模块202获取的该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
在一些实施例中,该时间信息包括该邀请消息的失效时刻和该服务器发送该目标消息的第一发送时刻;该获取模块202,具体用于基于该失效时刻和第一发送时刻,确定该剩余有效时长;其中,该失效时刻为该服务器基于该邀请消息的总有效时长和该服务器接收到该邀请消息的第一接收时刻得到的。
在一些实施例中,该获取模块202,具体用于根据该失效时刻、第一发送时刻和第一预设时长,确定该剩余有效时长,第一预设时长为统计的从所述服务器向第一客户端发送第一消息,到第一客户端接收到第一消息所需的平均时长。
在一些实施例中,该失效时刻为该服务器根据该总有效时长、第一接收时刻和第二预设时长得到的,第二预设时长为统计的从第二客户端向该服务器发送第二消息,到该服务器接收到该第二消息所需的平均时长。
在一些实施例中,该处理模块203,还用于在该剩余有效时长大于或等于第一时长阈值的情况下,显示失效提醒消息,该失效提醒消息用于指示在目标时长之后该邀请消息失效。
在一些实施例中,在该剩余有效时长大于或等于第二时长阈值的情况下,该目标时长为第二时长阈值,第一时长阈值小于第二时长阈值;在该剩余有效时长大于或等于第一时长阈值,且小于第二时长阈值的情况下,该目标时长为该剩余有效时长。
本公开实施例中,各模块可以实现上述方法实施例提供的消息处理方法,且能达到相 同的技术效果,为避免重复,这里不再赘述。
图3为本公开实施例示出的一种消息处理装置的结构框图,如图3所示,包括:发送模块301。该发送模块301,用于向服务器发送邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;其中,该邀请消息用于该服务器根据该邀请消息向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
在一些实施例中,该邀请消息携带该邀请消息的总有效时长。
在一些实施例中,该时间信息包括该服务器基于该总有效时长和接收到该邀请消息的第一接收时刻得到的失效时刻。
本公开实施例中,各模块可以实现上述方法实施例提供的消息处理方法,且能达到相同的技术效果,为避免重复,这里不再赘述。
图4为本公开实施例示出的一种消息处理装置的结构框图,如图4所示,包括:接收模块401和发送模块402。该接收模块401,用于接收第二客户端发送的邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦。该发送模块402,用于根据该接收模块401接收的该邀请消息,向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
在一些实施例中,该时间信息包括该邀请消息的失效时刻和该服务器发送该目标消息的第一发送时刻;该发送模块,具体用于基于该邀请消息的总有效时长和接收到该邀请消息的第一接收时刻,确定该失效时刻,以及根据该邀请消息,该失效时刻和该第一发送时刻,向该第一客户端发送该目标消息。
在一些实施例中,该失效时刻为该服务器根据该总有效时长、第一接收时刻和第二预设时长得到的,第二预设时长为统计的从第二客户端向该服务器发送第二消息,到该服务器接收到该第二消息所需的平均时长。
本公开实施例中,各模块可以实现上述方法实施例提供的消息处理方法,且能达到相同的技术效果,为避免重复,这里不再赘述。
在本公开的一些实施例中,还提供了一种计算机程序,包括:指令,所述指令当由处理器执行时使所述处理器执行如前所述的消息处理方法。
图5为本公开实施例提供的一种通信设备的结构示意图,用于对实现本公开实施例中任意消息处理方法的通信设备进行示例性说明,不应理解为对本公开实施例的具体限定。
如图5所示,通信设备500可以包括处理器(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有通信设备500操作所需的各种程序和数据。处理器501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许通信设备500与其他设备进行无线或有线通信以交换数据。虽然示出了具有各种装置的通信设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理器501执行时,可以执行本公开实施例提供的任意消息处理方法中限定的功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是 计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务端可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述通信设备中所包含的;也可以是单独存在,而未装配入该通信设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该通信设备(通信设备为第一客户端)执行时,使得该通信设备:接收服务器发送的目标消息,目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息;基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长;在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,以根据该邀请消息,发送回复消息,该回复消息用于指示是否同意与第二客户端建立直播间连麦;在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该通信设备(通信设备为第二客户端)执行时,使得该通信设备:向服务器发送邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;其中,该邀请消息用于该服务器根据该邀请消息向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该通信设备(通信设备为服务器)执行时,使得该通信设备:接收第二客户端发送的邀请消息,该邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;根据该邀请消息,向第一客户端发送目标消息,目标消息用于第一客户端基于目标消息携带的时间信息,获取该邀请消息对应的剩余有效时长,并在该剩余有效时长大于或等于第一时长阈值的情况 下,显示该邀请消息,在该剩余有效时长小于第一时长阈值的情况下,忽略该邀请消息。
在本公开实施例中,可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言,诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在计算机上执行、部分地在计算机上执行、作为一个独立的软件包执行、部分在计算机上部分在远程计算机上执行、或者完全在远程计算机或服务端上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,计算机可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。计算机可读介质可以是计算机可读信号介质或计算机可读储存介质。计算机可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。计算机可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦 除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (21)

  1. 一种消息处理方法,应用于第一客户端,包括:
    接收服务器发送的目标消息,所述目标消息包括:用于指示第二客户端邀请所述第一客户端建立直播间连麦的邀请消息;
    基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长;
    在所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,以根据所述邀请消息,发送回复消息,所述回复消息用于指示是否同意与所述第二客户端建立直播间连麦;和
    在所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  2. 根据权利要求1所述的消息处理方法,其中,所述时间信息包括所述邀请消息的失效时刻和所述服务器发送所述目标消息的第一发送时刻;
    所述基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长,包括:
    基于所述失效时刻和所述第一发送时刻,确定所述剩余有效时长;
    其中,所述失效时刻为所述服务器基于所述邀请消息的总有效时长和所述服务器接收到所述邀请消息的第一接收时刻得到的。
  3. 根据权利要求2所述的消息处理方法,其中,所述剩余有效时长为所述失效时刻与所述第一发送时刻的第一差值。
  4. 根据权利要求2所述的消息处理方法,其中,所述基于所述失效时刻和所述第一发送时刻,确定所述剩余有效时长,包括:
    根据所述失效时刻、所述第一发送时刻和第一预设时长,确定所述剩余有效时长,所述第一预设时长为统计的从所述服务器向所述第一客户端发送第一消息,到所述第一客户端接收到所述第一消息所需的平均时长。
  5. 根据权利要求4所述的消息处理方法,其中,所述剩余有效时长为第一差值与所述第一预设时长的差值,其中,所述第一差值为所述失效时刻与所述第一发送时刻的差 值。
  6. 根据权利要求2所述的消息处理方法,其中,所述剩余有效时长为第一差值与预设值的乘积,其中,所述第一差值为所述失效时刻与所述第一发送时刻的差值,所述预设值为大于0且小于1的值。
  7. 根据权利要求2所述的消息处理方法,其中,所述失效时刻为所述服务器根据所述总有效时长、所述第一接收时刻和第二预设时长得到的,所述第二预设时长为统计的从所述第二客户端向所述服务器发送第二消息,到所述服务器接收到所述第二消息所需的平均时长。
  8. 根据权利要求1至7中任一项所述的消息处理方法,还包括:
    在所述剩余有效时长大于或等于所述第一时长阈值的情况下,显示失效提醒消息,所述失效提醒消息用于指示在目标时长之后所述邀请消息失效,所述目标时长小于或等于所述剩余有效时长。
  9. 根据权利要求8所述的消息处理方法,其中:
    在所述剩余有效时长大于或等于第二时长阈值的情况下,所述目标时长为所述第二时长阈值,所述第一时长阈值小于所述第二时长阈值;或者
    在所述剩余有效时长大于或等于所述第一时长阈值,且小于所述第二时长阈值的情况下,所述目标时长为所述剩余有效时长。
  10. 一种消息处理方法,应用于第二客户端,包括:
    向服务器发送邀请消息,所述邀请消息用于指示所述第二客户端邀请第一客户端建立直播间连麦;
    其中,所述邀请消息用于所述服务器根据所述邀请消息向所述第一客户端发送目标消息,所述目标消息用于所述第一客户端基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长,并在所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,在所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  11. 根据权利要求10所述的消息处理方法,其中,所述邀请消息携带所述邀请消息的总有效时长。
  12. 一种消息处理方法,应用于服务器,包括:
    接收第二客户端发送的邀请消息,所述邀请消息用于指示所述第二客户端邀请第一客户端建立直播间连麦;
    根据所述邀请消息,向所述第一客户端发送目标消息,所述目标消息用于所述第一客户端基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长,并在所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,在所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  13. 根据权利要求12所述的消息处理方法,其中,所述时间信息包括所述邀请消息的失效时刻和所述服务器发送所述目标消息的第一发送时刻;
    所述根据所述邀请消息,向所述第一客户端发送目标消息,包括:
    基于所述邀请消息的总有效时长和接收到所述邀请消息的第一接收时刻,确定所述失效时刻;和
    根据所述邀请消息,所述失效时刻和所述第一发送时刻,向所述第一客户端发送所述目标消息。
  14. 根据权利要求13所述的消息处理方法,其中,所述失效时刻为所述服务器根据所述总有效时长、所述第一接收时刻和第二预设时长得到的,所述第二预设时长为统计的从所述第二客户端向所述服务器发送第二消息,到所述服务器接收到所述第二消息所需的平均时长。
  15. 一种消息处理装置,包括:
    接收模块,用于接收服务器发送的目标消息,所述目标消息包括:用于指示第二客户端邀请第一客户端建立直播间连麦的邀请消息;
    获取模块,用于基于所述接收模块接收的所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长;和
    处理模块,用于在所述获取模块获取的所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,以根据所述邀请消息,发送回复消息,所述回复消息用于指示是否同意与所述第二客户端建立直播间连麦,以及在所述获取模块获取的所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  16. 一种消息处理装置,包括:
    发送模块,用于向服务器发送邀请消息,所述邀请消息用于指示第二客户端邀请第一客户端建立直播间连麦;
    其中,所述邀请消息用于所述服务器根据所述邀请消息向所述第一客户端发送目标消息,所述目标消息用于所述第一客户端基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长,并在所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,在所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  17. 一种消息处理装置,包括:
    接收模块,用于接收第二客户端发送的邀请消息,所述邀请消息用于指示所述第二客户端邀请第一客户端建立直播间连麦;和
    发送模块,用于根据所述接收模块接收的所述邀请消息,向所述第一客户端发送目标消息,所述目标消息用于所述第一客户端基于所述目标消息携带的时间信息,获取所述邀请消息对应的剩余有效时长,并在所述剩余有效时长大于或等于第一时长阈值的情况下,显示所述邀请消息,在所述剩余有效时长小于所述第一时长阈值的情况下,忽略所述邀请消息。
  18. 一种通信设备,包括:存储器和处理器,存储器用于存储计算机程序;处理器用于在调用计算机程序时执行权利要求1至14中任一项所述的消息处理方法。
  19. 一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现权利要求1至14中任一项所述的消息处理方法。
  20. 一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程 序被处理器执行时实现权利要求1至14中任一项所述的消息处理方法。
  21. 一种计算机程序,包括:
    指令,所述指令当由处理器执行时使所述处理器执行如权利要求1至14中任一项所述的消息处理方法。
PCT/CN2023/099950 2022-06-16 2023-06-13 消息处理方法、装置、通信设备、存储介质及程序产品 WO2023241578A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210689078.3A CN117294864A (zh) 2022-06-16 2022-06-16 消息处理方法、装置、通信设备、存储介质及程序产品
CN202210689078.3 2022-06-16

Publications (1)

Publication Number Publication Date
WO2023241578A1 true WO2023241578A1 (zh) 2023-12-21

Family

ID=89192288

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/099950 WO2023241578A1 (zh) 2022-06-16 2023-06-13 消息处理方法、装置、通信设备、存储介质及程序产品

Country Status (2)

Country Link
CN (1) CN117294864A (zh)
WO (1) WO2023241578A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177184A1 (en) * 2002-03-14 2003-09-18 Dickerman Howard J. Instant messaging session invite for arranging peer-to-peer communication between applications
CN109756504A (zh) * 2019-01-16 2019-05-14 武汉斗鱼鱼乐网络科技有限公司 一种基于直播平台的通信方法及相关装置
CN110392311A (zh) * 2018-04-18 2019-10-29 武汉斗鱼网络科技有限公司 连麦展示方法、存储介质、连麦服务器、客户端和系统
CN114554129A (zh) * 2020-11-25 2022-05-27 北京字节跳动网络技术有限公司 一种连麦系统、方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177184A1 (en) * 2002-03-14 2003-09-18 Dickerman Howard J. Instant messaging session invite for arranging peer-to-peer communication between applications
CN110392311A (zh) * 2018-04-18 2019-10-29 武汉斗鱼网络科技有限公司 连麦展示方法、存储介质、连麦服务器、客户端和系统
CN109756504A (zh) * 2019-01-16 2019-05-14 武汉斗鱼鱼乐网络科技有限公司 一种基于直播平台的通信方法及相关装置
CN114554129A (zh) * 2020-11-25 2022-05-27 北京字节跳动网络技术有限公司 一种连麦系统、方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN117294864A (zh) 2023-12-26

Similar Documents

Publication Publication Date Title
JP2022502807A (ja) 絵文字応答表示方法、装置、端末機器及びサーバ
EP3836484B1 (en) Method for transmitting live message, apparatus, electronic device, medium and computer program product
CN112312060B (zh) 屏幕共享方法、装置和电子设备
WO2020135188A1 (zh) 消息读取状态的提示方法、装置和电子设备
CN110569057A (zh) 灰度发布方法、装置、电子设备及计算机可读介质
US11758087B2 (en) Multimedia conference data processing method and apparatus, and electronic device
WO2020135431A1 (zh) 消息加急提醒方法、装置和电子设备
CN115600629B (zh) 车辆信息二维码生成方法、电子设备和计算机可读介质
CN110781373A (zh) 榜单更新方法、装置、可读介质和电子设备
US20220312078A1 (en) Method and apparatus for interaction in live streaming room, readable medium and electronic device
CN113326013A (zh) 信息交互方法、装置和电子设备
CN110768861B (zh) 一种获取超时阈值的方法、装置、介质和电子设备
CN111740984A (zh) 通信方法、装置和电子设备
WO2023241578A1 (zh) 消息处理方法、装置、通信设备、存储介质及程序产品
US20230319325A1 (en) Information interaction method, apparatus and device
CN113098739B (zh) 用于信息处理的方法、设备和计算机存储介质
WO2023071970A1 (zh) 一种勋章显示方法、装置及设备
WO2022161393A1 (zh) 信息显示方法、装置、设备及介质
WO2023241686A1 (zh) 直播间连麦方法、装置、电子设备、存储介质及程序产品
CN109842549B (zh) 即时通讯交互方法、装置及电子设备
CN112291216A (zh) 通信方法、装置和电子设备
CN115022106A (zh) 一种群信息处理方法、装置、设备及介质
CN112131832A (zh) 在线文档任务状态的提醒方法、装置及电子设备
CN111641693A (zh) 会话数据处理方法、装置及电子设备
CN110311853A (zh) 一种基于微信公众号实现消息触达的方法及、装置、计算设备以及存储介质实现消息触达

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23823146

Country of ref document: EP

Kind code of ref document: A1