WO2022115994A1 - 实现在线聊天的方法、装置、聊天终端、服务器及存储介质 - Google Patents

实现在线聊天的方法、装置、聊天终端、服务器及存储介质 Download PDF

Info

Publication number
WO2022115994A1
WO2022115994A1 PCT/CN2020/133098 CN2020133098W WO2022115994A1 WO 2022115994 A1 WO2022115994 A1 WO 2022115994A1 CN 2020133098 W CN2020133098 W CN 2020133098W WO 2022115994 A1 WO2022115994 A1 WO 2022115994A1
Authority
WO
WIPO (PCT)
Prior art keywords
chat
full
server
message
terminal
Prior art date
Application number
PCT/CN2020/133098
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 百果园技术(新加坡)有限公司
Priority to PCT/CN2020/133098 priority Critical patent/WO2022115994A1/zh
Priority to CN202080003709.0A priority patent/CN113302881B/zh
Publication of WO2022115994A1 publication Critical patent/WO2022115994A1/zh

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/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1813Arrangements for providing special services to substations for broadcast or conference, e.g. multicast for computer conferences, e.g. chat rooms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Definitions

  • the present application relates to the field of network communication technologies, for example, to a method, device, chat terminal, server and storage medium for realizing online chat.
  • IM Instant Messaging
  • the software development kit (Software Development Kit, SDK) of the instant messaging service provided by the third party is usually used to design a voice room that supports online chat among many people.
  • the third-party instant messaging service SDK may cause information leakage of chat users, and the information security of chat users cannot be guaranteed; moreover, since the instant messaging service SDK provided by the third party is a pre-set general chat function, it does not support specific business conditions.
  • Special customization of some personalized chat functions, or special customization by modifying the internal structure in the instant messaging service SDK, etc. makes the customization process of the personalized chat function very complicated, thus limiting the expansion of the online chat function.
  • the present application provides a method, device, chat terminal, server and storage medium for realizing online chat, which ensures the information security of chat users, simplifies the customization process of the personalized chat function, and improves the scalability of the online chat function.
  • a method for realizing online chat includes:
  • a message push subscription relationship with the chat terminal is established, wherein the message push subscription relationship is used to realize the communication among multiple logged-in users in the full-service chat room. chat online;
  • the message push subscription relationship is maintained by using the heartbeat packet task started after the chat terminal successfully logs in to the full-service chat room.
  • a heartbeat packet task is started to maintain the message push subscription relationship.
  • the subscription relationship establishment module is configured to establish a message push subscription relationship with the chat terminal in response to a login request from the chat terminal to the full-service chat room, wherein the message push subscription relationship is used to implement the full-server chat Online chat between multiple logged-in users indoors;
  • the subscription relationship maintenance module is configured to maintain the message push subscription relationship by using the heartbeat packet task started after the chat terminal successfully logs in to the full-service chat room.
  • the login request sending module is configured to send a login request for the full-service chat room to the server, so that the server establishes a message push subscription relationship corresponding to the login request, wherein the message push subscription relationship is used to realize all Online chat between multiple logged-in users in the full-service chat room;
  • the heartbeat package task starting module is configured to start the heartbeat package task after successfully logging in to the full-service chat room, so as to maintain the message push subscription relationship.
  • a server that includes:
  • processors one or more processors
  • storage means arranged to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned first method for implementing online chat.
  • a chat terminal is also provided, and the chat terminal includes:
  • processors one or more processors
  • storage means arranged to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned second method for implementing online chat.
  • FIG. 1 is a scene architecture diagram of an application scenario to which the method for realizing online chat provided by an embodiment of the present application is applicable;
  • FIG. 2A is a flowchart of a method for implementing online chat provided by Embodiment 1 of the present application;
  • FIG. 2B is a schematic diagram of the principle of implementing an online chat process according to Embodiment 1 of the present application;
  • 3A is a flowchart of a method for implementing online chat provided by Embodiment 2 of the present application;
  • 3B is a schematic diagram of the principle of the implementation process of a multi-person online chat function in a full-service chat room provided by Embodiment 2 of the present application;
  • FIG. 4A is a flowchart of a method for implementing online chat provided by Embodiment 3 of the present application.
  • 4B is a schematic schematic diagram of the implementation process of a multi-person online chat function in a full-service chat room provided in Embodiment 3 of the present application;
  • 5A is a flowchart of a method for implementing online chat provided by Embodiment 4 of the present application.
  • FIG. 5B is a schematic diagram of the principle of implementing an online chat process according to Embodiment 4 of the present application.
  • FIG. 6A is a flowchart of a method for implementing online chat provided by Embodiment 5 of the present application.
  • 6B is a schematic diagram of the principle of the implementation process of a multi-person online chat function in a full-service chat room provided by Embodiment 5 of the present application;
  • FIG. 7A is a flowchart of a method for implementing online chat provided by Embodiment 6 of the present application.
  • FIG. 7B is a schematic schematic diagram of the implementation process of a multi-person online chat function in a full-service chat room provided by Embodiment 6 of the present application;
  • FIG. 8 is a schematic structural diagram of an apparatus for implementing online chat according to Embodiment 7 of the present application.
  • Embodiment 8 of the present application is a schematic structural diagram of an apparatus for implementing online chat provided by Embodiment 8 of the present application.
  • FIG. 10 is a schematic structural diagram of a server according to Embodiment 9 of the present application.
  • FIG. 11 is a schematic structural diagram of a chat terminal according to Embodiment 10 of the present application.
  • the embodiment of the present application aims at the problem that the voice room designed by the instant messaging service SDK provided by the third party may easily cause the leakage of chat user information, and the customization process of the personalized chat function is very complicated.
  • a full-server chat room designed by the instant messaging service SDK provided, the entrance of the full-server chat room can be set on the homepage of the communication application, and all registered users in the communication application can log in to the full-server chat room to Realize online chat between multiple users (including friend users and unfamiliar users) in the communication application.
  • a message push subscription relationship with multiple chat terminals will be established on the server side respectively, so as to realize the message communication connection between the server side and multiple chat terminals, without the need for
  • the instant messaging service SDK provided by a third party
  • online chat services for multiple users can be realized, avoiding the leakage of chat user information caused by the instant messaging service SDK provided by a third party, thereby ensuring the information security of chat users.
  • the push subscription relationship will provide a communication link between the chat terminal and the server without limiting the online chat function. Therefore, the personalized online chat function can be directly customized outside the message push subscription relationship without modifying the instant messaging service.
  • the internal structure in the SDK is specially customized, thereby simplifying the customization process of the personalized chat function and improving the scalability of the online chat function; at the same time, after the chat terminal successfully logs in to the full-service chat room, it will also start the heartbeat package task. , to maintain the message push subscription relationship established on the server and ensure the real-time nature of the online chat function.
  • FIG. 1 is a scene architecture diagram of an application scenario to which a method for implementing online chat provided by an embodiment of the present application is applicable.
  • the application scenario may include a chat terminal 10 and a server 20 .
  • the chat terminal 10 is configured with a communication application for realizing online chat between different users, and an entrance of the full-service chat room is set on the home page of the communication application, and the chatting user can enter the full-service chat room by clicking on the entrance.
  • the full-service chat room supports all registered users in the communication application to log in, and does not limit the types of users who can chat online, so that friends and unfamiliar users in the communication application can chat online in the full-service chat room, while ensuring that The login path of the full-server chat room is relatively convenient, and there is no need to perform cumbersome login path search.
  • the server 20 is the background server of the communication application, and is configured to forward online chat messages between multiple logged-in users in the full-service chat room, thereby realizing the multi-user online chat function.
  • the chat user can enter the full-service chat room by clicking on the entrance of the full-service chat room set in the home page of the application.
  • the login request of the full-service chat room is sent to the server 20; after receiving the login request of the chat terminal 10 for the full-service chat room, the server 20 will establish a corresponding support between the chat terminal 10 and the server 20.
  • a message push subscription relationship for message transmission is used to realize online chat between multiple logged-in users in the full-service chat room, as a message communication connection between the server 20 and each chat terminal 10, without the need for
  • the online chat service of multiple users can be realized, avoiding the leakage of chat user information caused by the instant messaging service SDK provided by the third party, so as to ensure the information security of the chat users.
  • the push subscription relationship will provide a communication link between the chat terminal 10 and the server 20 without restricting the online chat function. Therefore, the personalized online chat function can be directly customized outside the message push subscription relationship without modifying the real-time chat function.
  • the internal structure in the communication service SDK is specially customized, thereby simplifying the customization process of the personalized chat function and improving the scalability of the online chat function.
  • the chat terminal 10 will start the corresponding heartbeat packet task after successfully logging in the full-service chat room, and the server 20 can continuously receive the heartbeat packet. Confirm that the chat terminal 10 is always logged in in the full-service chat room, and will continue to maintain the message push subscription relationship established between the server 20 and the chat terminal 10, to ensure the real-time online of each logged-in user in the full-service chat room, to avoid The problem of online chat failure caused by abnormal disconnection.
  • the chat terminal 10 in this embodiment may be the terminal of any logged-in user who logs into the full-service chat room in the communication application, and the number of chat terminals 10 is not limited. Meanwhile, the operations performed on the chat terminal 10 and the server 20 for realizing online chat can be introduced in the method for realizing online chat provided in the following embodiments, and no explanation is given here.
  • FIG. 2A is a flowchart of a method for implementing online chat provided by Embodiment 1 of the present application.
  • This embodiment is applicable to a situation where any communication application is used to conduct online chat between different users.
  • the method for implementing online chat provided in this embodiment may be executed by the apparatus for implementing online chat provided on the server provided by the embodiment of the present application.
  • the apparatus may be implemented in software and/or hardware, and is integrated into the implementation of this method.
  • the server is the background server corresponding to the communication application supporting online chat.
  • the method may include the following steps:
  • the user will actively look for other users with similar interests and use the chat function of interest in the communication application together, such as room stepping and game hacking.
  • the voice room in the communication application is relatively small for users, it cannot meet the needs of finding other users with similar interests as soon as possible. Therefore, in this embodiment, for all registered users in the communication application, a full-server chat room will be set up, and the The entrance of the full-service chat room is set on the home page of the communication application, so that any registered user in the communication application can enter the full-service chat room as soon as possible to chat online with other users in the full-service chat room.
  • the logged-in users in the full-server chat room may include friend users and unfamiliar users, which can realize information exchange among all-server users, and meet the needs of finding other users with similar interests as soon as possible.
  • the user When a user in the communication application needs to enter the full-server chat room for online chat with multiple people, the user will click the entrance of the full-service chat room on the homepage of the communication application, and the chat terminal where the user is located will detect that the Click on the portal to generate a login request for the full-service chat room, and send the login request to the server; after receiving the login request from the chat terminal for the full-service chat room, the server can confirm that the chat terminal is currently If you want to chat online in the full-server chat room, a message push subscription relationship with the chat terminal will be established locally on the server as a communication connection between the server and the chat terminal. As shown in FIG.
  • the server will establish a message push subscription relationship with the chat terminal where the logged-in user is located, and push and subscribe messages through different logged-in users. relationship, which can realize online chat among multiple logged-in users in the full-server chat room.
  • the full-service chat room in this embodiment is designed by relying on the message push subscription relationship between the server and multiple chat terminals, without relying on the instant messaging service SDK provided by a third party, so that multi-user online chat services can be realized.
  • the chat terminal after the server has established a message push subscription relationship with the chat terminal, it means that the server allows the chat terminal to enter the full-service chat room, so that the chat terminal successfully logs in to the full-service chat room.
  • the chat terminal will start a preset heartbeat after successfully logging in to the full-server chat room.
  • Packet task the heartbeat packet task requires the chat terminal to periodically send a heartbeat packet to the server during the period when it enters the full-server chat room for online chat. After the server receives the heartbeat packet, it will feed back the corresponding return packet to the chat terminal. , to ensure that the communication link between the chat terminal and the server can always be in a normal connection state, so as to maintain the message push subscription relationship established between the server and the chat terminal in an online state, and to ensure the real-time nature of the online chat function.
  • the heartbeat packet and the return packet periodically sent in the heartbeat packet task may be empty packets, or may carry multiple types of information that need to be processed currently, which is not limited.
  • a full-service chat room is designed for multiple login users to chat online, and the server establishes a communication with the chat terminal based on the login request sent by the chat terminal for the full-service chat room.
  • News push subscription relationship Through the message push subscription relationship established between the server and multiple chat terminals, online chat between multiple logged-in users in the full-server chat room can be realized. Multi-user can be realized without relying on the instant messaging service SDK provided by a third party.
  • the online chat service provided by the third party avoids the leakage of chat user information caused by the instant messaging service SDK provided by the third party, so as to ensure the information security of chat users, and due to the message push subscription relationship, a communication chain will be provided between the chat terminal and the server.
  • the personalized online chat function can be directly customized outside the message push subscription relationship, and there is no need to modify the internal structure of the instant messaging service SDK for special customization, which simplifies personalization.
  • the customization process of the chat function improves the scalability of the online chat function; at the same time, after the chat terminal successfully logs in to the full-server chat room, it will also start the heartbeat package task to maintain the message push subscription relationship established on the server, ensuring that The real-time nature of the online chat function.
  • FIG. 3A is a flowchart of a method for implementing online chat provided by Embodiment 2 of the present application
  • FIG. 3B is a schematic schematic diagram of a process of implementing a multi-person online chat function in a full-service chat room provided by Embodiment 2 of the present application.
  • This embodiment is described on the basis of the above-mentioned embodiment.
  • this embodiment explains the establishment process of the message push subscription relationship between the server and the chat terminal, and the configuration process and exit process of the full-service chat room.
  • this embodiment may include the following steps:
  • S310 in response to the configuration pull request of the chat terminal facing the full-server chat room, deliver the dynamic configuration information of the full-server chat room to the chat terminal, so that the chat terminal uses the dynamic configuration information to configure the full-service chat room after successfully logging in to the full-server chat room. service chat room.
  • this embodiment will formulate corresponding configuration parameters for the full-service chat room in advance, and the configuration parameters may include the chat messages sent by each logged-in user in the full-service chat room.
  • the single sending interval limit and the sending frequency limit within a certain period of time can avoid frequent message sending by the same user in the full-server chat room, eliminate the phenomenon of advertisement push in the full-server chat room, etc., and can also avoid the frequent sending of chat messages by a user.
  • the situation that the chat messages of other users are missed improves the user experience of the full-server chat room for full-server users.
  • this configuration parameter can ensure the systematization of the online chat function in the full-server chat room.
  • the full-server chat room supports log-in users to feedback corresponding configuration optimization opinions, and continuously dynamically optimizes the configuration parameters according to the configuration optimization opinions. Therefore, the configuration parameters are the same as those in this embodiment. dynamic configuration information.
  • the chat terminal will be required to pull the login configuration of the full-server chat room, so the chat terminal will send a message oriented to the full-server chat room to the server.
  • Configuration pull request After receiving the configuration pull request, the server will find out the configuration parameters pre-established for the full-service chat room, that is, the dynamic configuration information in this embodiment, and send the dynamic configuration information to the server.
  • Sent to the chat terminal so that after the chat terminal successfully logs in to the full-server chat room, it can use the configuration parameters in the dynamic configuration information to set the login status of the full-server chat room, for example, use the dynamic configuration information to control the full-server chat room User operation restrictions and displayed page performance of the room in the chat terminal, etc.
  • the chat terminal may pull the dynamic configuration information of the full-service chat room from the server when starting the communication application where the full-service chat room is located. , cached locally on the chat terminal, and when subsequent requests to log in to the full-service chat room, you can directly find the pre-cached dynamic configuration information locally from the terminal to quickly control the full-service chat room's login display on the chat terminal.
  • a login request from the chat terminal for the full-service chat room is received, a corresponding login result response code is generated based on the open state of the full-service chat room and the upper limit of logged-in users.
  • the server after receiving the login request from the chat terminal for the full-server chat room, the server first analyzes whether the full-server chat room is currently opened, and if In the open state, the current number of logged-in users in the full-server chat room, and then according to the open state of the full-server chat room and judging whether the number of logged-in users in the full-server chat room exceeds the preset login user upper limit, the corresponding login result response is generated code.
  • the generated login result response code is a login failure code; if the full-server chat room is open, but the current number of logged-in users has exceeded the upper limit of the logged-in user, then in order to alleviate the The pressure of online chat with multiple people does not support continuing to enter the full-server chat room, so the generated login result response code is also the login failure code; if the full-server chat room is open, and the current number of logged-in users does not exceed the number of logged-in users The upper limit indicates that the full server chat room supports continued entry, so the generated login result response code is the login success code.
  • the response code of the login result is the login success code, it means that the chat room of the whole server supports the chat terminal to participate in the current multi-person online chat, then the message push subscription relationship with the chat terminal will be directly established locally on the server side.
  • the response code of the login result is a login failure code, it means that the chat room of the full server does not support the chat terminal to participate in the current multi-person online chat, and the login failure code will be used directly. Feedback to the chat terminal.
  • the server will also feed back the login result response code to the chat terminal.
  • the corresponding heartbeat package task is started to maintain the continuous online status of the established message push subscription relationship.
  • the chat terminal will prompt the corresponding login failure information. Contains the current login failure reason.
  • the chat terminal when the user of the chat terminal no longer needs to chat online, it will log out from the full-server chat room and return to the home page of the communication application.
  • the chat terminal detects that the user has logged out of the full-server chat room, and will generate a message.
  • the exit request for the full-service chat room, and the exit request is reported to the server.
  • the server After receiving the exit request, the server will find out the message push subscription relationship established with the chat terminal, and send it to the server.
  • the found message push subscription relationship is deleted, thereby canceling the communication connection between the chat terminal and the server.
  • the chat terminal will also stop the started heartbeat packet task, no longer need to maintain the message push subscription relationship established with the chat terminal, and no longer receive chat messages in the full-server chat room, thus ensuring the online chat function in the full-server chat room. completeness.
  • the technical solution provided by this embodiment by pulling the dynamic configuration information of the full-server chat room, ensures the accurate display of the full-server chat room after successfully logging in to the full-server chat room, and the server sends the full-server chat room based on the chat terminal.
  • the log-in request establish a message push subscription relationship with the chat terminal through the generated login result response code, realize online chat among multiple logged-in users in the full-server chat room, and ensure the login accuracy of the full-server chat room , and without relying on the instant messaging service SDK provided by a third party, you can realize multi-user online chat services, avoiding the leakage of chat user information caused by the instant messaging service SDK provided by a third party, so as to ensure the information security of chat users, Moreover, because the message push subscription relationship will provide a communication link between the chat terminal and the server without limiting the online chat function, the personalized online chat function can be directly customized outside the message push subscription relationship without modification.
  • the internal structure in the instant messaging service SDK is specially customized, which simplifies the customization process of the personalized chat function and improves the scalability of the online chat function; Remove the message push subscription relationship established between the server and the chat terminal to ensure the complete flow of the online chat function in the full-server chat room.
  • FIG. 4A is a flowchart of a method for implementing online chat provided by Embodiment 3 of the present application
  • FIG. 4B is a schematic schematic diagram of a process of implementing a multi-person online chat function in a full-service chat room provided by Embodiment 3 of the present application.
  • This embodiment is described on the basis of the above-mentioned embodiment. As shown in Fig. 4A, this embodiment explains the forwarding process of chat messages and banned user information in the full-service chat room.
  • this embodiment may include the following steps:
  • S430 Deliver chat messages of the chat terminal and information about banned users in the full-service chat room to multiple logged-in users in the full-service chat room.
  • the server after the server establishes a message push subscription relationship with multiple chat terminals, it means that users of multiple chat terminals have successfully logged in to the full-server chat room, and multiple logged-in users in the full-server chat room can Chat online.
  • the server After a logged-in user in the full-server chat room sends a chat message in the full-server chat room, the server will receive the chat message and deliver the chat message to multiple other logged-in users in the full-service chat room to display the A full-server chat room displayed by multiple chat terminals. Since the logged-in users in the full-server chat room are complex, it is necessary to ensure the healthiness of the chat information in the full-server chat room. Therefore, this embodiment will also detect in real time whether the chat messages in the full-server chat room contain any illegal content, and send the violation message. The logged-in user who is the violating user performs banning and banning operations in the full-server chat room.
  • the user information is sent to multiple logged-in users in the full-server chat room, so as to filter out the chat messages sent by the banned users in the full-server chat room in the chat terminals where the multiple logged-in users are located, so as to eliminate the bad in the full-server chat room Chat messages to ensure the health of the content of online chats for multiple people.
  • the present embodiment respectively explains and describes the delivery process of the chat message in the full-server chat room and the information of the banned user.
  • chat messages in the full-server chat room write the chat messages sent by the chat terminal that have passed the legality check, and the session timestamp of the chat messages into the preset chat cache queue; package them regularly Chat messages in the chat queue are cached, and the packaged chat package is delivered to multiple logged-in users in the full-server chat room.
  • the server will firstly verify the validity of the chat message, such as sensitive words Detection, illegal content detection and deduplication detection, etc. If the chat message passes the validity check, the session timestamp of the chat message is determined according to the server time, to ensure that the benchmarks of the session timestamps of chat messages of different chat terminals are consistent Then, the chat message and the corresponding session timestamp are uniformly written into the preset chat cache queue, and the session timestamp can accurately filter out the illegal chat message according to the banned user information in the future.
  • the chat message and the corresponding session timestamp are uniformly written into the preset chat cache queue, and the session timestamp can accurately filter out the illegal chat message according to the banned user information in the future.
  • the server will start A scheduled task that periodically (for example, every 500ms) packs all the chat messages cached in the chat cache queue to obtain a complete chat package, and then distributes the chat package to multiple logged-in users in the full-server chat room.
  • the subsequent chat terminal can obtain each chat message sent by multiple chat terminals and the The session timestamp of chat messages, so that the chat messages are sorted according to the session timestamps of multiple chat messages, and then displayed in the full-server chat room of each chat terminal, enabling online chat among multiple logged-in users in the full-server chat room .
  • an order management terminal is specially set up in this embodiment.
  • the order management terminal specifically examines whether there is any illegal content in each chat message in the full-server chat room, thereby auditing all illegal chat messages in the full-server chat room, and will send the login of the illegal chat message Users who log in illegally will be punished by banning or banning them in the full-server chat room, so as to maintain a green and healthy speaking space in the full-server chat room.
  • the server will also determine the user ID of the illegal login user and the ban timestamp when they were banned in the full-server chat room, and then use the user ID of the illegal login user. and the ban time stamp as the ban user information in this embodiment, and are uniformly written into the preset ban cache queue.
  • a mechanism similar to the chat message delivery is adopted, and a scheduled task is also started, and the multiple banned user information cached in the banned cache queue is packaged regularly (for example, every 500ms) to obtain a complete banned package.
  • the ban package is distributed to the chat terminals where multiple logged-in users are located in the full-service chat room, so that when each chat terminal receives the ban package, it analyzes the ban package to obtain the ban user information, and According to the user ID and the banned timestamp in the banned user information, from all the chat messages displayed by the chat terminal in the full-server chat room, filter out the session timestamp sent by the illegal logged-in user under the user ID in the banned user information located at This bans chat messages before the timestamp, so as to ensure the content health of chat messages in the full-server chat room.
  • this implementation when using the heartbeat packet task started after the chat terminal successfully logs in to the full-server chat room, and maintaining the message push subscription relationship, it may also include: parsing the heartbeat packets periodically sent by the chat terminal, and obtaining the chat messages displayed by the chat terminal in the full-server chat room.
  • chat terminal After the chat terminal successfully logs in to the full-server chat room, it may be disconnected from the network, kill the application process, etc., so that the message push subscription relationship established between the server and the chat terminal cannot be guaranteed to be online all the time. Therefore, in this embodiment, chat The terminal will correct the online status of the message push subscription relationship in real time by sending heartbeat packets to the server periodically, and the server will return the corresponding return packet. In order to ensure the complete filtering of illegal chat messages, when the chat terminal sends a heartbeat packet to the server, it will carry the start and end timestamps of the chat message displayed by the chat terminal in the full-server chat room in the heartbeat packet.
  • a local message queue is used to cache the chat messages displayed by the chat terminal in the full-server chat room, then the start and end timestamps of the chat messages displayed by the chat terminal in the full-server chat room are the time stamps of the chat messages cached in the local message queue of the chat terminal. Start and stop timestamps, and the heartbeat packet will also carry the number of banned packets received by the chat terminal during the time period of the start and stop timestamps.
  • the server When the server receives the heartbeat packets periodically sent by the chat terminal, it will first parse that the chat terminal is in The start and end time stamps of the chat messages displayed in the chat room of the full server and the number of banned packets received during the period of the start and end time stamps, and then analyze the number of times the banned packets were actually sent to the chat terminal during the time period of the start and end time stamps.
  • the number of times that the banned packets are issued in this embodiment, and whether the chat terminal has lost the banned packets is judged by judging whether the number of the parsed banned packets is consistent with the number of times of the banned packets actually issued; If the number of banned packets is lower than the actual number of banned packets, it is determined that the banned packets are lost, and the server will carry the actual banned packets in the time period of the start and stop timestamps in the return packet of the heartbeat packet.
  • chat terminal parse out the banned user information in the banned packet in the return packet, and re-filter the chat messages in the full-server chat room according to the banned user information, so as to control the chat messages in the full-server chat room.
  • the illegal chat messages are dealt with in a timely manner, and a good virtual network communication environment is provided.
  • S440 Store the sent chat message and banned user information in a historical database pre-set for the full-server chat room, so that after the chat terminal successfully logs in to the full-server chat room, the history database can be used to realize the history in the full-server chat room. message display.
  • the server will send the chat messages and banned user information in the full-server chat room to multiple logged-in users in the full-server chat room. Then, store the sent chat messages and banned user information in the historical database pre-set for the full-server chat room, so that the chat terminal can pull the corresponding history from the historical database after successfully logging in to the full-server chat room. Chat messages are displayed, so as to realize the display of historical messages in the chat room of the whole server. Since chat messages and banned user information are stored in the historical database, when displaying historical messages, the pulled chat messages will also be filtered according to the banned user information, so as to ensure that the content of chat messages in the full-server chat room is healthy. sex.
  • the chat package and the ban package are directly stored in the historical database.
  • the chat terminal when the chat terminal needs to re-login to the full-server chat room due to the disconnection of the network, it will generate a corresponding disconnection and reconnection instruction for the full-server chat room and send it to the server; After serving the disconnection and reconnection instruction of the chat room, according to the dynamic configuration information of the full-service chat room, the latest historical messages under the target number will be found from the historical database, as the disconnection and re-login messages in this embodiment, and Send the disconnected relogin message to the chat terminal, so that when the chat terminal re-logs in the full-server chat room after disconnection, it can determine the chat message and banned user information in the disconnected relogin message, and then according to the The status of the message overlap between the chat messages in the disconnected relogin message and the existing chat messages in the chat terminal, to determine whether part of the chat message is missing or the user information is banned during the disconnected relogin period, if there is a message between the two If they overlap, the user ban information in the re-
  • the existing chat messages in the local chat terminal, and the user ban information in the disconnected re-login message is used to filter the chat messages in the disconnected re-login message, and then the re-pulled chat messages are displayed in the full-server chat room and filtered. If the chat message is sent out, the influence of the illegal chat message can be excluded, so as to realize the re-display of the message in the chat room of the whole server.
  • the process of delivering chat messages and banned user information in the full-server chat room is specially set through the chat cache queue and the ban cache queue, so as to ensure the integrity of the chat messages in the full-server chat room and improve the filtering of illegal chat messages.
  • the chat messages and banned user information that have been sent are stored in the historical database, and the corresponding chat messages and banned user information are pulled after the initial successful login or after disconnecting from the network and re-login to the full-service chat room.
  • Re-display messages accurately exclude the impact of illegal chat messages, and ensure the comprehensiveness of online chat functions.
  • FIG. 5A is a flowchart of a method for implementing online chat provided by Embodiment 4 of the present application
  • FIG. 5B is a schematic schematic diagram of a principle of implementing an online chat process provided by Embodiment 4 of the present application.
  • the method for implementing online chat provided in this embodiment may be executed by the apparatus for implementing online chat provided on the chat terminal provided in the embodiment of the present application.
  • the chat terminal is configured with a communication application for realizing online chat of multiple people through a full-server chat room.
  • the method may include the following steps:
  • S510 Send a login request for the full-service chat room to the server, so that the server establishes a corresponding message push subscription relationship.
  • this embodiment will set up a full-service chat room, and set the entrance of the full-service chat room on the home page of the communication application to support any registered user in the communication application.
  • the logged-in users in the full-server chat room may include friend users and unfamiliar users, which can realize information exchange among all-server users, and meet the needs of finding other users with similar interests as soon as possible.
  • the user When a user in the communication application needs to enter the full-server chat room for online chat with multiple people, the user will click the entrance of the full-service chat room on the homepage of the communication application, and the chat terminal where the user is located will detect that the The click operation of the entrance generates a login request for the full-service chat room, and sends the login request to the server; after the server receives the login request from the chat terminal for the full-service chat room, it will create a locally on the server.
  • a message push subscription relationship with the chat terminal is used as a communication connection between the server and the chat terminal, so as to realize online chat among multiple logged-in users in the full-service chat room.
  • the full-service chat room in this embodiment is designed by relying on the message push subscription relationship between the server and multiple chat terminals, without relying on the instant messaging service SDK provided by a third party, so that multi-user online chat services can be realized. Avoid the leakage of chat user information caused by the instant messaging service SDK provided by third parties, so as to ensure the information security of chat users, and because of the message push subscription relationship, a communication link will be provided between the chat terminal and the server, without
  • the online chat function is limited, so the personalized online chat function can be customized directly outside the message push subscription relationship, and there is no need to modify the internal structure of the instant messaging service SDK for special customization, thereby simplifying the customization process of the personalized chat function. Improve the scalability of the online chat function.
  • the chat terminal will start the pre-service chat room after successfully logging in to the full-server chat room.
  • the set heartbeat packet task the heartbeat packet task requires the chat terminal to periodically send a heartbeat packet to the server during the period of entering the full-server chat room for online chat. After the server receives the heartbeat packet, it will feedback to the chat terminal. Corresponding return packets to ensure that the communication link between the chat terminal and the server can always be in a normal connection state, so as to maintain the message push subscription relationship established between the server and the chat terminal in an online state and ensure the online chat function. real-time.
  • a full-service chat room is designed for multiple login users to chat online, and the server establishes a communication with the chat terminal based on the login request sent by the chat terminal for the full-service chat room.
  • the message push subscription relationship through the message push subscription relationship established between the server and multiple chat terminals, can realize online chat among multiple logged-in users in the full-service chat room, without relying on the instant messaging service SDK provided by a third party. It can realize multi-user online chat service, avoid chat user information leakage caused by instant messaging service SDK provided by third parties, so as to ensure the information security of chat users. It provides a communication link between the instant messaging service and does not limit the online chat function.
  • the personalized online chat function can be directly customized outside the message push subscription relationship, and there is no need to modify the internal structure of the instant messaging service SDK for special customization. This simplifies the customization process of the personalized chat function and improves the scalability of the online chat function; at the same time, after the chat terminal successfully logs in to the full-server chat room, it will also start the heartbeat packet task to maintain the message created on the server. Push subscription relationship to ensure real-time online chat function.
  • FIG. 6A is a flowchart of a method for implementing online chat provided by Embodiment 5 of the present application
  • FIG. 6B is a schematic schematic diagram of a process of implementing a multi-person online chat function in a full-service chat room provided by Embodiment 5 of the present application.
  • This embodiment is described on the basis of the above-mentioned embodiment.
  • this embodiment explains the establishment process of the message push subscription relationship between the server and the chat terminal, and the configuration process and exit process of the full-service chat room.
  • this embodiment may include the following steps:
  • S610 in response to an opening instruction of the application where the full-service chat room is located, send a configuration pull request for the full-service chat room to the server to obtain dynamic configuration information of the full-service chat room.
  • the chat terminal may generate an opening instruction of the application where the full-service chat room is located when starting the communication application where the full-service chat room is located, and according to the opening instruction Pull the dynamic configuration information of the full-server chat room.
  • a configuration pull request for the full-service chat room will be generated, and the configuration pull request will be sent to the server to obtain the dynamic configuration information that the server has pre-established for the full-service chat room, so as to successfully log in to the full-service chat room later.
  • the configuration parameters in the dynamic configuration information can be used to set the login status of the full-server chat room, for example, the dynamic configuration information can be used to control the user operation restrictions of the full-service chat room on the chat terminal and the displayed page performance, etc. .
  • S620 Send a login request for the full-service chat room to the server, so that the server establishes a corresponding message push subscription relationship.
  • S630 Receive the login result response code sent by the server; if the login result response code is the login success code, use the dynamic configuration information to configure the full-server chat room, and display the first page of the full-server chat room to successfully log in to the full-server chat room room.
  • the server in order to avoid the pressure of online chat in the full-server chat room, after the server receives the login request from the chat terminal for the full-server chat room, it will judge the full-server chat room according to the open status of the full-server chat room and the upper limit of logged-in users. Whether the chat room currently supports re-entering new chat users, so as to generate the corresponding login result response code, and send the login result response code to the chat terminal, and the chat terminal will receive the login result response code.
  • the response code of the login result is the login success code, it means that the server allows the chat terminal to enter the full-server chat room, then the pre-acquired dynamic configuration information can be used to configure the full-server chat room, so as to display the home page of the full-server chat room , to successfully log in to the full-server chat room.
  • the login result response code received by the chat terminal is a login failure code, the corresponding login failure information will be prompted, and the login failure information will include the current login failure reason.
  • the chat terminal after the chat terminal successfully logs in to the full-server chat room, it will send chat messages using various message types supported by the full-server chat room. For example, enter a message in the input box at the bottom of the home page of the full-server chat room. content, and click the Send button to send the message.
  • the chat terminal When detecting the message sending operation, the chat terminal will generate a sending instruction of the current chat message, and then perform local preliminary verification on the message content of the current chat message carried in the sending instruction. As shown in FIG. 6B , the local preliminary verification can be used to determine whether the requirements of the transmission conditions such as the single transmission interval restriction and the transmission frequency restriction within a certain period in the dynamic configuration information are met. If the local preliminary verification is not passed, then the The current chat message will be sent to the server.
  • the chat terminal needs to send the current chat message to the server, and the server verifies the validity of the current chat message to ensure that the chat message in the full-server chat room is guaranteed. content family safe.
  • the chat terminal will display the corresponding sending error prompt to notify the chat terminal.
  • the current chat message of the logged-in user failed to be sent, and the reason for the failure.
  • chat terminal when the user of the chat terminal no longer needs to chat online, he or she will exit from the full-server chat room and return to the home page of the communication application.
  • the chat terminal detects that the user has withdrawn from the full-server chat room, it will generate a quit request for the full-server chat room, and stop the heartbeat packet task started based on the quit request, so there is no need to maintain the message created with the chat terminal.
  • Push subscription relationship no longer receive chat messages in the full server chat room.
  • the chat terminal will also report the exit request to the server, so that the server deletes the message push subscription relationship established with the chat terminal, thereby canceling the communication connection between the chat terminal and the server, thereby ensuring full-server chat Indoor online chat feature integrity.
  • the technical solution provided by this embodiment by pulling the dynamic configuration information of the full-server chat room, ensures the accurate display of the full-server chat room after successfully logging in to the full-server chat room.
  • the chat terminal sends a chat message
  • the current chat message will be processed Local preliminary verification to avoid frequent sending of chat messages from the same logged-in user in the full-server chat room, and send error prompts for chat messages that fail the local preliminary verification or the server-side legitimacy verification to improve chat in the full-server chat room Simplicity of the message; at the same time, the message push subscription relationship established between the server and the chat terminal is removed through the exit request of the chat terminal facing the chat room of the full server, so as to ensure the complete process of the online chat function in the chat room of the full server.
  • FIG. 7A is a flowchart of a method for implementing online chat provided by Embodiment 6 of the present application
  • FIG. 7B is a schematic schematic diagram of a process of implementing a multi-person online chat function in a full-service chat room provided by Embodiment 6 of the present application. This embodiment is described on the basis of the above-mentioned embodiment. As shown in FIG. 7A , this embodiment explains the forwarding process of chat messages and banned user information in the full-server chat room.
  • this embodiment may include the following steps:
  • S710 Send a login request for the full-service chat room to the server, so that the server establishes a corresponding message push subscription relationship.
  • S730 Receive the chat package and the ban package periodically sent by the server, and parse out the chat message in the chat package and the banned user information in the ban package.
  • the server when the server sends chat messages and banned user information, it periodically packs the chat messages in the chat cache queue, and periodically packs the banned user information in the ban cache queue, and periodically packs the packaged chat package and the banned user information.
  • the ban package is sent to the chat terminals where multiple logged-in users are located in the chat room of the full server. Therefore, the chat terminal will regularly receive the chat packets and ban packets periodically issued by the server.
  • this embodiment will preset a local message on the chat terminal. Queue, the chat messages displayed by the chat terminal in the full-server chat room are cached through the local message queue, and the capacity of the local message queue is the maximum number of displayed messages in the dynamic configuration information of the full-server chat room. Therefore, as shown in FIG. 7B , the chat terminal will correspondingly write the chat message parsed in the chat packet into the local message queue, and then according to the banned user information parsed in the ban packet, the banned user in the local message queue will be blocked.
  • the chat messages sent by users are filtered to exclude illegal chat messages in the full-server chat room.
  • this embodiment filters chat messages whose session timestamps in the local message queue are located before the ban timestamp in the ban user information, so as to avoid filtering after unblocking. Chat messages sent by users of .
  • the chat terminal when it starts the heartbeat packet task, it may include: periodically sending a heartbeat packet to the server, and the heartbeat packet carries the start and end timestamps of the chat messages in the local message queue and the number of banned packets received within the time period of the start and end timestamps, So that the server can judge whether the local banned packet is lost; if the return packet of the heartbeat packet is not empty, it will parse the banned packet carried in the return packet within the time period of the start and end timestamps, and re-filter the chat messages in the local message queue. .
  • chat terminal After the chat terminal successfully logs in to the full-server chat room, it may be disconnected from the network, kill the application process, etc., so that the message push subscription relationship established between the server and the chat terminal cannot be guaranteed to be online all the time. Therefore, in this embodiment, chat The terminal will correct the online status of the message push subscription relationship in real time by sending heartbeat packets to the server periodically, and the server will return the corresponding return packet. In order to ensure the complete filtering of illegal chat messages, when the chat terminal sends a heartbeat packet to the server, it will carry the start and end timestamps of the chat message displayed by the chat terminal in the full-server chat room in the heartbeat packet.
  • a local message queue is used to cache the chat messages displayed by the chat terminal in the full-server chat room, then the start and end timestamps of the chat messages displayed by the chat terminal in the full-server chat room are the time stamps of the chat messages cached in the local message queue of the chat terminal. Start and stop timestamps, and the heartbeat packet will also carry the number of banned packets received by the chat terminal during the time period of the start and stop timestamps.
  • the server When the server receives the heartbeat packets periodically sent by the chat terminal, it will first parse that the chat terminal is in The start and end time stamps of the chat messages displayed in the chat room of the full server and the number of banned packets received during the period of the start and end time stamps, and then analyze the number of times the banned packets were actually sent to the chat terminal during the time period of the start and end time stamps.
  • the number of times that the banned packets are issued in this embodiment, and whether the chat terminal has lost the banned packets is judged by judging whether the number of the parsed banned packets is consistent with the number of times of the banned packets actually issued; If the number of banned packets is lower than the actual number of banned packets, it is determined that the banned packets are lost, and the server will carry the actual banned packets in the time period of the start and stop timestamps in the return packet of the heartbeat packet.
  • chat terminal parse out the banned user information in the banned packet in the return packet, and re-filter the chat messages in the full-server chat room according to the banned user information, so as to control the chat messages in the full-server chat room.
  • the illegal chat messages are dealt with in a timely manner, and a good virtual network communication environment is provided.
  • the server will send the corresponding chat package and ban package in the full-server chat room to multiple logged-in users in the full-server chat room.
  • the server In response to the pull request, the server will find the latest historical messages of the target number from the historical database set for the full-server chat room, as a regular login message for normal login to the full-server chat room; the chat terminal receives the target number of messages. After the regular login message, it will distinguish the chat message and the banned user information in the regular login message, then filter the chat message according to the banned user information, and display the filtered chat message in the full server chat room.
  • the regular login message may include a corresponding chat packet and a ban packet.
  • S770 when re-login to the full-server chat room after disconnecting from the network, send a disconnection and reconnection command for the full-server chat room to the server, so that the server can find out the target number of chat rooms from the historical database set for the full-server chat room.
  • the latest historical news is used as the re-login message after disconnection;
  • the local message queue is updated according to the message overlap state between the chat message in the re-login message and the existing chat message in the local message queue;
  • the banned user information and the updated local message queue of redisplay the unbanned chat messages in the full-server chat room.
  • the chat terminal when the chat terminal needs to re-login to the full-server chat room due to the disconnection of the network, it will generate a corresponding disconnection and reconnection instruction for the full-server chat room.
  • the reconnection instruction according to the dynamic configuration information of the full-service chat room, the latest historical news under the target number will be found from the historical database, as the disconnected re-login message in this embodiment, and the disconnected network will be re-logged.
  • the message is sent to the chat terminal; when the chat terminal re-logs in the full-server chat room after disconnecting from the network, it can determine the chat message and banned user information in the disconnected re-login message, and then analyze the disconnected re-login message by analyzing the network disconnection.
  • chat message and the existing chat message in the local message queue get the corresponding message overlap status, so as to determine whether the chat terminal has missed part of the chat message or banned user information during the disconnection and relogin period. If there is a message overlap between the two, the non-overlapping chat messages in the disconnection relog message are directly stored in the local message queue to update the local message queue; and if there is no message overlap between the two, it means that Some messages may be missed, so it is necessary to eliminate the existing chat messages in the local message queue on the chat terminal, and store the chat messages in the disconnected relog message in the eliminated local message queue to update the local message queue; finally , use the banned user information in the disconnected relogin message to filter the chat messages in the updated local message queue, so as to redisplay the unbanned chat messages in the full-server chat room to ensure that the chat messages in the full-server chat room are not blocked. Content Safe.
  • the network disconnection relogin message may include a corresponding chat packet and a ban packet.
  • the process of delivering chat messages and banned user information in the full-server chat room is specially set through the chat cache queue and the ban cache queue, so as to ensure the integrity of the chat messages in the full-server chat room and improve the filtering of illegal chat messages.
  • the chat messages and banned user information that have been sent are stored in the historical database, and the corresponding chat messages and banned user information are pulled after the initial successful login or after disconnecting from the network and re-login to the full-service chat room.
  • Re-display messages accurately exclude the impact of illegal chat messages, and ensure the comprehensiveness of online chat functions.
  • FIG. 8 is a schematic structural diagram of an apparatus for implementing online chat provided by Embodiment 7 of the present application, which can be applied to the server provided by the present application.
  • the apparatus may include:
  • the subscription relationship establishment module 810 is configured to establish a message push subscription relationship with the chat terminal in response to a login request of the chat terminal facing the full-service chat room, and the message push subscription relationship is used to realize the full-service chat room Online chat among multiple logged-in users;
  • the subscription relationship maintenance module 820 is configured to maintain the message push subscription relationship using the heartbeat packet task started after the chat terminal successfully logs in to the full-service chat room.
  • a full-service chat room is designed for multiple login users to chat online, and the server establishes a communication with the chat terminal based on the login request sent by the chat terminal for the full-service chat room.
  • News push subscription relationship Through the message push subscription relationship established between the server and multiple chat terminals, online chat between multiple logged-in users in the full-server chat room can be realized. Multi-user can be realized without relying on the instant messaging service SDK provided by a third party.
  • the online chat service provided by the third party avoids the leakage of chat user information caused by the instant messaging service SDK provided by the third party, so as to ensure the information security of chat users, and due to the message push subscription relationship, a communication chain will be provided between the chat terminal and the server.
  • the personalized online chat function can be directly customized outside the message push subscription relationship, and there is no need to modify the internal structure of the instant messaging service SDK for special customization, which simplifies personalization.
  • the customization process of the chat function improves the scalability of the online chat function; at the same time, after the chat terminal successfully logs in to the full-server chat room, it will also start the heartbeat package task to maintain the message push subscription relationship established on the server, ensuring that The real-time nature of the online chat function.
  • the apparatus for implementing online chat provided in this embodiment can be applied to the method for implementing online chat on a server provided by any of the foregoing embodiments, and has corresponding functions and effects.
  • FIG. 9 is a schematic structural diagram of a device for implementing online chat provided by Embodiment 8 of the present application, which can be applied to the chat terminal provided by the present application.
  • the device may include:
  • the login request sending module 910 is configured to send a login request oriented to the full-service chat room to the server, so that the server establishes a corresponding message push subscription relationship, and the message push subscription relationship is used to realize the full-service chat room Online chat among multiple logged-in users;
  • the heartbeat packet task starting module 920 is configured to start the heartbeat packet task after successfully logging in to the full-service chat room, so as to maintain the message push subscription relationship.
  • a full-service chat room is designed for multiple login users to chat online, and the server establishes a communication with the chat terminal based on the login request sent by the chat terminal for the full-service chat room.
  • the message push subscription relationship through the message push subscription relationship established between the server and multiple chat terminals, can realize online chat among multiple logged-in users in the full-service chat room, without relying on the instant messaging service SDK provided by a third party. It can realize multi-user online chat service, avoid chat user information leakage caused by instant messaging service SDK provided by third parties, so as to ensure the information security of chat users. It provides a communication link between the instant messaging service and does not limit the online chat function.
  • the personalized online chat function can be directly customized outside the message push subscription relationship, and there is no need to modify the internal structure of the instant messaging service SDK for special customization. This simplifies the customization process of the personalized chat function and improves the scalability of the online chat function; at the same time, after the chat terminal successfully logs in to the full-server chat room, it will also start the heartbeat packet task to maintain the message created on the server. Push subscription relationship to ensure real-time online chat function.
  • the apparatus for implementing online chat provided in this embodiment can be applied to the method for implementing online chat on a chat terminal provided by any of the above embodiments, and has corresponding functions and effects.
  • FIG. 10 is a schematic structural diagram of a server according to Embodiment 9 of the present application.
  • the server includes a processor 100, a storage device 101, and a communication device 102; the number of processors 100 in the server may be one or more One processor 100 is taken as an example in FIG. 10 ; the processor 100 , the storage device 101 and the communication device 102 in the server can be connected by a bus or other means, and the connection by a bus is taken as an example in FIG. 10 .
  • a server provided in this embodiment can be configured to execute the method for implementing online chat applied on a server provided by any of the foregoing embodiments, and has corresponding functions and effects.
  • FIG. 11 is a schematic structural diagram of a chat terminal according to Embodiment 10 of the present application.
  • the chat terminal includes a processor 110, a storage device 111, a communication device 112, an input device 113, and an output device 114; a chat terminal
  • the number of processors 110 may be one or more, and one processor 110 is taken as an example in FIG. 11; the processor 110, the storage device 111, the communication device 112, the input device 113 and the output device 114 in the chat terminal can pass through the bus or other ways to connect, in FIG. 11, the connection through the bus is taken as an example.
  • a chat terminal provided in this embodiment can be configured to execute the method for implementing online chat applied to a chat terminal provided by any of the above embodiments, and has corresponding functions and effects.
  • Embodiment 11 of the present application further provides a computer-readable storage medium, on which a computer program is stored.
  • the program is executed by a processor, the method for implementing online chat in any of the foregoing embodiments can be implemented.
  • the method can include:
  • the method can include:
  • a storage medium containing computer-executable instructions provided by an embodiment of the present application the computer-executable instructions of which are not limited to the above-mentioned method operations, and can also execute any of the methods for implementing online chat provided by any embodiment of the present application. related operations.
  • the present application can be implemented by software and necessary general-purpose hardware, and can also be implemented by hardware.
  • the technical solution of the present application can be embodied in the form of a software product in essence, and the computer software product can be stored in a computer-readable storage medium, such as a floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access A memory (Random Access Memory, RAM), a flash memory (FLASH), a hard disk or an optical disc, etc., including multiple instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the embodiments of the present application.
  • a computer-readable storage medium such as a floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access A memory (Random Access Memory, RAM), a flash memory (FLASH), a hard disk or an optical disc, etc.
  • the multiple units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, each function
  • the names of the units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本文公开了一种实现在线聊天的方法、装置、聊天终端、服务器及存储介质。该实现在线聊天的方法包括:响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。

Description

实现在线聊天的方法、装置、聊天终端、服务器及存储介质 技术领域
本申请涉及网络通信技术领域,例如涉及一种实现在线聊天的方法、装置、聊天终端、服务器及存储介质。
背景技术
随着移动互联网的普及,采用即时通讯(Instant Messaging,IM)技术开发的多类通讯应用广泛应用到人们的日常生活中,支持不同陌生用户在该通讯应用上进行在线聊天,以促进用户主动选择合适的对象,来进行踩房、关注加好友和游戏开黑等集体活动。
通讯应用上针对在线聊天功能的实现,通常会采用第三方对外提供的即时通讯服务软件开发工具包(Software Development Kit,SDK),来设计支持多人在线聊天的语音房。然而第三方的即时通讯服务SDK可能会造成聊天用户的信息泄露,无法保证聊天用户的信息安全;而且,由于第三方提供的即时通讯服务SDK是预先设置好的普遍聊天功能,不支持特定业务下一些个性化聊天功能的专门定制,或者需要通过修改即时通讯服务SDK中的内部结构等来进行专门定制,使得个性化聊天功能的定制流程非常复杂,从而限制了在线聊天功能的扩展。
发明内容
本申请提供了一种实现在线聊天的方法、装置、聊天终端、服务器及存储介质,保证聊天用户的信息安全,简化个性化聊天功能的定制流程,提高在线聊天功能的可扩展性。
提供了一种实现在线聊天的方法,该方法包括:
响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
还提供了一种实现在线聊天的方法,该方法包括:
向服务端发送面向全服聊天室的登录请求,以使所述服务端建立所述登录 请求对应的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
还提供了一种实现在线聊天的装置,该装置包括:
订阅关系建立模块,设置为响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
订阅关系维持模块,设置为利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
还提供了一种实现在线聊天的装置,该装置包括:
登录请求发送模块,设置为向服务端发送面向全服聊天室的登录请求,以使所述服务端建立所述登录请求对应的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
心跳包任务启动模块,设置为在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
还提供了一种服务器,该服务器包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述第一种的实现在线聊天的方法。
还提供了一种聊天终端,该聊天终端包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述第二种的实现在线聊天的方法。
还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的实现在线聊天的方法。
附图说明
图1为本申请实施例提供的一种实现在线聊天的方法所适用的应用场景的 场景架构图;
图2A为本申请实施例一提供的一种实现在线聊天的方法的流程图;
图2B为本申请实施例一提供的一种实现在线聊天过程的原理示意图;
图3A为本申请实施例二提供的一种实现在线聊天的方法的流程图;
图3B为本申请实施例二提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图;
图4A为本申请实施例三提供的一种实现在线聊天的方法的流程图;
图4B为本申请实施例三提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图;
图5A为本申请实施例四提供的一种实现在线聊天的方法的流程图;
图5B为本申请实施例四提供的一种实现在线聊天过程的原理示意图;
图6A为本申请实施例五提供的一种实现在线聊天的方法的流程图;
图6B为本申请实施例五提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图;
图7A为本申请实施例六提供的一种实现在线聊天的方法的流程图;
图7B为本申请实施例六提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图;
图8为本申请实施例七提供的一种实现在线聊天的装置的结构示意图;
图9为本申请实施例八提供的一种实现在线聊天的装置的结构示意图;
图10为本申请实施例九提供的一种服务器的结构示意图;
图11为本申请实施例十提供的一种聊天终端的结构示意图。
具体实施方式
下面结合附图和实施例对本申请进行说明。
本申请实施例针对通过第三方对外提供的即时通讯服务SDK所设计的语音房,容易造成聊天用户信息泄露,且个性化聊天功能的定制流程非常复杂的问题,提供了一种不依赖于第三方提供的即时通讯服务SDK所设计的全服聊天室,该全服聊天室的入口可以设置于通讯应用的首页,支持该通讯应用内的全部注册用户均可以登录到该全服聊天室中,以实现通讯应用内多用户(包括好友用户和陌生用户)之间的在线聊天。在多个聊天终端请求登录该全服聊天室时, 会在服务端分别建立与多个聊天终端之间的消息推送订阅关系,来实现服务端与多个聊天终端之间的消息通讯连接,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化个性化聊天功能的定制流程,提高在线聊天功能的可扩展性;同时,聊天终端在成功登录该全服聊天室后,还会启动心跳包任务,来维持服务端上建立的消息推送订阅关系,保证在线聊天功能的实时性。
图1为本申请实施例提供的一种实现在线聊天的方法所适用的应用场景的场景架构图。参照图1,该应用场景中可以包括聊天终端10和服务端20。
聊天终端10上配置有用于实现不同用户之间在线聊天的通讯应用,在该通讯应用的首页中设置有全服聊天室的入口,聊天用户通过点击该入口即可进入到该全服聊天室中,该全服聊天室支持通讯应用内的全部注册用户进行登录,不会限制在线聊天的用户类型,使得通讯应用内的好友用户和陌生用户均可以在该全服聊天室内进行在线聊天,同时保证该全服聊天室的登录路径较为便捷,无需执行繁琐的登录路径查找。服务端20为该通讯应用的后台服务端,设置为对全服聊天室内多个登录用户之间的在线聊天消息进行转发,从而实现多用户的在线聊天功能。
聊天终端10在开启通讯应用后,聊天用户可以通过点击应用首页中设置的全服聊天室的入口来进入该全服聊天室,聊天终端10根据聊天用户在该入口上的点击操作,可以生成面向该全服聊天室的登录请求并发送给服务端20;服务端20在接收到该聊天终端10面向全服聊天室的登录请求后,会对应建立一个支持该聊天终端10与服务端20之间进行消息传输的消息推送订阅关系,该消息推送订阅关系用于实现该全服聊天室内多个登录用户之间的在线聊天,作为服务端20与每个聊天终端10之间的消息通讯连接,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端10和服务端20之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化个性化聊天功能的定制流程,提高在线聊天功能的可扩展性。为了保证多个登录用户登录到全服聊天室后的实时在线状态,聊天终端10在成功登录该全服聊天室后,会启动对应的心跳包任务,服务端20通过 不断接收该心跳包,可以确认聊天终端10在全服聊天室内一直处于登录状态,则会持续维持在服务端20与该聊天终端10之间建立的消息推送订阅关系,保证全服聊天室内每个登录用户的实时在线,避免异常掉线所造成的在线聊天失败的问题。
本实施例中的聊天终端10可以为在通讯应用中登录全服聊天室内的任一登录用户所在的终端,对聊天终端10的数量不作限定。同时,对于在聊天终端10和服务端20上所执行的实现在线聊天的操作,可以在下述实施例提供的实现在线聊天的方法中进行介绍,在此不作解释说明。
实施例一
图2A为本申请实施例一提供的一种实现在线聊天的方法的流程图,本实施例可适用于不同用户之间采用任一种通讯应用进行在线聊天的情况中。本实施例提供的实现在线聊天的方法可以由本申请实施例提供的配置于服务器上的实现在线聊天的装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的服务器中,该服务器为支持在线聊天的通讯应用对应的后台服务器。
参考图2A,该方法可以包括如下步骤:
S210,响应于聊天终端面向全服聊天室的登录请求,建立与聊天终端之间的消息推送订阅关系。
可选的,随着通讯应用中聊天功能内容越来越丰富,用户会主动寻找志趣相投的其他用户,一起在该通讯应用内使用所感兴趣的聊天功能,例如踩房和游戏开黑等。然而由于通讯应用中语音房的面向用户较为小众,无法满足尽快寻找到志趣相投的其他用户的需求,因此本实施例面向通讯应用中的全部注册用户,会设置一个全服聊天室,并将该全服聊天室的入口设置于通讯应用的首页中,以支持通讯应用内任一注册用户可以尽快进入到该全服聊天室内,与该全服聊天室内的其他用户进行在线聊天。该全服聊天室内的登录用户可以包括好友用户和陌生用户,能够实现全服用户之间的信息交流,满足尽快寻找到志趣相投的其他用户的需求。
通讯应用内的一用户在需要进入全服聊天室进行多人在线聊天时,该用户会在该通讯应用的首页内点击全服聊天室的入口,该用户所在的聊天终端会检测到作用于该入口的点击操作,而生成面向该全服聊天室的登录请求,并将该登录请求发送给服务端;服务端在接收到聊天终端面向全服聊天室的登录请求后,可以确认该聊天终端当前想要在该全服聊天室内进行在线聊天,因此会在 服务端本地建立一个与该聊天终端之间的消息推送订阅关系,作为服务端与该聊天终端之间的通讯连接。如图2B所示,对于全服聊天室内的每一登录用户来说,服务端均会建立一个与该登录用户所在的聊天终端之间的消息推送订阅关系,通过不同登录用户下的消息推送订阅关系,可以实现该全服聊天室内多个登录用户间的在线聊天。本实施例中的全服聊天室依赖服务端与多个聊天终端之间的消息推送订阅关系来设计,而无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化个性化聊天功能的定制流程,提高在线聊天功能的可扩展性。
S220,利用聊天终端成功登录全服聊天室后启动的心跳包任务,维持消息推送订阅关系。
可选的,服务端在建立好与聊天终端之间的消息推送订阅关系之后,说明服务端允许该聊天终端进入全服聊天室,使得聊天终端成功登录到该全服聊天室内。为了避免聊天终端与服务端之间所建立的消息推送订阅关系由于状态不稳定,而导致的在线聊天无法持续的问题,聊天终端会在成功登录该全服聊天室后,启动预先设定的心跳包任务,该心跳包任务要求聊天终端在进入全服聊天室进行在线聊天的期间内,定期向服务端发送心跳包,服务端接收到该心跳包后,会向该聊天终端反馈对应的回包,以保证聊天终端与服务端之间的通讯链路能够一直处于正常连接状态,从而维持服务端与聊天终端之间所建立的消息推送订阅关系一直处于在线状态,保证在线聊天功能的实时性。
本实施例中心跳包任务中定期发送的心跳包和回包可以为空包,也可以携带有当前需要处理的多类信息,对此不作限定。
本实施例提供的技术方案,通过设计一个全服聊天室供多个登录用户进行在线聊天,服务端基于聊天终端发送的面向该全服聊天室的登录请求,来建立与该聊天终端之间的消息推送订阅关系。通过服务端与多个聊天终端之间建立的消息推送订阅关系,可以实现全服聊天室内多个登录用户之间的在线聊天,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK 中的内部结构等来进行专门定制,从而简化了个性化聊天功能的定制流程,提高了在线聊天功能的可扩展性;同时,聊天终端在成功登录该全服聊天室后,还会启动心跳包任务,来维持服务端上建立的消息推送订阅关系,保证在线聊天功能的实时性。
实施例二
图3A为本申请实施例二提供的一种实现在线聊天的方法的流程图,图3B为本申请实施例二提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图。本实施例是在上述实施例的基础上进行说明。,如图3A所示,本实施例对于服务端与聊天终端之间的消息推送订阅关系的建立过程以及全服聊天室的配置过程和退出过程进行解释说明。
可选的,如图3A所示,本实施例中可以包括如下步骤:
S310,响应于聊天终端面向全服聊天室的配置拉取请求,向聊天终端下发全服聊天室的动态配置信息,以使聊天终端在成功登录全服聊天室后,采用动态配置信息配置全服聊天室。
可选的,为了实现全服聊天室内在线聊天功能的准确性,本实施例会预先为该全服聊天室制定相应的配置参数,该配置参数可以包括该全服聊天室内每一登录用户发送聊天消息的单次发送间隔限制、在一定时段内的发送频率限制、聊天室公告、每次进入该全服聊天室时所需展示的最新历史消息数量以及聊天终端在全服聊天室内的最大消息展示数量等。该单次发送间隔限制和在一定时段内的发送频率限制能够避免全服聊天室内同一用户的频繁消息发送,排除全服聊天室内的广告推送等现象,也可以避免由于一用户频繁发送聊天消息而使其他用户的聊天消息被遗漏的情况,提高全服聊天室面向全服用户的使用体验,同时该配置参数能够保证全服聊天室内在线聊天功能的系统化。
为了保证全服聊天室的配置优化,该全服聊天室支持登录用户反馈相应的配置优化意见,并针对该配置优化意见不断对该配置参数进行动态优化,因此该配置参数也就是本实施例中的动态配置信息。
为了保证成功登录全服聊天室后该全服聊天室的准确展示,本实施例会要求聊天终端拉取该全服聊天室的登录配置,因此聊天终端会向服务端发送面向该全服聊天室的配置拉取请求,服务端在接收到该配置拉取请求后,会查找出预先为该全服聊天室所制定的配置参数,也就是本实施例中的动态配置信息,并将该动态配置信息下发给聊天终端,以使聊天终端在成功登录该全服聊天室后,能够采用该动态配置信息中的配置参数来设置全服聊天室的登录状态,例 如利用该动态配置信息控制全服聊天室在聊天终端的用户操作限制和所展示的页面表现等。
示例性的,为了提高全服聊天室的登录高效性,本实施例中聊天终端可以在启动该全服聊天室所在的通讯应用时,便从服务端拉取该全服聊天室的动态配置信息,缓存至聊天终端本地,在后续请求登录该全服聊天室时,可以直接从终端本地查找出预缓存的动态配置信息,来快速控制该全服聊天室在聊天终端上的登录展示。
S320,如果接收到聊天终端面向全服聊天室的登录请求,则基于全服聊天室的开启状态和登录用户上限,生成对应的登录结果响应码。
可选的,为了避免全服聊天室的在线聊天压力,本实施例中服务端在接收到聊天终端面向全服聊天室的登录请求后,首先会分析全服聊天室当前是否已经开启,以及若在开启状态下该全服聊天室内当前的登录用户数量,然后根据全服聊天室的开启状态和判断全服聊天室内的登录用户数量是否超出预设的登录用户上限,来生成对应的登录结果响应码。
示例性的,如果全服聊天室处于关闭状态,则生成的登录结果响应码为登录失败码;如果全服聊天室处于开启状态,但是当前的登录用户数量已经超出该登录用户上限,那么为了减轻多人在线聊天的压力,不支持继续进入该全服聊天室,因此生成的登录结果响应码也为登录失败码;如果全服聊天室处于开启状态,而且当前的登录用户数量未超出该登录用户上限,说明全服聊天室支持继续进入,因此生成的登录结果响应码为登录成功码。
S330,如果登录结果响应码为登录成功码,则建立与聊天终端之间的消息推送订阅关系。
可选的,如果登录结果响应码为登录成功码,说明全服聊天室支持该聊天终端参与当前的多人在线聊天,那么在服务端本地会直接建立与该聊天终端之间的消息推送订阅关系,以实现服务端与聊天终端之间的通讯连接;而如果登录结果响应码为登录失败码,说明全服聊天室不支持该聊天终端参与当前的多人在线聊天,则直接将该登录失败码反馈给聊天终端。
S340,向聊天终端反馈登录结果响应码,以使聊天终端在成功登录全服聊天室后启动心跳包任务。
可选的,服务端在生成对应的登录结果响应码后,为了使聊天终端能够执行后续相应的登录操作,服务端还会将该登录结果响应码反馈给聊天终端,聊天终端在接收到登录成功码后,启动对应的心跳包任务,以维持所建立好的消息推送订阅关系的持续在线状态,而聊天终端在接收到登录失败码后,会提示 对应的登录失败信息,该登录失败信息中会包含当前的登录失败原因。
本实施例中S330和S340之间不存在特定的执行顺序,可以同时执行,也可以依次执行,对此不作限定。
S350,利用聊天终端成功登录全服聊天室后启动的心跳包任务,维持消息推送订阅关系。
S360,响应于聊天终端面向全服聊天室的退出请求,移除与聊天终端所建立的消息推送订阅关系。
可选的,在聊天终端的用户不再需要进行在线聊天时,会从全服聊天室中退出,返回到通讯应用的首页,聊天终端检测到用户从全服聊天室中退出的操作,会生成面向该全服聊天室的退出请求,并将该退出请求上报给服务端,服务端在接收到该退出请求后,会查找出与该聊天终端之间所建立好的消息推送订阅关系,并将查找出的消息推送订阅关系删除,从而取消该聊天终端与服务端之间的通讯连接。同时,聊天终端也会停止所启动的心跳包任务,无需再维护与聊天终端所建立的消息推送订阅关系,不再接收全服聊天室内的聊天消息,从而保证全服聊天室内的在线聊天功能的完整性。
本实施例提供的技术方案,通过拉取全服聊天室的动态配置信息,保证成功登录全服聊天室后该全服聊天室的准确展示,服务端基于聊天终端发送的面向该全服聊天室的登录请求,通过生成的登录结果响应码来建立与该聊天终端之间的消息推送订阅关系,来实现全服聊天室内多个登录用户之间的在线聊天,保证全服聊天室的登录准确性,而且无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化了个性化聊天功能的定制流程,提高了在线聊天功能的可扩展性;同时,通过聊天终端面向全服聊天室的退出请求,来移除服务端与聊天终端之间所建立的消息推送订阅关系,保证全服聊天室内在线聊天功能的完整流程。
实施例三
图4A为本申请实施例三提供的一种实现在线聊天的方法的流程图,图4B为本申请实施例三提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图。本实施例是在上述实施例的基础上进行说明。如图4A所示,本实施 例对于全服聊天室内聊天消息和封禁用户信息的转发过程进行解释说明。
可选的,如图4A所示,本实施例中可以包括如下步骤:
S410,响应于聊天终端面向全服聊天室的登录请求,建立与聊天终端之间的消息推送订阅关系。
S420,利用聊天终端成功登录全服聊天室后启动的心跳包任务,维持消息推送订阅关系。
S430,向全服聊天室内的多个登录用户下发聊天终端的聊天消息,以及全服聊天室内的封禁用户信息。
可选的,服务端建立与多个聊天终端之间的消息推送订阅关系后,表示多个聊天终端的用户已经成功登录到该全服聊天室中,全服聊天室内的多个登录用户即可进行在线聊天。
全服聊天室内的一登录用户在全服聊天室内发送一条聊天消息后,服务端会接收到该聊天消息,并将该聊天消息下发给全服聊天室内的多个其他登录用户,以展示到多个聊天终端展示的全服聊天室内。由于全服聊天室内的登录用户比较复杂,需要保证该全服聊天室内聊天信息的内容健康性,因此本实施例还会实时检测全服聊天室内的聊天消息是否存在违规内容,并将发送违规消息的登录用户作为违规用户,在全服聊天室内进行禁言和封禁操作,此时需要确定出违规用户被封禁时对应的封禁用户信息,例如封禁的用户标识和被封禁时间等,并将该封禁用户信息下发给全服聊天室内的多个登录用户,以在多个登录用户所在的聊天终端中过滤出被封禁用户在全服聊天室内所发送的聊天消息,从而排除全服聊天室内的不良聊天消息,保证多人在线聊天的内容健康性。
示例性的,本实施例在下述内容中分别对全服聊天室内的聊天消息和封禁用户信息的下发过程进行解释说明。
1)针对全服聊天室内聊天消息的下发过程:将聊天终端发送的通过合法性校验的聊天消息,以及该聊天消息的会话时间戳,写入到预设的聊天缓存队列中;定期打包聊天缓存队列中的聊天消息,并将打包后的聊天包下发给全服聊天室内的多个登录用户。
为了保证全服聊天室内聊天消息的合法性,服务端在接收到全服聊天室内的一登录用户所在的聊天终端发送的聊天消息后,首先会对该聊天消息进行合法性校验,例如敏感词检测、违规内容检测以及去重检测等,如果该聊天消息通过合法性校验,则按照服务端时间确定出该聊天消息的会话时间戳,保证不同聊天终端的聊天消息的会话时间戳的基准一致性,然后将该聊天消息和对应的会话时间戳统一写入到预设的聊天缓存队列中,该会话时间戳能够在后续按 照封禁用户信息准确过滤出违规聊天消息。由于全服聊天室内的登录用户较多,使得接收到的聊天消息过多,但却对不同聊天消息的展示时序性要求较低,因此为了避免聊天消息的遗漏,本实施例中服务端会启动一个定时任务,定期(如每隔500ms)将聊天缓存队列中所缓存的全部聊天消息进行打包,得到一个完整的聊天包,然后将该聊天包下发给全服聊天室内的多个登录用户所在的聊天终端,从而实现全服聊天室内聊天消息的完整下发,后续聊天终端接收到该聊天包后,通过对该聊天包进行解析,即可得到多个聊天终端发送的每一条聊天消息以及该聊天消息的会话时间戳,从而按照多个聊天消息的会话时间戳对聊天消息进行排序,再对应展示到每个聊天终端的全服聊天室内,实现全服聊天室内多个登录用户间的在线聊天。
2)针对全服聊天室内封禁用户信息的下发过程:通过秩序管理端实时审核全服聊天室内的聊天消息,并在全服聊天室内封禁违规聊天消息指向的违规登录用户;将违规登录用户的用户标识和封禁时间戳作为封禁用户信息,写入到预设的封禁缓存队列中;定期打包封禁缓存队列中的封禁用户信息,并将打包后的封禁包下发给全服聊天室内的多个登录用户,以使聊天终端按照封禁用户信息对全服聊天室内的聊天消息进行过滤。
由于在对聊天消息进行合法性校验时,可能会遗漏部分不良聊天消息而展示到全服聊天室内,因此为了保证全服聊天室内聊天消息的内容健康性,本实施例会专门设置一个秩序管理端。如图4B所示,由该秩序管理端专门审核全服聊天室内的每个聊天消息中是否存在违规内容,从而审核出全服聊天室内的全部违规聊天消息,并将发送该违规聊天消息的登录用户作为违规登录用户,对其在全服聊天室内进行禁言或封禁操作等处罚措施,以维护全服聊天室内绿色健康的发言空间。同时,为了排除违规登录用户已经发送的违规聊天消息的影响,服务端还会确定出违规登录用户的用户标识以及在全服聊天室内被封禁时的封禁时间戳,然后将违规登录用户的用户标识和该封禁时间戳作为本实施例中的封禁用户信息,统一写入到预设的封禁缓存队列中。相应的,采用与聊天消息下发类似的机制,也启动一个定时任务,定期(如每隔500ms)将该封禁缓存队列中所缓存的多个封禁用户信息进行打包,得到一个完整的封禁包,并将该封禁包下发给全服聊天室内的多个登录用户所在的聊天终端,以使每一聊天终端在接收到该封禁包时,通过对该封禁包进行解析,得到封禁用户信息,并按照封禁用户信息中的用户标识和封禁时间戳,从该聊天终端在全服聊天室内展示的全部聊天消息中,过滤出由封禁用户信息中的用户标识下的违规登录用户发送的会话时间戳位于该封禁时间戳之前的聊天消息,从而保证全服聊天室内聊天消息的内容健康性。
此外,由于封禁包在下发过程中可能存在丢包的情况,而使得被封禁的登 录用户已经发送的聊天消息过滤可能存在遗漏,因此为了保证违规登录用户所发送的聊天消息的全面过滤,本实施例在利用聊天终端成功登录全服聊天室后启动的心跳包任务,维持消息推送订阅关系时,还可以包括:解析聊天终端定期发送的心跳包,得到聊天终端在全服聊天室内展示的聊天消息的起止时间戳以及在起止时间戳所在时段内接收到的封禁包数量;根据封禁包数量以及起止时间戳所在时段内的封禁包下发次数,判断聊天终端是否丢失封禁包;若聊天终端丢失封禁包,则通过心跳包的回包向聊天终端再次下发在起止时间戳所在时段内的封禁包。
由于聊天终端在成功登录全服聊天室后,可能会由于断网、杀死应用进程等而无法保证服务端与聊天终端之间所建立的消息推送订阅关系一直准确在线,因此本实施例中聊天终端会通过定期向服务端发送心跳包,并由服务端返回对应的回包,来实时修正消息推送订阅关系的在线状态。为了保证违规聊天消息的完整过滤,聊天终端在向服务端发送心跳包时,会在该心跳包中携带该聊天终端在全服聊天室内展示的聊天消息的起止时间戳,聊天终端可以通过预设一个本地消息队列来缓存该聊天终端在全服聊天室内展示的聊天消息,那么聊天终端在全服聊天室内展示的聊天消息的起止时间戳则为该聊天终端的本地消息队列中缓存的聊天消息的起止时间戳,同时心跳包中还会携带聊天终端在该起止时间戳所在时段内接收到的封禁包数量,服务端在接收到聊天终端定期发送的心跳包时,首先会解析出该聊天终端在全服聊天室内展示的聊天消息的起止时间戳以及在该起止时间戳所在时段内接收到的封禁包数量,然后分析在该起止时间戳所在时段内实际向该聊天终端下发封禁包的次数,也就是本实施例中的封禁包下发次数,并通过判断所解析出的封禁包数量与实际下发的封禁包下发次数是否一致,来判断该聊天终端是否丢失封禁包;若所解析出的封禁包数量低于实际下发的封禁包下发次数,则确定丢失封禁包,则服务端会在该心跳包的回包中携带在该起止时间戳所在时段内实际下发的封禁包,以使聊天终端在该回包中解析出封禁包内的封禁用户信息,并按照封禁用户信息重新对全服聊天室内的聊天消息进行违规过滤,从而对全服聊天室内的聊天消息进行把控,对违规聊天消息进行及时处理,提供一个良好的虚拟网络交流环境。
S440,将所下发的聊天消息和封禁用户信息存储至预先为全服聊天室设置的历史数据库中,以使聊天终端在成功登录全服聊天室后,通过历史数据库实现全服聊天室内的历史消息展示。
可选的,为了保证聊天终端在刚进入全服聊天室时的聊天参与性,服务端会在将全服聊天室内的聊天消息和封禁用户信息对应下发给全服聊天室内的多个登录用户后,将所下发的聊天消息和封禁用户信息存储至预先为全服聊天室设置的历史数据库中,以使聊天终端在成功登录全服聊天室后,可以从历史数 据库中拉取相应的历史聊天消息进行展示,从而实现全服聊天室内的历史消息展示。由于该历史数据库中存储有聊天消息和封禁用户信息,因此在进行历史消息展示时,还会按照该封禁用户信息对所拉取的聊天消息进行过滤,从而保证全服聊天室内聊天消息的内容健康性。
示例性的,本实施例中服务端通过聊天包和封禁包下发聊天消息和封禁用户信息时,会直接将该聊天包和封禁包存储至该历史数据库中。
S450,响应于聊天终端面向全服聊天室的断网重连指令,将历史数据库中目标数量下的最新历史消息作为断网重登消息并下发给聊天终端,以使聊天终端在断网后重新登录全服聊天室时,按照断网重登消息与聊天终端中的已有聊天消息,实现全服聊天室内的消息重新展示。
可选的,聊天终端由于断网而需要重新登录全服聊天室时,会面向该全服聊天室生成对应的断网重连指令,并发送给服务端;服务端在接收到聊天终端面向全服聊天室的断网重连指令后,会按照该全服聊天室的动态配置信息,从历史数据库中查找出目标数量下的最新历史消息,作为本实施例中的断网重登消息,并将该断网重登消息下发给该聊天终端,使得聊天终端在断网后重新登录全服聊天室时,可以确定出该断网重登消息中的聊天消息和封禁用户信息,然后根据该断网重登消息中的聊天消息与聊天终端中的已有聊天消息之间的消息重合状态,判断是否在断网重登期间遗漏部分聊天消息或封禁用户信息,若在两者之间有消息重合,则直接采用断网重登消息中的用户封禁信息对所有聊天消息进行过滤,即可排除违规聊天消息的影响;若在两者之间没有消息重合,说明可能遗漏部分消息,因此需要消除聊天终端本地的已有聊天消息,并采用断网重登消息中的用户封禁信息对该断网重登消息中的聊天消息进行过滤,然后在全服聊天室内展示重新拉取的聊天消息中过滤出的聊天消息,即可排除违规聊天消息的影响,从而实现全服聊天室内的消息重新展示。
本实施例提供的技术方案,通过聊天缓存队列和封禁缓存队列专门设置全服聊天室内聊天消息和封禁用户信息的下发流程,保证全服聊天室内聊天消息的完整性,并提高违规聊天消息过滤的全面性和准确性;同时,通过历史数据库存储已下发的聊天消息和封禁用户信息,并在初步成功登录或断网重新登录全服聊天室后,拉取对应的聊天消息和封禁用户信息进行消息重新展示,准确排除违规聊天消息的影响,保证在线聊天功能的全面性。
实施例四
图5A为本申请实施例四提供的一种实现在线聊天的方法的流程图,图5B 为本申请实施例四提供的一种实现在线聊天过程的原理示意图。本实施例可适用于不同用户之间采用任一种通讯应用进行在线聊天的情况中。本实施例提供的实现在线聊天的方法可以由本申请实施例提供的配置于聊天终端上的实现在线聊天的装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的聊天终端中,该聊天终端上配置有通过全服聊天室来实现多人在线聊天的通讯应用。
参考图5A,该方法可以包括如下步骤:
S510,向服务端发送面向全服聊天室的登录请求,以使服务端建立对应的消息推送订阅关系。
可选的,本实施例面向通讯应用中的全部注册用户,会设置一个全服聊天室,并将该全服聊天室的入口设置于通讯应用的首页中,以支持通讯应用内任一注册用户可以尽快进入到该全服聊天室内,与该全服聊天室内的其他用户进行在线聊天。该全服聊天室内的登录用户可以包括好友用户和陌生用户,能够实现全服用户之间的信息交流,满足尽快寻找到志趣相投的其他用户的需求。
通讯应用内的一用户在需要进入全服聊天室进行多人在线聊天时,该用户会在该通讯应用的首页内点击全服聊天室的入口,该用户所在的聊天终端会检测到作用于该入口的点击操作,而生成面向该全服聊天室的登录请求,并将该登录请求发送给服务端;服务端在接收到聊天终端面向全服聊天室的登录请求后,会在服务端本地建立一个与该聊天终端之间的消息推送订阅关系,作为服务端与该聊天终端之间的通讯连接,以实现全服聊天室内多个登录用户间的在线聊天。
本实施例中的全服聊天室依赖服务端与多个聊天终端之间的消息推送订阅关系来设计,而无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化个性化聊天功能的定制流程,提高在线聊天功能的可扩展性。
S520,在成功登录全服聊天室后,启动心跳包任务,以维持消息推送订阅关系。
可选的,为了避免聊天终端与服务端之间所建立的消息推送订阅关系由于状态不稳定,而导致的在线聊天无法持续的问题,聊天终端会在成功登录该全 服聊天室后,启动预先设定的心跳包任务,该心跳包任务要求聊天终端在进入全服聊天室进行在线聊天的期间内,定期向服务端发送心跳包,服务端接收到该心跳包后,会向该聊天终端反馈对应的回包,以保证聊天终端与服务端之间的通讯链路能够一直处于正常连接状态,从而维持服务端与聊天终端之间所建立的消息推送订阅关系一直处于在线状态,保证在线聊天功能的实时性。
本实施例提供的技术方案,通过设计一个全服聊天室供多个登录用户进行在线聊天,服务端基于聊天终端发送的面向该全服聊天室的登录请求,来建立与该聊天终端之间的消息推送订阅关系,通过服务端与多个聊天终端之间建立的消息推送订阅关系,可以实现全服聊天室内多个登录用户之间的在线聊天,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化了个性化聊天功能的定制流程,提高了在线聊天功能的可扩展性;同时,聊天终端在成功登录该全服聊天室后,还会启动心跳包任务,来维持服务端上建立的消息推送订阅关系,保证在线聊天功能的实时性。
实施例五
图6A为本申请实施例五提供的一种实现在线聊天的方法的流程图,图6B为本申请实施例五提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图。本实施例是在上述实施例的基础上进行说明。如图6A所示,本实施例对于服务端与聊天终端之间的消息推送订阅关系的建立过程以及全服聊天室的配置过程和退出过程进行解释说明。
可选的,如图6A所示,本实施例中可以包括如下步骤:
S610,响应于全服聊天室所在应用的开启指令,向服务端发送面向全服聊天室的配置拉取请求,以获取全服聊天室的动态配置信息。
可选的,为了提高全服聊天室的登录高效性,聊天终端可以在启动该全服聊天室所在的通讯应用时,生成全服聊天室所在应用的开启指令,并根据该开启指令从服务端拉取该全服聊天室的动态配置信息。首先会生成面向全服聊天室的配置拉取请求,并将该配置拉取请求发送给服务端,以获取服务端预先为该全服聊天室所制定的动态配置信息,以便后续在成功登录全服聊天室后,能 够采用该动态配置信息中的配置参数来设置全服聊天室的登录状态,例如利用该动态配置信息控制全服聊天室在聊天终端的用户操作限制和所展示的页面表现等。
S620,向服务端发送面向全服聊天室的登录请求,以使服务端建立对应的消息推送订阅关系。
S630,接收服务端下发的登录结果响应码;如果登录结果响应码为登录成功码,则采用动态配置信息配置全服聊天室,并展示全服聊天室的首页面,以成功登录全服聊天室。
可选的,为了避免全服聊天室的在线聊天压力,服务端在接收到聊天终端面向全服聊天室的登录请求后,会根据全服聊天室的开启状态和登录用户上限,来判断全服聊天室当前是否支持再进入新的聊天用户,从而生成对应的登录结果响应码,并将该登录结果响应码下发给聊天终端,聊天终端会接收到该登录结果响应码。如果该登录结果响应码为登录成功码,说明服务端允许聊天终端进入该全服聊天室,那么可以采用预先获取的动态配置信息来配置该全服聊天室,从而展示全服聊天室的首页面,以成功登录到该全服聊天室内。此外,如果聊天终端接收到的登录结果响应码为登录失败码,则会提示对应的登录失败信息,该登录失败信息中会包含当前的登录失败原因。
S640,在成功登录全服聊天室后,启动心跳包任务,以维持消息推送订阅关系。
S650,响应于当前聊天消息的发送指令,对当前聊天消息进行本地初步校验。
可选的,聊天终端在成功登录到全服聊天室后,会采用全服聊天室所支持的多种消息类型来发送聊天消息,例如在全服聊天室的首页面底部的输入框中输入消息内容,并点击发送按钮,即可执行消息发送操作。聊天终端在检测到该消息发送操作时,会生成当前聊天消息的发送指令,然后对该发送指令中携带的当前聊天消息的消息内容进行本地初步校验。如图6B所示,该本地初步校验可以为判断是否符合动态配置信息中单次发送间隔限制和在一定时段内的发送频率限制等发送条件的要求,如果没有通过本地初步校验,那么不会将当前聊天消息发送给服务端。
S660,如果当前聊天消息通过本地初步校验,则将当前聊天消息发送给服务端,以使服务端对当前聊天消息进行合法性校验。
可选的,聊天终端在确定当前聊天消息通过本地初步校验后,需要将该当前聊天消息发送给服务端,由服务端对当前聊天消息进行合法性校验,以保证 全服聊天室内聊天消息的内容健康性。
S670,如果当前聊天消息未通过本地初步校验或者未通过服务端的合法性校验,则展示对应的发送错误提示。
可选的,如果当前聊天消息未通过本地初步校验或者未通过服务端的合法性校验,均不会展示到全服聊天室内,因此聊天终端会展示对应的发送错误提示,以通知该聊天终端的登录用户当前聊天消息发送失败,以及发送失败的原因。
S680,响应于面向全服聊天室的退出请求,停止心跳包任务,并向服务端发送退出请求,以使服务端移除所建立的消息推送订阅关系。
可选的,在聊天终端的用户不再需要进行在线聊天时,会从全服聊天室中退出,返回到通讯应用的首页。聊天终端检测到用户从全服聊天室中退出的操作,会生成面向该全服聊天室的退出请求,并基于该退出请求停止所启动的心跳包任务,无需再维护与聊天终端所建立的消息推送订阅关系,不再接收全服聊天室内的聊天消息。聊天终端还会将该退出请求上报给服务端,以使服务端将与该聊天终端所建立的消息推送订阅关系删除,从而取消该聊天终端与服务端之间的通讯连接,从而保证全服聊天室内的在线聊天功能的完整性。
本实施例提供的技术方案,通过拉取全服聊天室的动态配置信息,保证成功登录全服聊天室后该全服聊天室的准确展示,聊天终端发送聊天消息时,会对当前聊天消息进行本地初步校验,避免全服聊天室内同一登录用户的聊天消息频繁发送,并对未通过本地初步校验或者未通过服务端的合法性校验的聊天消息进行发送错误提示,提高全服聊天室内聊天消息的简洁性;同时,通过聊天终端面向全服聊天室的退出请求,来移除服务端与聊天终端之间所建立的消息推送订阅关系,保证全服聊天室内在线聊天功能的完整流程。
实施例六
图7A为本申请实施例六提供的一种实现在线聊天的方法的流程图,图7B为本申请实施例六提供的一种全服聊天室内多人在线聊天功能的实现过程的原理示意图。本实施例是在上述实施例的基础上进行说明。如图7A所示,本实施例对于全服聊天室内聊天消息和封禁用户信息的转发过程进行解释说明。
可选的,如图7A所示,本实施例中可以包括如下步骤:
S710,向服务端发送面向全服聊天室的登录请求,以使服务端建立对应的消息推送订阅关系。
S720,在成功登录全服聊天室后,启动心跳包任务,以维持消息推送订阅关系。
S730,接收服务端定期下发的聊天包和封禁包,并解析出聊天包内的聊天消息和封禁包内的封禁用户信息。
可选的,由于服务端在下发聊天消息和封禁用户信息时,会通过定期打包聊天缓存队列中的聊天消息,和定期打包封禁缓存队列中的封禁用户信息,而定期将打包后的聊天包和封禁包下发给全服聊天室内的多个登录用户所在的聊天终端,因此聊天终端会定期接收服务端定期下发的聊天包和封禁包,通过分别解析聊天包和封禁包,可以得到所下发的聊天消息和该聊天消息对应的会话时间戳,以及所下发的封禁用户信息中的用户标识和封禁时间戳,以便后续对全服聊天室内的聊天消息进行准确过滤。
S740,将聊天包内的聊天消息写入到本地消息队列中,并按照封禁用户信息对本地消息队列中的聊天消息进行过滤。
可选的,聊天终端在解析出聊天包内的聊天消息和封禁包内的封禁用户信息后,为了提高全服聊天室内聊天消息查找的便捷性,本实施例会在聊天终端上预先设置一个本地消息队列,通过该本地消息队列缓存聊天终端在全服聊天室内展示的聊天消息,且本地消息队列的容量为全服聊天室的动态配置信息中的最大消息展示数量。因此,如图7B所示,聊天终端会将聊天包内解析出的聊天消息对应写入到该本地消息队列中,然后按照封禁包中解析出的封禁用户信息对本地消息队列中由被封禁的用户所发送的聊天消息进行过滤,从而排除全服聊天室内的违规聊天消息。
示例性的,为了保证全服聊天室内聊天消息的过滤准确性,本实施例对本地消息队列中会话时间戳位于封禁用户信息中的封禁时间戳之前的聊天消息进行过滤,以避免过滤解封禁后的用户所发送的聊天消息。
S750,在全服聊天室内刷新展示本地消息队列中过滤后的聊天消息。
可选的,通过在全服聊天室内重新展示本地消息队列中过滤后的聊天消息,排除违规聊天消息的影响,及时对不良聊天消息进行处理,保证全服聊天室内聊天消息的内容健康性。
此外,由于封禁包在下发过程中可能存在丢包的情况,而使得被封禁的登录用户已经发送的聊天消息过滤可能存在遗漏,因此为了保证违规登录用户所发送的聊天消息的全面过滤,本实施例中聊天终端启动心跳包任务时,可以包括:定期向服务端发送心跳包,心跳包中携带本地消息队列中聊天消息的起止时间戳以及在起止时间戳所在时段内接收到的封禁包数量,以使服务端判断本 地是否丢失封禁包;如果心跳包的回包非空,则解析回包中携带的在起止时间戳所在时段内的封禁包,并对本地消息队列中的聊天消息进行重新过滤。
由于聊天终端在成功登录全服聊天室后,可能会由于断网、杀死应用进程等而无法保证服务端与聊天终端之间所建立的消息推送订阅关系一直准确在线,因此本实施例中聊天终端会通过定期向服务端发送心跳包,并由服务端返回对应的回包,来实时修正消息推送订阅关系的在线状态。为了保证违规聊天消息的完整过滤,聊天终端在向服务端发送心跳包时,会在该心跳包中携带该聊天终端在全服聊天室内展示的聊天消息的起止时间戳,聊天终端可以通过预设一个本地消息队列来缓存该聊天终端在全服聊天室内展示的聊天消息,那么聊天终端在全服聊天室内展示的聊天消息的起止时间戳则为该聊天终端的本地消息队列中缓存的聊天消息的起止时间戳,同时心跳包中还会携带聊天终端在该起止时间戳所在时段内接收到的封禁包数量,服务端在接收到聊天终端定期发送的心跳包时,首先会解析出该聊天终端在全服聊天室内展示的聊天消息的起止时间戳以及在该起止时间戳所在时段内接收到的封禁包数量,然后分析在该起止时间戳所在时段内实际向该聊天终端下发封禁包的次数,也就是本实施例中的封禁包下发次数,并通过判断所解析出的封禁包数量与实际下发的封禁包下发次数是否一致,来判断该聊天终端是否丢失封禁包;若所解析出的封禁包数量低于实际下发的封禁包下发次数,则确定丢失封禁包,则服务端会在该心跳包的回包中携带在该起止时间戳所在时段内实际下发的封禁包,以使聊天终端在该回包中解析出封禁包内的封禁用户信息,并按照封禁用户信息重新对全服聊天室内的聊天消息进行违规过滤,从而对全服聊天室内的聊天消息进行把控,对违规聊天消息进行及时处理,提供一个良好的虚拟网络交流环境。
S760,向服务端发送历史聊天消息的拉取请求,以使服务端从为全服聊天室设置的历史数据库中查找出目标数量的最新历史消息,作为常规登录消息;按照常规登录消息中的聊天消息和封禁用户信息,在全服聊天室内展示未被封禁下的聊天消息。
可选的,为了保证聊天终端在刚进入全服聊天室时的聊天参与性,服务端会在将全服聊天室内的聊天包和封禁包对应下发给全服聊天室内的多个登录用户后,将所下发的聊天包和封禁包存储至预先为全服聊天室设置的历史数据库中,使得聊天终端在成功登录全服聊天室后,通过向服务端发送历史聊天消息的拉取请求,可以从历史数据库中拉取相应的历史聊天消息进行展示,从而实现全服聊天室内的历史消息展示。服务端响应于该拉取请求,会从为全服聊天室设置的历史数据库中查找出目标数量的最新历史消息,作为正常登录全服聊天室的常规登录消息;聊天终端在接收到该目标数量的常规登录消息后,会区分出该常规登录消息中的聊天消息和封禁用户信息,然后按照该封禁用户信息 对该聊天消息进行过滤,并将过滤后的聊天消息展示在全服聊天室内。
示例性的,该常规登录消息中可以包括对应的聊天包和封禁包。
S770,在断网后重新登录全服聊天室时,向服务端发送面向全服聊天室的断网重连指令,以使服务端从为全服聊天室设置的历史数据库中查找出目标数量的最新历史消息,作为断网重登消息;根据断网重登消息中的聊天消息与本地消息队列中的已有聊天消息之间的消息重合状态,更新本地消息队列;按照断网重登消息中的封禁用户信息和更新后的本地消息队列,在全服聊天室内重新展示未被封禁下的聊天消息。
可选的,聊天终端由于断网而需要重新登录全服聊天室时,会面向该全服聊天室生成对应的断网重连指令,服务端在接收到聊天终端面向全服聊天室的断网重连指令后,会按照该全服聊天室的动态配置信息,从历史数据库中查找出目标数量下的最新历史消息,作为本实施例中的断网重登消息,并将该断网重登消息下发给该聊天终端;聊天终端在断网后重新登录全服聊天室时,可以确定出该断网重登消息中的聊天消息和封禁用户信息,然后通过分析该断网重登消息中的聊天消息与本地消息队列中的已有聊天消息之间是否存在重合消息,得到对应的消息重合状态,从而判断聊天终端是否遗漏在断网重登期间的部分聊天消息或封禁用户信息,若在两者之间有消息重合,则直接将断网重登消息中的未重合的聊天消息,存储到本地消息队列中,以更新该本地消息队列;而若在两者之间没有消息重合,说明可能遗漏部分消息,因此需要消除聊天终端上本地消息队列中的已有聊天消息,并将断网重登消息中的聊天消息存储到消除后的本地消息队列中,以更新该本地消息队列;最后,采用断网重登消息中的封禁用户信息对更新后的本地消息队列中的聊天消息进行过滤,从而在全服聊天室内重新展示未被封禁下的聊天消息,保证全服聊天室内聊天消息的内容健康性。
示例性的,该断网重登消息中可以包括对应的聊天包和封禁包。
本实施例提供的技术方案,通过聊天缓存队列和封禁缓存队列专门设置全服聊天室内聊天消息和封禁用户信息的下发流程,保证全服聊天室内聊天消息的完整性,并提高违规聊天消息过滤的全面性和准确性;同时,通过历史数据库存储已下发的聊天消息和封禁用户信息,并在初步成功登录或断网重新登录全服聊天室后,拉取对应的聊天消息和封禁用户信息进行消息重新展示,准确排除违规聊天消息的影响,保证在线聊天功能的全面性。
实施例七
图8为本申请实施例七提供的一种实现在线聊天的装置的结构示意图,可应用于本申请提供的服务器中,如图8所示,该装置可以包括:
订阅关系建立模块810,设置为响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;订阅关系维持模块820,设置为利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
本实施例提供的技术方案,通过设计一个全服聊天室供多个登录用户进行在线聊天,服务端基于聊天终端发送的面向该全服聊天室的登录请求,来建立与该聊天终端之间的消息推送订阅关系。通过服务端与多个聊天终端之间建立的消息推送订阅关系,可以实现全服聊天室内多个登录用户之间的在线聊天,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化了个性化聊天功能的定制流程,提高了在线聊天功能的可扩展性;同时,聊天终端在成功登录该全服聊天室后,还会启动心跳包任务,来维持服务端上建立的消息推送订阅关系,保证在线聊天功能的实时性。
本实施例提供的实现在线聊天的装置可适用于上述任意实施例提供的应用于服务器上的实现在线聊天的方法,具备相应的功能和效果。
实施例八
图9为本申请实施例八提供的一种实现在线聊天的装置的结构示意图,可应用于本申请提供的聊天终端中,如图9所示,该装置可以包括:
登录请求发送模块910,设置为向服务端发送面向全服聊天室的登录请求,以使所述服务端建立对应的消息推送订阅关系,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;心跳包任务启动模块920,设置为在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
本实施例提供的技术方案,通过设计一个全服聊天室供多个登录用户进行在线聊天,服务端基于聊天终端发送的面向该全服聊天室的登录请求,来建立 与该聊天终端之间的消息推送订阅关系,通过服务端与多个聊天终端之间建立的消息推送订阅关系,可以实现全服聊天室内多个登录用户之间的在线聊天,无需依赖第三方对外提供的即时通讯服务SDK,即可实现多用户的在线聊天服务,避免第三方对外提供的即时通讯服务SDK造成的聊天用户信息泄露,从而保证聊天用户的信息安全性,而且由于消息推送订阅关系会在聊天终端和服务端之间提供一条通信链路,而不会限定在线聊天功能,因此在该消息推送订阅关系外可以直接定制个性化的在线聊天功能,无需通过修改即时通讯服务SDK中的内部结构等来进行专门定制,从而简化了个性化聊天功能的定制流程,提高了在线聊天功能的可扩展性;同时,聊天终端在成功登录该全服聊天室后,还会启动心跳包任务,来维持服务端上建立的消息推送订阅关系,保证在线聊天功能的实时性。
本实施例提供的实现在线聊天的装置可适用于上述任意实施例提供的应用于聊天终端上的实现在线聊天的方法,具备相应的功能和效果。
实施例九
图10为本申请实施例九提供的一种服务器的结构示意图,如图10所示,该服务器包括处理器100、存储装置101和通信装置102;服务器中处理器100的数量可以是一个或多个,图10中以一个处理器100为例;服务器中的处理器100、存储装置101和通信装置102可以通过总线或其他方式连接,图10中以通过总线连接为例。
本实施例提供的一种服务器可设置为执行上述任意实施例提供的应用于服务端上的实现在线聊天的方法,具备相应的功能和效果。
实施例十
图11为本申请实施例十提供的一种聊天终端的结构示意图,如图11所示,该聊天终端包括处理器110、存储装置111、通信装置112、输入装置113和输出装置114;聊天终端中处理器110的数量可以是一个或多个,图11中以一个处理器110为例;聊天终端中的处理器110、存储装置111、通信装置112、输入装置113和输出装置114可以通过总线或其他方式连接,图11中以通过总线连接为例。
本实施例提供的一种聊天终端可设置为执行上述任意实施例提供的应用于聊天终端上的实现在线聊天的方法,具备相应的功能和效果。
实施例十一
本申请实施例十一还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时可实现上述任意实施例中的实现在线聊天的方法。该方法可以包括:
响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
或者,该方法可以包括:
向服务端发送面向全服聊天室的登录请求,以使所述服务端建立对应的消息推送订阅关系,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的实现在线聊天的方法中的相关操作。
通过以上关于实施方式的描述,本申请可借助软件及必需的通用硬件来实现,也可以通过硬件实现。本申请的技术方案本质上可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例所述的方法。
上述实现在线聊天的装置的实施例中,所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,每个功能单元的名称也只是为了便于相互区分,并不用于限制本申请的保护范围。

Claims (26)

  1. 一种实现在线聊天的方法,包括:
    响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
    利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
  2. 根据权利要求1所述的方法,其中,所述响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,包括:
    在接收到所述聊天终端面向所述全服聊天室的登录请求的情况下,基于所述全服聊天室的开启状态和登录用户上限,生成登录结果响应码;
    在所述登录结果响应码为登录成功码的情况下,建立与所述聊天终端之间的所述消息推送订阅关系。
  3. 根据权利要求2所述的方法,其中,在所述生成登录结果响应码之后,还包括:
    向所述聊天终端反馈所述登录结果响应码,以使所述聊天终端在成功登录所述全服聊天室后启动所述心跳包任务。
  4. 根据权利要求1所述的方法,在所述建立与所述聊天终端之间的消息推送订阅关系之后,还包括:
    向所述全服聊天室内的多个登录用户下发所述聊天终端的聊天消息,以及所述全服聊天室内的封禁用户信息。
  5. 根据权利要求4所述的方法,其中,所述向所述全服聊天室内的多个登录用户下发所述聊天终端的聊天消息,包括:
    将所述聊天终端发送的通过合法性校验的聊天消息,以及所述聊天消息的会话时间戳,写入到预设的聊天缓存队列中;
    定期打包所述聊天缓存队列中的聊天消息,并将打包后的聊天包下发给所述全服聊天室内的多个登录用户。
  6. 根据权利要求4所述的方法,其中,所述向所述全服聊天室内的多个登录用户下发所述全服聊天室内的封禁用户信息,包括:
    通过秩序管理端实时审核所述全服聊天室内的聊天消息,并在所述全服聊天室内封禁违规聊天消息指向的违规登录用户;
    将所述违规登录用户的用户标识和封禁时间戳作为封禁用户信息,写入到 预设的封禁缓存队列中;
    定期打包所述封禁缓存队列中的封禁用户信息,并将打包后的封禁包下发给所述全服聊天室内的多个登录用户,以使所述聊天终端按照所述封禁用户信息对所述全服聊天室内的聊天消息进行过滤。
  7. 根据权利要求6所述的方法,在利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系的情况下,还包括:
    解析所述聊天终端定期发送的心跳包,得到所述聊天终端在所述全服聊天室内展示的聊天消息的起止时间戳以及在所述起止时间戳所在时段内接收到的封禁包数量;
    根据所述封禁包数量以及所述起止时间戳所在时段内的封禁包下发次数,判断所述聊天终端是否丢失封禁包;
    响应于所述聊天终端丢失所述封禁包,通过所述心跳包的回包向所述聊天终端再次下发在所述起止时间戳所在时段内的封禁包。
  8. 根据权利要求4所述的方法,在向所述全服聊天室内的多个登录用户下发所述聊天终端的聊天消息,以及所述全服聊天室内的封禁用户信息的情况下,还包括:
    将所下发的聊天消息和封禁用户信息存储至预先为所述全服聊天室设置的历史数据库中,以使所述聊天终端在成功登录所述全服聊天室后,通过所述历史数据库实现所述全服聊天室内的历史消息展示。
  9. 根据权利要求8所述的方法,在所述建立与所述聊天终端之间的消息推送订阅关系之后,还包括:
    响应于所述聊天终端面向所述全服聊天室的断网重连指令,将所述历史数据库中目标数量下的最新历史消息作为断网重登消息并将所述断网重登消息下发给所述聊天终端,以使所述聊天终端在断网后重新登录所述全服聊天室的情况下,按照所述断网重登消息与所述聊天终端中的已有聊天消息,实现所述全服聊天室内的消息重新展示。
  10. 根据权利要求1-9任一项所述的方法,在所述响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系之前,还包括:
    响应于所述聊天终端面向所述全服聊天室的配置拉取请求,向所述聊天终端下发所述全服聊天室的动态配置信息,以使所述聊天终端在成功登录所述全服聊天室后,采用所述动态配置信息配置所述全服聊天室。
  11. 根据权利要求1-9任一项所述的方法,在所述响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系之后,还包括:
    响应于所述聊天终端面向所述全服聊天室的退出请求,移除与所述聊天终端所建立的所述消息推送订阅关系。
  12. 一种实现在线聊天的方法,包括:
    向服务端发送面向全服聊天室的登录请求,以使所述服务端建立所述登录请求对应的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
    在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
  13. 根据权利要求12所述的方法,在所述向服务端发送面向全服聊天室的登录请求之后,还包括:
    接收所述服务端下发的登录结果响应码;
    在所述登录结果响应码为登录成功码的情况下,展示所述全服聊天室的首页面,以成功登录所述全服聊天室。
  14. 根据权利要求12所述的方法,在所述成功登录所述全服聊天室之后,还包括:
    响应于当前聊天消息的发送指令,对所述当前聊天消息进行本地初步校验;
    在所述当前聊天消息通过本地初步校验的情况下,将所述当前聊天消息发送给所述服务端,以使所述服务端对所述当前聊天消息进行合法性校验;
    在所述当前聊天消息未通过本地初步校验或者未通过所述服务端的合法性校验的情况下,展示对应的发送错误提示。
  15. 根据权利要求12所述的方法,在所述成功登录所述全服聊天室之后,还包括:
    接收所述服务端定期下发的聊天包和封禁包,并解析出所述聊天包内的聊天消息和所述封禁包内的封禁用户信息;
    将所述聊天包内的聊天消息写入到本地消息队列中,并按照所述封禁用户信息对所述本地消息队列中的聊天消息进行过滤;
    在所述全服聊天室内刷新展示所述本地消息队列中过滤后的聊天消息。
  16. 根据权利要求15所述的方法,其中,所述按照所述封禁用户信息对所 述本地消息队列中的聊天消息进行过滤,包括:
    对所述本地消息队列中会话时间戳位于所述封禁用户信息中的封禁时间戳之前的聊天消息进行过滤。
  17. 根据权利要求15所述的方法,其中,所述启动心跳包任务,包括:
    定期向所述服务端发送心跳包,其中,所述心跳包中携带所述本地消息队列中聊天消息的起止时间戳以及在所述起止时间戳所在时段内接收到的封禁包数量,以使所述服务端判断本地是否丢失封禁包;
    在所述心跳包的回包非空的情况下,解析所述回包中携带的在所述起止时间戳所在时段内的封禁包,并对所述本地消息队列中的聊天消息进行重新过滤。
  18. 根据权利要求12所述的方法,在成功登录所述全服聊天室的情况下,还包括:
    向所述服务端发送历史聊天消息的拉取请求,以使服务端从为所述全服聊天室设置的历史数据库中查找出目标数量的最新历史消息,作为常规登录消息,其中,所述历史数据库存储所述服务端下发的聊天消息和封禁用户信息;
    按照所述常规登录消息中的聊天消息和封禁用户信息,在所述全服聊天室内展示未被封禁下的聊天消息。
  19. 根据权利要求12所述的方法,在所述成功登录所述全服聊天室之后,还包括:
    在断网后重新登录所述全服聊天室的情况下,向所述服务端发送面向所述全服聊天室的断网重连指令,以使所述服务端从为所述全服聊天室设置的历史数据库中查找出目标数量的最新历史消息,作为断网重登消息;
    根据所述断网重登消息中的聊天消息与本地消息队列中的已有聊天消息之间的消息重合状态,更新所述本地消息队列;
    按照所述断网重登消息中的封禁用户信息和更新后的本地消息队列,在所述全服聊天室内重新展示未被封禁下的聊天消息。
  20. 根据权利要求12-19任一项所述的方法,在所述向服务端发送面向全服聊天室的登录请求之前,还包括:
    响应于所述全服聊天室所在应用的开启指令,向所述服务端发送面向所述全服聊天室的配置拉取请求,以获取所述全服聊天室的动态配置信息;
    在所述成功登录所述全服聊天室之后,还包括:
    采用所述动态配置信息配置所述全服聊天室。
  21. 根据权利要求12-19任一项所述的方法,在所述成功登录所述全服聊天室之后,还包括:
    响应于面向所述全服聊天室的退出请求,停止所述心跳包任务,并向所述服务端发送所述退出请求,以使所述服务端移除所建立的所述消息推送订阅关系。
  22. 一种实现在线聊天的装置,包括:
    订阅关系建立模块,设置为响应于聊天终端面向全服聊天室的登录请求,建立与所述聊天终端之间的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
    订阅关系维持模块,设置为利用所述聊天终端成功登录所述全服聊天室后启动的心跳包任务,维持所述消息推送订阅关系。
  23. 一种实现在线聊天的装置,包括:
    登录请求发送模块,设置为向服务端发送面向全服聊天室的登录请求,以使所述服务端建立所述登录请求对应的消息推送订阅关系,其中,所述消息推送订阅关系用于实现所述全服聊天室内多个登录用户间的在线聊天;
    心跳包任务启动模块,设置为在成功登录所述全服聊天室后,启动心跳包任务,以维持所述消息推送订阅关系。
  24. 一种服务器,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-11中任一所述的实现在线聊天的方法。
  25. 一种聊天终端,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求12-21中任一项所述的实现在线聊天的方法。
  26. 一种计算机可读存储介质,存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-21中任一项所述的实现在线聊天的方法。
PCT/CN2020/133098 2020-12-01 2020-12-01 实现在线聊天的方法、装置、聊天终端、服务器及存储介质 WO2022115994A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/133098 WO2022115994A1 (zh) 2020-12-01 2020-12-01 实现在线聊天的方法、装置、聊天终端、服务器及存储介质
CN202080003709.0A CN113302881B (zh) 2020-12-01 2020-12-01 实现在线聊天的方法、装置、聊天终端、服务器及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/133098 WO2022115994A1 (zh) 2020-12-01 2020-12-01 实现在线聊天的方法、装置、聊天终端、服务器及存储介质

Publications (1)

Publication Number Publication Date
WO2022115994A1 true WO2022115994A1 (zh) 2022-06-09

Family

ID=77318813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133098 WO2022115994A1 (zh) 2020-12-01 2020-12-01 实现在线聊天的方法、装置、聊天终端、服务器及存储介质

Country Status (2)

Country Link
CN (1) CN113302881B (zh)
WO (1) WO2022115994A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090193092A1 (en) * 2006-09-22 2009-07-30 Tencent Technology (Shenzhen) Company Limited Method And System For Intercommunicating Chat Information Between Instant Messaging Group And Chat Room As Well As Intercommunication System
CN110460638A (zh) * 2019-07-11 2019-11-15 深圳职业技术学院 消息推送方法及装置
CN110874372A (zh) * 2018-08-30 2020-03-10 三竹资讯股份有限公司 聊天室整合股票信息的系统与方法
CN111083420A (zh) * 2019-12-31 2020-04-28 广州市百果园网络科技有限公司 一种视频通话系统、方法、设备和存储介质
CN111770143A (zh) * 2020-06-16 2020-10-13 南京东源磐能能源科技股份有限公司 基于Mqtt协议的数据断点续传方案

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2001264526A1 (en) * 2001-06-12 2002-12-23 Kent Ridge Digital Labs Network communication system
JP2003058482A (ja) * 2001-08-14 2003-02-28 Fujitsu Ltd エリアチャットルーム提供方法,端末側エリアチャット処理方法,エリアチャットルーム提供処理プログラム記録媒体,エリアチャットルーム提供装置
WO2011116718A2 (zh) * 2011-04-29 2011-09-29 华为技术有限公司 互联网业务控制方法及相关设备和系统
CN102185862B (zh) * 2011-05-13 2015-08-19 北京朗玛数联科技有限公司 网络游戏系统的通信方法、装置及系统
CN103546543A (zh) * 2013-09-29 2014-01-29 北京京东尚科信息技术有限公司 应用于电子商务的客户端装置以及提供信息的方法和系统
CN103856394A (zh) * 2014-03-20 2014-06-11 沈阳化工大学 一种网络聊天室系统
CN104052657B (zh) * 2014-06-27 2017-05-10 北京奇虎科技有限公司 即时通讯的实现方法和装置
CN104050287A (zh) * 2014-06-30 2014-09-17 深圳从游网络有限公司 一种在即时聊天中回复信息的方法及系统
US20160149839A1 (en) * 2014-11-20 2016-05-26 Superchat, LLC Multi-Network Chat System
KR101654261B1 (ko) * 2015-06-25 2016-09-05 주식회사 카카오 링크 정보에 대응하는 오픈 채팅방을 통해 메시지 서비스를 제공하는 메시지 서비스 제공 방법 및 상기 메시지 서비스 제공 방법을 수행하는 메시지 서버 및 단말
US10033963B1 (en) * 2016-12-30 2018-07-24 Facebook, Inc. Group video session
CN107342932B (zh) * 2017-05-23 2020-12-04 华为技术有限公司 一种信息交互方法及终端
CN107231295A (zh) * 2017-07-03 2017-10-03 深圳市乐唯科技开发有限公司 一种轻巧简便的社交交友聊天客户端搭建系统
CN107689988B (zh) * 2017-08-18 2021-02-26 广州市百果园信息技术有限公司 一种消息推送的方法、装置、电子设备及终端设备
CN109905312B (zh) * 2017-12-08 2021-07-23 北京新媒传信科技有限公司 消息推送方法、装置及系统
KR102027507B1 (ko) * 2018-04-04 2019-10-01 주식회사 한국어음중개 온라인 채팅모듈을 이용한 전자어음 대출 시스템 및 그 방법
CN111106996B (zh) * 2019-12-28 2022-04-12 安徽微沃信息科技股份有限公司 一种基于WebSocket和缓存的多终端在线聊天系统
CN111901227A (zh) * 2020-07-31 2020-11-06 广东佳米科技有限公司 一种简单轻量的消息实时推送系统及其实施方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090193092A1 (en) * 2006-09-22 2009-07-30 Tencent Technology (Shenzhen) Company Limited Method And System For Intercommunicating Chat Information Between Instant Messaging Group And Chat Room As Well As Intercommunication System
CN110874372A (zh) * 2018-08-30 2020-03-10 三竹资讯股份有限公司 聊天室整合股票信息的系统与方法
CN110460638A (zh) * 2019-07-11 2019-11-15 深圳职业技术学院 消息推送方法及装置
CN111083420A (zh) * 2019-12-31 2020-04-28 广州市百果园网络科技有限公司 一种视频通话系统、方法、设备和存储介质
CN111770143A (zh) * 2020-06-16 2020-10-13 南京东源磐能能源科技股份有限公司 基于Mqtt协议的数据断点续传方案

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CRAZYLEELANG: ""Stock Chat Room" is fully open to players who can chat across regions", 8 January 2010 (2010-01-08), pages 1 - 12, XP055937164, Retrieved from the Internet <URL:https://www.163.com/ent/article/5SH0PBRE00313VJV_all.html> *
SU, YAN: ""Fantasy Westward Journey 2" Stock Chat Room", HAPPY GAME, SIMPLE LIFE!, XP009537242, Retrieved from the Internet <URL:http://ol.kuai8.com/gonglue/414785.html> *

Also Published As

Publication number Publication date
CN113302881A (zh) 2021-08-24
CN113302881B (zh) 2023-05-02

Similar Documents

Publication Publication Date Title
US9686329B2 (en) Method and apparatus for displaying webcast rooms
CN110213522B (zh) 一种视频数据处理方法、装置以及相关设备
US20150244656A1 (en) Method and system for providing user interface for interactive broadcast program using mobile instant messenger
JP2007534076A (ja) ネットワークチャット環境におけるチャット負荷管理のためのシステム及び方法
CN112235594B (zh) 直播连麦的方法及装置、计算机可读介质、电子设备
WO2007095800A1 (fr) Dispositif d&#39;interface pour services de présence, système de services de présence et procédé de publication et d&#39;obtention d&#39;informations de présence
CN109120505A (zh) 一种基于mvp模式的安卓客服对话系统及方法
CN111314714B (zh) 一种游戏直播方法和装置
CN111935536B (zh) 一种直播间请求响应方法、装置、设备及存储介质
US9774928B2 (en) System and method for producing and executing interactive broadcast program
CN112988013B (zh) 一种信息互动方法、装置和存储介质
CN115118705B (zh) 一种基于微服务的工业边缘管控平台
US20240009578A1 (en) Data matching method and apparatus, device and computer-readable storage medium
CN102708170A (zh) 一种在线影视信息的提取发布方法及装置
AU2020225381B2 (en) Dynamic text message processing implementing endpoint communication channel selection
CN111787345A (zh) 基于网络直播间的互动资源处理方法、装置、服务器及存储介质
WO2015027907A1 (en) Methods and systems for visiting user groups
KR20100137659A (ko) 컨텐츠 사용 정보 제공 시스템 및 방법
US20180109851A1 (en) Content playback management
CN110460866A (zh) 推送流媒体数据的方法、系统和服务器
WO2022115994A1 (zh) 实现在线聊天的方法、装置、聊天终端、服务器及存储介质
US10652717B2 (en) Systems and methods for providing an interactive community through device communication
US8978108B2 (en) Method, device, and system for service presentation
WO2012028046A1 (zh) 实现多用户关系链变化的装置、系统及方法
CN106302089B (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: 20963843

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20963843

Country of ref document: EP

Kind code of ref document: A1