CN111614549A - Interaction processing method and device, computer equipment and storage medium - Google Patents
Interaction processing method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111614549A CN111614549A CN202010437528.0A CN202010437528A CN111614549A CN 111614549 A CN111614549 A CN 111614549A CN 202010437528 A CN202010437528 A CN 202010437528A CN 111614549 A CN111614549 A CN 111614549A
- Authority
- CN
- China
- Prior art keywords
- request
- target
- user
- interactive
- message queue
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/214—Monitoring or handling of messages using selective forwarding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/18—Commands or executable codes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application provides an interaction processing method, an interaction processing device, computer equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: responding to an interaction request received from a first terminal, determining a target message queue, wherein the target message queue is used for storing the interaction request received by a server, the first terminal logs in a first user account, and the sending target of the interaction request is a second user account; storing the interactive request in a target message queue; in response to the target period, acquiring an interactive request taking a second user account as a sending target from a target message queue; and sending the acquired interaction request to a second terminal, wherein the second terminal logs in a second user account. According to the method and the device, the interactive request is stored and acquired through the target message queue, decoupling of the interactive request and data stored in the database is achieved, when the second user account is in an off-line state, multiple interactions with the database are not needed, and the processing efficiency of the interactive request is improved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to an interaction processing method and apparatus, a computer device, and a storage medium.
Background
With the development of communication technology, different users can interact with each other through target application programs on respective terminals. For example, the target application program may be an online game program, and the user may apply for adding another user as a friend or deleting a friend relationship with another user based on a friend system in the online game program.
In the related art, taking an example of applying for adding a friend, if a user a wants to add a user B in a game as a friend, the user a can operate on a terminal to trigger the terminal to send a friend application to a server; the server acquires a current online user list from a database based on the friend application so as to confirm the activity state of the user B; if the user B is not online currently, the server acquires a friend application list of the user B from the database; and writing the friend application from the user A into the friend application list, so that the user B can check and process the friend application of the user A based on the friend application list of the user B after the user B is on line. Similarly, the server feeds back to the user a based on the processing result of the user B, and the specific feedback process is the same as the process in which the user a sends the friend application to the user B.
In the process, the server not only needs to determine whether the user is online through interaction with the database, but also needs to write the friend application into the corresponding list through multiple interactions with the database when the user is not online so as to check the friend application when the user is online, and the processing logic of the friend application is complex, so that the processing time is long, and the processing efficiency is low.
Disclosure of Invention
The embodiment of the application provides an interaction processing method, an interaction processing device, computer equipment and a storage medium, which can improve the processing efficiency when an interaction request is processed. The technical scheme is as follows:
in one aspect, an interaction processing method is provided, and the method includes:
responding to an interaction request received from a first terminal, determining a target message queue, wherein the target message queue is used for storing the interaction request received by a server, the first terminal logs in a first user account, and the sending target of the interaction request is a second user account;
storing the interaction request in the target message queue;
in response to the target period, acquiring an interactive request taking the second user account as a sending target from the target message queue;
and sending the acquired interaction request to a second terminal, wherein the second terminal logs in the second user account.
In one aspect, an interaction processing method is provided, and the method includes:
displaying a target interactive interface, wherein the target interactive interface comprises user information corresponding to at least one second user account;
detecting the interactive operation of user information corresponding to any second user account in the target interactive interface;
sending an interactive request taking the second user account as a sending target to a server;
the interaction request is used for indicating a server to store the interaction request to a target message queue, and sending the interaction request to a second terminal based on the target message queue, wherein the second terminal logs in a second user account.
In one aspect, an interaction processing apparatus is provided, the apparatus including:
the system comprises a determining module, a sending module and a receiving module, wherein the determining module is used for responding to an interaction request received by a first terminal, determining a target message queue, the target message queue is used for storing the interaction request received by a server, the first terminal logs in a first user account, and the sending target of the interaction request is a second user account;
the storage module is used for storing the interaction request in the target message queue;
the acquisition module is used for responding to a target period and acquiring an interactive request taking the second user account as a sending target from the target message queue;
and the first sending module is used for sending the acquired interaction request to a second terminal, and the second terminal logs in the second user account.
In a possible implementation manner, the determining module is configured to, in response to receiving an interactive request of a first terminal, obtain a first message queue of a server, where the first message queue is used to store interactive requests that respectively use multiple user accounts as sending targets, and determine the first message queue as a target message queue.
In another possible implementation manner, the determining module is configured to determine, in response to receiving an interactive request from a first terminal, a second message queue corresponding to a second user account from second message queues respectively corresponding to multiple user accounts according to a sending target of the interactive request, and determine the second message queue corresponding to the second user account as the target message queue.
In another possible implementation manner, the storage module is configured to:
acquiring a first priority of the interactive request and a second priority of other interactive requests existing in the target message queue;
determining a target storage position of the interactive request in the target message queue according to the first priority and the second priority;
and storing the interaction request in a target storage position of the target message queue.
In another possible implementation manner, the apparatus further includes:
the storage module is used for responding to the existence of available storage space in the target message queue and storing the interaction request in the target message queue;
a first returning module, configured to return, to the first terminal, first processing result information of the interactive request in response to that there is no available storage space in the target message queue, where the first processing result information is used to indicate that processing of the interactive request is rejected.
In another possible implementation manner, the apparatus further includes:
and the second returning module is used for returning second processing result information of the interactive request to the first terminal, wherein the second processing result information is used for indicating that the interactive request is sent.
In another possible implementation manner, the obtaining module is configured to obtain, from the target message queue, an interactive request targeting the second user account as a sending target in response to receiving a first message obtaining request sent by the second terminal after the target period is reached.
In another possible implementation manner, the obtaining module is configured to obtain, from the target message queue, an interaction request targeting the second user account as a sending target in response to a second message obtaining request triggered by the server when the target period is reached.
In another possible implementation manner, the interaction request includes a user relationship processing request and a message interaction request;
the user relationship processing request is used for requesting processing of the user relationship between the first user account and the second user account;
the message interaction request is used for requesting to send a message to the second user account.
In one aspect, an interaction processing apparatus is provided, the apparatus including:
the display module is used for displaying a target interactive interface, and the target interactive interface comprises user information corresponding to at least one second user account;
the detection module is used for detecting the interactive operation of the user information corresponding to any second user account in the target interactive interface;
the second sending module is used for sending an interactive request which takes the second user account as a sending target to a server;
the interaction request is used for indicating a server to store the interaction request to a target message queue, and sending the interaction request to a second terminal based on the target message queue, wherein the second terminal logs in a second user account.
In one possible implementation, the interaction request includes a user relationship processing request and a message interaction request;
the second sending module is configured to:
responding to the interactive operation for processing the user relationship, and sending a user relationship processing request which takes the second user account as a sending target to a server;
and responding to the interactive operation for sending the message to the second user account, and sending a message interactive request taking the second user account as a sending target to a server.
In another possible implementation manner, the apparatus further includes:
a first receiving module, configured to receive processing result information of the interactive request returned by the server, where the processing result information is used to indicate a processing state of the interactive request;
and the display module is also used for displaying the processing result information of the interaction request based on the target interaction interface.
In another possible implementation manner, the user information includes a current activity status of the second user account, and the activity status includes any one of an online status and an offline status.
In another possible implementation manner, the apparatus further includes:
the third sending module is used for responding to the target reaching period and sending a third message obtaining request to the server, wherein the third message obtaining request is used for requesting to obtain an interactive request taking the first user account as a sending target;
the second receiving module is used for receiving an interactive request which is returned by the server and takes the first user account as a sending target;
the display module is further configured to display interaction request information according to the interaction request with the first user account as a sending target, where the interaction request information is used to request feedback of the interaction request with the first user account as the sending target.
In one aspect, a computer device is provided, where the computer device includes a processor and a memory, where at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the interaction processing method according to any one of the above possible implementation manners.
In one aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the interaction processing method according to any one of the above-mentioned possible implementation manners.
In the embodiment of the application, the interactive requests are stored and acquired through the target message queue, so that the decoupling of the interactive requests and the data stored in the database is realized, and when the second user account is in an off-line state, the interactive requests are processed without multiple interactions with the database, so that the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
fig. 2 is a flowchart of an interaction processing method provided in an embodiment of the present application;
fig. 3 is a flowchart of an interaction processing method provided in an embodiment of the present application;
fig. 4 is a flowchart of an interaction processing method provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of a search results interface provided by an embodiment of the present application;
fig. 6 is a flowchart of an interaction processing method provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of an added user interface provided by an embodiment of the present application;
fig. 8 is a flowchart of an interaction processing method provided in an embodiment of the present application;
FIG. 9 is a diagram illustrating a chat interface provided by embodiments of the present application;
fig. 10 is a block diagram of an interaction processing apparatus according to an embodiment of the present application;
fig. 11 is a block diagram of an interaction processing apparatus according to an embodiment of the present application;
fig. 12 is a block diagram of a terminal according to an embodiment of the present application;
fig. 13 is a block diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to fig. 1, the implementation environment includes a first terminal 101, a second terminal 102, and a server 103.
The first terminal 101 or the second terminal 102 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like.
The server 103 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform.
The first terminal 101 and the second terminal 102 may be directly or indirectly connected with the server 103 through wired or wireless communication, respectively, and the present application is not limited thereto.
The first terminal 101 and the second terminal 102 may respectively have installed thereon a target application program that the server 103 provides a background service. The first terminal 101 may be any terminal that provides the server 103 with the background service, and the second terminal 102 may be any other terminal that provides the server 103 with the background service and is different from the first terminal 101.
The first terminal 101 may log in a first user account corresponding to a first user, and the second terminal 102 may log in a first user account corresponding to a second user. The first user and the second user may interact based on a target application on the respective terminals. For example, the target application may be an online game program, and the first user may interact with the second user by applying for adding the second user as a friend, deleting a friend relationship with the second user, or sending a message to the second user based on a friend system of the online game program.
When a first user needs to interact with a second user, based on a target application program running on the first terminal 101, the first user executes corresponding interactive operation and triggers the first terminal 101 to send an interactive request to the server 103; the server 103 responds to the received interaction request sent by the first terminal 101, sends the interaction request to the second terminal 102, and realizes the interaction of the first user for the second user.
Fig. 2 is a flowchart of an interaction processing method according to an embodiment of the present application. In this embodiment, a server is taken as an example for explanation, and referring to fig. 2, the embodiment includes:
201. the server responds to an interaction request received by a first terminal, determines a target message queue, wherein the target message queue is used for storing the interaction request received by the server, the first terminal logs in a first user account, and the sending target of the interaction request is a second user account.
A message queue is a container that holds messages during their transmission, as a kind of middleware that stores messages between the originator and the recipient of the messages.
202. The server stores the interactive request in a target message queue.
The server may store the interaction request in the target Message Queue based on a framework such as an Active Message Queue (Active Message Queue), a RabbitMQ (Message-oriented middleware), or a ZeroMQ (Zero Message Queue, a library that handles Message transmission).
203. And the server responds to the target period and acquires an interactive request taking the second user account as a sending target from the target message queue.
And the server inquires the target message queue and acquires the interaction request which is not acquired from the target message queue. In the embodiment of the present application, an example in which a server obtains an interaction request targeting a second user account is described.
204. And the server sends the acquired interaction request to a second terminal, and the second terminal logs in a second user account.
The server may send the acquired interaction request to a terminal corresponding to a sending target of the interaction request. In this embodiment, an example in which a server transmits an interaction request targeting a second user account to a second terminal is described.
In the embodiment of the application, the server stores the received interaction request in a target message queue, and regularly acquires the interaction request taking any second user account as a sending target from the target message queue, and sends the interaction request to the second terminal logged with the second user account. According to the technical scheme, the interactive requests are stored and acquired through the target message queue, decoupling of the interactive requests and data stored in the database is achieved, when the second user account is in an off-line state, the interactive requests do not need to be processed through multiple interactions with the database, the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
Fig. 3 is a flowchart of an interaction processing method according to an embodiment of the present application. In this embodiment, a first terminal is taken as an example for explanation, and referring to fig. 3, the embodiment includes:
301. and the first terminal displays a target interactive interface, wherein the target interactive interface comprises user information corresponding to at least one second user account.
The target interactive interface is an interface on which the first user performs an interactive operation. The user information is basic information corresponding to the user account, and the user information at least comprises a user name corresponding to the user account.
302. And the first terminal detects the interactive operation of the user information corresponding to any second user account in the target interactive interface.
And the interaction operation is used for indicating the interaction of the second user corresponding to the second user account. The first user can execute interactive operation to trigger the first terminal to send an interactive request with the second user account as a sending target.
303. The first terminal sends an interactive request taking the second user account as a sending target to the server; the interaction request is used for indicating the server to store the interaction request to a target message queue, and sending the interaction request to a second terminal based on the target message queue, wherein the second terminal is logged with a second user account.
And the first terminal responds to the interactive operation and sends an interactive request taking the second user account as a sending target to the server so as to instruct the server to send the interactive request to the second terminal for interacting with the second user.
In the embodiment of the application, a first terminal detects an interactive operation on user information corresponding to any second user account in a target interactive interface, sends an interactive request taking the second user account as a sending target to a server, indicates the server to store the interactive request to a target message queue through the interactive request, and sends the interactive request to the second terminal based on the target message queue. According to the technical scheme, the interactive request is sent to the second terminal by the interactive request indication server triggered by the interactive operation based on the target message queue, so that the decoupling of the interactive request and data stored in the database is realized, and when the second user account is in an off-line state, the interactive request is processed without multiple interactions with the database, so that the processing process of the interactive request is simplified, the processing time of the interactive request is shortened, and the interactive efficiency is improved.
Fig. 4 is a flowchart of an interaction processing method according to an embodiment of the present application. In this embodiment, taking an interaction among the first terminal, the second terminal, and the server as an example in a scenario where the first user applies for adding the second user as a friend, referring to fig. 4, the embodiment includes:
401. and the first terminal displays a user adding interface, wherein the user adding interface comprises user information corresponding to at least one second user account.
The user adding interface is one of the target interactive interfaces, and the user adding interface is provided with a function of adding friends. For example, the user adding interface may be a search result interface of a search user or a user recommendation interface for recommending an add friend, and the like.
The user information corresponding to the second user account at least comprises a user name of the second user account. The user information corresponding to the second user account may further include a current activity status of the second user account. The active state may include any one of an online state or an offline state. Further, in the online game program, the online status may also include any one of game play or no game play.
In a possible implementation manner, the second user corresponding to the user information included in the user adding interface may be a user who has not established a friend relationship with the first user. The user information corresponding to the second user account may further include a control with a function of adding a friend, and each control is used to indicate that the second user corresponding to the addition is a friend. For example, the control with add buddy functionality may be an add button.
For example, referring to FIG. 5, the user add interface may be a search results interface 500 of a searching user, the search results interface 500 being a search results interface resulting from "sheets" being the search field. The search results interface 500 includes user information with the user name "one for one", user information with the user name "two for two", and user information with the user name "three for three". The user information with the user name of 'one' comprises that the current activity state of the corresponding second user account is an online state; the user information with the user name of Zhang II comprises the current activity state of the corresponding second user account as an offline state; the user information with the user name of "Zhang III" includes that the current activity state of the corresponding second user account is an offline state.
In another possible implementation manner, the second user corresponding to the user information included in the user adding interface may be a user who has not established a friend relationship with the first user, or a user who has established a friend relationship with the first user, and the first terminal may display the user who has not established a friend relationship with the first user and the user who has established a friend relationship with the first user in different forms, respectively. For example, the user information corresponding to the user who has not established a friend relationship with the first user includes a control with a function of adding a friend, and the user information corresponding to the user who has established a friend relationship with the first user includes a control with a function of deleting a friend.
402. And the first terminal detects the adding operation of the user information corresponding to any second user account in the user adding interface.
The adding operation is one of interaction operations for processing the user relationship, and the adding operation is used for indicating that the second user corresponding to the second user account is added as a friend. The adding operation may be a click operation, an air gesture operation, or a voice input operation, and the like, and the application is not limited herein.
For example, with continued reference to fig. 5, the first user may perform an operation on the add button 501 to apply for the second user with the add username of "zhang bi" to be a friend; the first terminal responds to detection of an adding operation performed on the adding button 501; a user addition request targeting the second user account corresponding to the addition button 501 is sent to the server.
403. And the first terminal sends a user adding request taking the second user account as a sending target to the server.
The user adding request is used for requesting to establish a friend relationship between the first user account and the second user account. The user adding request is one of user relationship processing requests, the user relationship processing request is one of interaction requests, and the user relationship processing is used for requesting processing of a user relationship between the first user account and the second user account.
The first terminal detects the adding operation of the first user to the second user account, and sends a user adding request to the server. The first terminal may send a user addition request to a process in the server that provides background services for the first terminal.
404. The server determines a target message queue in response to receiving a user add request of the first terminal.
The target message queue is used for storing the interactive requests received by the server, and the user adding request is one of the interactive requests.
The implementation of step 404 includes at least the following two implementations. In one possible implementation manner, the interactive requests of multiple user accounts are stored in a first message queue, and the server may determine the first message queue as a target message queue. Correspondingly, the steps can be as follows: the method comprises the steps that a server responds to a received user adding request of a first terminal, and a first message queue of the server is obtained and used for storing interactive requests which respectively take a plurality of user accounts as sending targets; the first message queue is determined to be a target message queue.
The first message queue may store the interactive request in the following three ways.
In the first way, multiple types of interactive requests are stored in the first message queue. The interaction requests stored in the first message queue include user add requests.
In the embodiment of the application, the server can store various types of interaction requests in the first message queue, so that the number of the message queues required to be maintained by the server is small, and the maintenance cost of the message queues is reduced.
In the second mode, the user relationship processing request and the message interaction request are respectively stored in different message queues. The first message queue may be used only for storing user relationship processing requests, the user relationship processing requests stored in the first message queue including user addition requests. The server receives a user adding request, and further needs to determine a first message queue for storing user relationship processing requests from a plurality of message queues for storing different types of interaction requests. Correspondingly, the step of the server acquiring the first message queue of the server may be: the server acquires a first message queue matched with the user adding request from a message queue used for storing different types of interaction requests according to the received user adding request.
In the embodiment of the application, the server can also store the user relationship processing request and the message interaction request in different message queues respectively, so that the storage structure of the interaction request is optimized, when one message queue has a problem, the function realized based on the other message queue is not influenced, and the usability of the interaction request processing is improved.
In a third way, different types of interaction requests are stored in different message queues, respectively, and the first message queue may be used only for storing user addition requests.
In the embodiment of the application, the server can also store different types of interactive requests in different message queues respectively, so that the storage structure of the interactive requests is further optimized, when a certain message queue has a problem, the interaction of other types of requests cannot be influenced, and the usability of interactive request processing is further improved.
In another possible implementation manner, each user account corresponds to a second message queue, and correspondingly, in response to receiving the user addition request of the first terminal, the step of determining the target message queue by the server may be: the server responds to a received user adding request of the first terminal, and determines a second message queue corresponding to a second user account from second message queues corresponding to a plurality of user accounts respectively according to a sending target of the user adding request; and determining a second message queue corresponding to the second user account as a target message queue.
Each user account corresponds to a second message queue, and when the sending target of the user addition request is a second user account, the server may determine, from the plurality of second message queues, a second message queue matched with the second user account. The interactive requests in the second message queue may include user addition requests targeting the corresponding user account as a sending target. The interactive requests in the second message queue may also include a user relationship processing request that takes the corresponding user account as a transmission target. The interactive requests in the second message queue may also include a user relationship processing request and a message interactive request that use the corresponding user account as a transmission target.
In the embodiment of the application, the server is respectively allocated with the second message queue for each user account, so that the storage structure of the interactive request is optimized, when the message queue corresponding to a certain user account has a problem, the message queues corresponding to other user accounts are not affected, and the usability of interactive request processing is improved.
405. The server stores the user add request in the target message queue in response to there being available storage space in the target message queue.
In one possible implementation manner, the server may store the interactive requests in the target message queue in sequence according to the time sequence of receiving the interactive requests. Accordingly, the step of the server storing the user adding request in the target message queue may be: and the server stores the user adding request in a storage position corresponding to the tail of the target message queue.
In another possible implementation manner, the server may store the interaction requests in the corresponding target storage locations according to the order of priority. Accordingly, the step of the server storing the user adding request in the target message queue may be: the server acquires a first priority of a user adding request and a second priority of other interactive requests existing in a target message queue; determining a target storage position of a user adding request in a target message queue according to the first priority and the second priority; the user add request is stored in a target storage location of the target message queue.
The step of determining, by the server, a target storage location of the user addition request in the target message queue according to the first priority and the second priority may be: the server compares the first priority with the second priority; determining a storage location between the first interactive request and the second interactive request as a target storage location in response to the first priority being higher than a second priority of the first interactive request and lower than a second priority of the second interactive request; the first interactive request and the second interactive request are other interactive requests existing in the target message queue.
In the embodiment of the application, the server can store the interactive requests in the target message queue according to the order of the priority, so that the interactive requests with higher priority can be preferentially acquired and sent to the second terminal, the time for sending the interactive requests with higher priority to the second terminal is reduced, the processing efficiency of the interactive requests is improved for the interactive requests with higher priority, the second terminal can receive the interactive requests with higher priority in a short time, the interactive requests are notified to the user, and the experience degree of the user is improved.
In the embodiment of the application, the server stores the user adding request in the target message queue, compared with a mode of storing the user adding request in user data in a database, the coupling degree of the interactive request and the user data is reduced, the interactive request is separated from the user data in the database, the labor cost consumed by the processing function of the interactive request is reduced, the expandability of the function of the target application program is improved, the quick updating iteration of the target application program is facilitated, the maintenance difficulty of the target application program is reduced by separating the interactive request from the user data in the database, and when the processing of the interactive request is in a problem, the problem solving efficiency can be improved.
406. And the server returns second processing result information of the user adding request to the first terminal, wherein the second processing result information is used for indicating that the user adding request is sent.
After the server stores the user adding request in the target message queue, the second processing result information can be returned to the first terminal.
In the embodiment of the application, the server receives the user addition request, executes the step of storing the user addition request in the target message queue, and returns the second processing result information to the first terminal, so that compared with a mode that the processing result information can only be returned to the first terminal after the server interacts with the database for multiple times, the time for returning the processing result information to the first terminal is shortened, the efficiency for returning the processing result information is improved, the delay of the request is reduced, and the experience degree of the user can be improved.
It should be noted that, if there is available storage space in the target message queue, the server may store the received user addition request in the target message queue, that is, execute steps 405 to 406. If the available storage space does not exist in the target message queue, the server may refuse to process the user addition request, that is, the server returns, to the first terminal, first processing result information of the user addition request in response to that the available storage space does not exist in the target message queue, where the first processing result information is used to indicate that the processing of the user addition request is refused.
In the embodiment of the application, the server can refuse to process the newly received user addition request when the number of the requests is too large in a short time and occupies a large amount of storage space of the target message queue, so that the available storage space does not exist in the target message queue, the pressure of the server for processing the interactive request can be relieved, the traffic peak cancellation is realized, the occurrence of the situation that the server is broken down due to too large number of the requests is reduced, and the pressure resistance of the server is improved.
407. And the first terminal receives the processing result information of the user adding request returned by the server and displays the processing result information of the user adding request based on the user adding interface.
Wherein, the processing result information is used for representing the processing state of the interactive request. The processing result information includes first processing result information and second processing result information. The first processing result information is used to indicate that the processing of the user addition request is rejected. The second processing result information is used to indicate that the user addition request has been sent.
In a possible implementation manner, the first terminal receives first processing result information returned by the server, and displays the first processing result information based on a user adding interface, for example, the first processing result information may be "server busy, please wait".
In another possible implementation manner, the first terminal receives second processing result information returned by the server, and displays the second processing result information based on the user addition interface, for example, the second processing result information may be "friend application has been sent to the second user".
408. And the second terminal responds to the target period and sends a first message acquisition request to the server.
The target period may be any duration, for example, the target period may be 0.3 seconds, 0.5 seconds, 1 second, or the like. The second terminal may send a first message acquisition request to the server every other target period. The first message obtaining request sent by the second terminal may carry a second user account, and is used for requesting to obtain a user adding request which takes the second user account as a sending target.
The second terminal may send the first message acquisition request to the server according to the target period when the activity state of the second user account is the online state. Further, in the process of running the online game program, the second terminal may send the first message acquisition request to the server according to the target period only when the online state of the second user account is that the game is not being played.
In the embodiment of the application, the second terminal can send the first message acquisition request to the server at regular time, so that when the second user is in an online state, the user addition request which takes the second user account as a sending target can be acquired in a short time, the time for the user addition request to reach the second terminal is reduced, and the instantaneity of sending the interaction request to the second terminal is improved.
In another embodiment of the application, the second terminal may further send the first message acquisition request to the server in response to receiving an operation for instructing to refresh the friend application list, so that the second user can quickly acquire a user addition request targeting the second user account after performing the operation, thereby reducing the waiting time of the second user and improving the user experience.
409. And the server responds to the received first message acquisition request sent by the second terminal after the target period is reached, and acquires a user adding request taking the second user account as a sending target from the target message queue.
The first message acquisition request carries a second user account, and the server can acquire a corresponding user addition request from the target message queue according to the second user account carried by the first message acquisition request.
In the embodiment of the application, the server responds to the first message acquisition request of the second terminal, acquires the user addition request taking the second user account as the sending target, can quickly respond to the first message acquisition request of the second terminal, and improves the processing efficiency of the interaction request.
It should be noted that the server may obtain the user addition request in response to receiving the first message obtaining request of the second terminal. The server can also query the interaction requests which are not acquired from the message queue at regular time, and respectively send the user adding requests to the corresponding terminals. The above steps 408 to 409 can be replaced by the following steps: and the server responds to a second message acquisition request triggered when the target period is reached, and acquires a user adding request taking the second user account as a sending target from the target message queue.
In the embodiment of the application, the server can periodically query the interactive request taking the second user account as the sending target from the target message queue according to the target period, so that the steps of sending the message acquisition request to the server by the second terminal are reduced, the connection resources consumed by the second terminal for sending the message acquisition request to the server are reduced, and the effective utilization rate of the connection resources is improved.
410. And the server sends the acquired user adding request to a second terminal, and the second terminal logs in a second user account.
The user adding request is used for indicating the second terminal to display the first user relationship processing information so as to request the second user to feed back the user adding request.
411. And the second terminal receives the user adding request, displays the first user relationship processing information and detects the interactive operation of the first user relationship processing information.
The first user relationship processing information is used for requesting feedback on the user adding request, for example, the first user relationship processing information may be "the first user applies for adding you as a friend".
The first user relationship processing information may further include a first option and a second option, the first option is used for indicating that the first user is approved to add the application, and the second option is used for indicating that the first user is rejected to add the application. The second terminal may detect an interaction with the first option and the second option.
412. And the second terminal sends user relationship feedback information which takes the first user account as a sending target to the server.
In a possible implementation manner, the interaction operation on the first user relationship processing information is used to agree with an addition application of the first user, and the second terminal may send friend application agreement information to the server, where the friend application agreement information is used to indicate that the second user agrees with a user addition request of the first user.
In another possible implementation manner, the interaction operation on the first user relationship processing information is used to reject the addition application of the first user, and the second terminal may send friend application rejection information to the server, where the friend application rejection information is used to indicate that the second user rejects the user addition request of the first user.
413. And the server responds to the received user relationship feedback information of the second terminal and sends the user relationship feedback information to the first terminal through the target message queue.
Step 413 is the same as the processing procedure of the server for the user addition request of the first terminal, that is, the server determines the target message queue in response to receiving the user relationship feedback information of the second terminal; and storing the user relationship feedback information in a target message queue, and returning the processing result information of the user relationship feedback information to the second terminal.
It should be noted that, in response to the user relationship feedback information indicating that the second user agrees with the user addition request of the first user, the server establishes and stores the user relationship between the first user account and the second user account.
414. And the first terminal receives the user relationship feedback information and displays the second user relationship processing information.
The second user relationship processing information is used for representing feedback of the second user for friend adding application of the first user. In a possible implementation manner, the first terminal receives friend application consent information, and the displayed second user relationship processing information may be "the second user has agreed your friend application".
In another possible implementation manner, the first terminal receives the friend application rejection information, and the displayed second user relationship processing information may be "the second user has rejected your friend application".
It should be noted that, the first terminal may also send a third message acquisition request to the server at regular time to acquire an interaction request targeting the first user account, and process the interaction request, and correspondingly, the step of the first terminal acquiring and processing the interaction request may be: the first terminal responds to the target reaching period and sends a third message acquisition request to the server, wherein the third message acquisition request is used for requesting to acquire an interaction request which takes the first user account as a sending target; receiving an interactive request which is returned by a server and takes a first user account as a sending target; and displaying interactive request information according to an interactive request taking the first user account as a sending target, wherein the interactive request information is used for requesting feedback of the interactive request taking the first user account as the sending target. The step of the first terminal obtaining and processing the interactive request is similar to the process of the second terminal obtaining the user adding request taking the second user account as the sending target from the target message queue through the server and processing the user adding request.
In the embodiment of the application, a first terminal, which is provided with a background service by any server, sends an interaction request with a second user account as a sending target to the server based on an interaction operation on user information corresponding to any second user account in a target interaction interface, so that the server can store the received interaction request in a target message queue, acquire the interaction request with the second user account as the sending target from the target message queue at regular time, and send the interaction request to the second terminal. According to the technical scheme, the interactive requests are stored and acquired through the target message queue, decoupling of the interactive requests and data stored in the database is achieved, when the second user account is in an off-line state, the interactive requests do not need to be processed through multiple interactions with the database, the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
Fig. 6 is a flowchart of an interaction processing method according to an embodiment of the present application. In this embodiment, a description is given by taking an example that a first user applies for deleting a friend relationship with a second user, referring to fig. 6, where the embodiment includes:
601. and the first terminal displays an added user interface, wherein the added user interface comprises user information corresponding to at least one second user account.
The added user interface is one of the target interactive interfaces, and is provided with a function of deleting friends. The user information corresponding to the second user account may further include a control having a function of deleting a friend, and each control is respectively used to indicate to delete the user relationship with the corresponding second user account. For example, the control with the function of deleting friends can be a delete button.
In one example, referring to fig. 7, the added user interface 700 includes user information corresponding to a second user account with which a friend relationship has been established with the first user account. The added user interface 700 includes user information with the user name "one piece", user information with the user name "two pieces", and user information with the user name "three pieces".
602. And the first terminal detects the deletion operation of the user information corresponding to any second user account in the added user interface.
The deleting operation is one of interactive operations for processing the user relationship, and the deleting operation is used for indicating to delete the friend relationship of the second user corresponding to the second user account.
For example, with continued reference to fig. 7, a first user may perform an operation on the delete button 701 to delete a second user with a user name of "zhang bi" as a friend; the first terminal responds to the detection of a deletion operation on the delete button 701; and sending a user deletion request with the second user account corresponding to the deletion button 701 as a sending target to the server.
603. And the first terminal sends a user deleting request taking the second user account as a sending target to the server.
The user deletion request is used for requesting deletion of a friend relationship between the first user account and the second user account. The user deletion request is one of user relationship processing requests. And the first terminal detects the deletion operation of the first user to the second user account, and sends a user deletion request to the server.
604. The server determines a target message queue in response to receiving a user delete request from the first terminal.
Step 604 is the same as step 404.
It should be noted that, in response to receiving the user deletion request, the server may delete the stored user relationship between the first user account and the second user account.
605. The server stores the user delete request in the target message queue in response to there being available storage space in the target message queue.
Step 605 has the same principle as step 405.
606. And the server returns second processing result information of the user deletion request to the first terminal, wherein the second processing result information is used for indicating that the user deletion request is sent.
Step 606 is the same as step 406.
607. And the first terminal receives the processing result information of the user deletion request returned by the server and displays the processing result information of the user deletion request based on the added user interface.
Step 607 is the same as step 407.
608. And the second terminal responds to the target period and sends a first message acquisition request to the server.
Step 608 is the same as step 408.
609. And the server responds to the received first message acquisition request sent by the second terminal after the target period is reached, and acquires a user deletion request taking the second user account as a sending target from the target message queue.
Step 609 is the same as step 409.
610. And the server sends the acquired user deletion request to the second terminal, and the second terminal logs in a second user account.
The user deletion request is used for instructing the second terminal to display the third user relationship processing information.
611. And the second terminal receives the user deletion request and displays the third user relationship processing information.
The third user relationship processing information is used for representing the user relationship between the first user and the second user which is deleted. For example, the third user relationship handling information may be "first for having released a friend relationship with you".
It should be noted that the first user may not notify the second user when applying for deleting the friend relationship of the second user, that is, the second terminal may not perform step 608 and step 611, and the server may not perform steps 609 to 610.
In the embodiment of the application, a first terminal, which is provided with a background service by any server, sends an interaction request with a second user account as a sending target to the server based on an interaction operation on user information corresponding to any second user account in a target interaction interface, so that the server can store the received interaction request in a target message queue, acquire the interaction request with the second user account as the sending target from the target message queue at regular time, and send the interaction request to the second terminal. According to the technical scheme, the interactive requests are stored and acquired through the target message queue, decoupling of the interactive requests and data stored in the database is achieved, when the second user account is in an off-line state, the interactive requests do not need to be processed through multiple interactions with the database, the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
Fig. 8 is a flowchart of an interaction processing method according to an embodiment of the present application. Referring to fig. 8, in this embodiment, taking an example that a first user sends a message to a second user as an example, the embodiment includes:
801. and the first terminal displays a chat interface, wherein the chat interface comprises user information corresponding to at least one second user account.
The chat interface is one of the target interactive interfaces, the chat interface comprises a chat window of any second user, and the user information corresponding to the second user account can also comprise the chat window of the corresponding second user. For example, referring to fig. 9, the chat interface 900 includes user information corresponding to the second user account with which the friend relationship is established with the first user account. The chat interface 900 displays a chat window with any second user, and the chat window includes a message input box 901 and a send button 902.
802. The first terminal detects the chat operation of the user information corresponding to any second user account in the chat interface.
The chat operation is one of interactive operations for sending a message to the second user account. For example, with continued reference to fig. 9, the first user may chat with a second user with the user name "zhang bi", input a message to be sent to the second user in the message input box 901, and perform an operation on the send button 902; the first terminal responds to detecting a chat operation to the send button 902; and sending a message interaction request which takes the second user account corresponding to the sending button 902 as a sending target to the server, wherein the message interaction request comprises the message input in the message input box 901.
803. And the first terminal sends a message interaction request taking the second user account as a sending target to the server.
The message interaction request is used for requesting to send a message to the second user account. The first terminal detects the chat operation performed by the first user with respect to the send button 902, and sends a message interaction request to the server.
804. The server responds to the received message interaction request of the first terminal and determines a target message queue.
Step 804 has the same principle as step 404.
805. The server stores the message interaction request in the target message queue in response to the presence of available storage space in the target message queue.
Step 805 has the same principle as step 405.
806. And the server returns second processing result information of the message interaction request to the first terminal, wherein the second processing result information is used for indicating that the message interaction request is sent.
Step 806 is the same as step 406.
807. And the first terminal receives the processing result information of the message interaction request returned by the server and displays the processing result information of the message interaction request based on the chat interface.
Step 807 is the same as step 407.
It should be noted that, if the server stores the message interaction request in the target message queue, the server may not return the second processing result information of the message interaction request to the first terminal, that is, the server may not perform step 806, and the first terminal may not perform step 807.
808. And the second terminal responds to the target period and sends a first message acquisition request to the server.
Step 808 has the same principle as step 408.
809. And the server responds to the received first message acquisition request sent by the second terminal after the target period is reached, and acquires a message interaction request taking the second user account as a sending target from the target message queue.
Step 809 is the same as step 409.
810. And the server sends the acquired message interaction request to a second terminal, and the second terminal logs in a second user account.
The message acquisition request is used for indicating the second terminal to display the message included in the message acquisition request.
811. And the second terminal receives the message interaction request and displays the message included in the message interaction request.
The second terminal may display the message included in the message interaction request in a chat interface of the second terminal. The second terminal can also acquire a message sent to the first user based on the chat interface, and sends a message interaction request with the first user account as a sending target to the server. The process of sending the message interaction request to the first terminal by the second terminal is the same as the process of sending the message interaction request to the second terminal by the first terminal.
In the embodiment of the application, a first terminal, which is provided with a background service by any server, sends an interaction request with a second user account as a sending target to the server based on an interaction operation on user information corresponding to any second user account in a target interaction interface, so that the server can store the received interaction request in a target message queue, acquire the interaction request with the second user account as the sending target from the target message queue at regular time, and send the interaction request to the second terminal. According to the technical scheme, the interactive requests are stored and acquired through the target message queue, decoupling of the interactive requests and data stored in the database is achieved, when the second user account is in an off-line state, the interactive requests do not need to be processed through multiple interactions with the database, the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
Fig. 10 is a block diagram of an interaction processing apparatus according to an embodiment of the present application. Referring to fig. 10, the apparatus includes:
a determining module 1001, configured to determine a target message queue in response to receiving an interaction request of a first terminal, where the target message queue is used to store the interaction request received by a server, the first terminal logs in a first user account, and a sending target of the interaction request is a second user account;
a storage module 1002, configured to store the interaction request in a target message queue;
an obtaining module 1003, configured to, in response to reaching the target period, obtain, from the target message queue, an interaction request that takes the second user account as a sending target;
the first sending module 1004 is configured to send the obtained interaction request to the second terminal, where the second terminal logs in a second user account.
In a possible implementation manner, the determining module 1001 is configured to, in response to receiving an interactive request of a first terminal, obtain a first message queue of a server, where the first message queue is configured to store interactive requests that respectively use multiple user accounts as sending targets, and determine the first message queue as a target message queue.
In another possible implementation manner, the determining module 1001 is configured to determine, in response to receiving an interactive request from a first terminal, a second message queue corresponding to a second user account from second message queues respectively corresponding to multiple user accounts according to a sending target of the interactive request, and determine the second message queue corresponding to the second user account as a target message queue.
In another possible implementation manner, the storage module 1002 is configured to:
acquiring a first priority of an interactive request and a second priority of other interactive requests existing in a target message queue;
determining a target storage position of the interactive request in a target message queue according to the first priority and the second priority;
and storing the interactive request in a target storage position of the target message queue.
In another possible implementation manner, the apparatus further includes:
a storage module 1002, configured to store the interaction request in the target message queue in response to an available storage space existing in the target message queue;
and the first returning module is used for responding to the condition that no available storage space exists in the target message queue, and returning first processing result information of the interactive request to the first terminal, wherein the first processing result information is used for indicating that the processing of the interactive request is refused.
In another possible implementation manner, the apparatus further includes:
and the second returning module is used for returning second processing result information of the interactive request to the first terminal, wherein the second processing result information is used for indicating that the interactive request is sent.
In another possible implementation manner, the obtaining module 1003 is configured to, in response to receiving a first message obtaining request sent by the second terminal after the target period is reached, obtain, from the target message queue, an interaction request targeting the second user account as a sending target.
In another possible implementation manner, the obtaining module 1003 is configured to, in response to a second message obtaining request triggered by the server when the target period is reached, obtain, from the target message queue, an interaction request targeting the second user account as a sending target.
In another possible implementation manner, the interaction request includes a user relationship processing request and a message interaction request;
the user relationship processing request is used for requesting to process the user relationship between the first user account and the second user account;
the message interaction request is used for requesting to send a message to the second user account.
It should be noted that: in the interaction processing apparatus provided in the foregoing embodiment, when processing an interaction request, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the interactive processing device and the interactive processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In the embodiment of the application, the server stores the received interaction request in a target message queue, and regularly acquires the interaction request taking any second user account as a sending target from the target message queue, and sends the interaction request to the second terminal logged with the second user account. According to the technical scheme, the interactive requests are stored and acquired through the target message queue, decoupling of the interactive requests and data stored in the database is achieved, when the second user account is in an off-line state, the interactive requests do not need to be processed through multiple interactions with the database, the processing process of the interactive requests is simplified, the processing time of the interactive requests is shortened, and the processing efficiency of the interactive requests is improved.
Fig. 11 is a block diagram of an interaction processing apparatus according to an embodiment of the present application. Referring to fig. 11, the apparatus includes:
a display module 1101, configured to display a target interaction interface, where the target interaction interface includes user information corresponding to at least one second user account;
the detection module 1102 is configured to detect an interaction operation on user information corresponding to any second user account in the target interaction interface;
a second sending module 1103, configured to send, to the server, an interaction request that uses the second user account as a sending target;
the interactive request is used for indicating the server to store the interactive request to a target message queue, and sending the interactive request to a second terminal based on the target message queue, wherein the second terminal is logged with a second user account.
In one possible implementation, the interactive request includes a user relationship processing request and a message interactive request;
a second sending module 1103, configured to:
responding to the interactive operation for processing the user relationship, and sending a user relationship processing request which takes the second user account as a sending target to the server;
and responding to the interactive operation for sending the message to the second user account, and sending a message interactive request taking the second user account as a sending target to the server.
In another possible implementation manner, the apparatus further includes:
the first receiving module is used for receiving processing result information of the interactive request returned by the server, wherein the processing result information is used for representing the processing state of the interactive request;
the display module 1101 is further configured to display processing result information of the interaction request based on the target interaction interface.
In another possible implementation manner, the user information includes a current activity status of the second user account, and the activity status includes any one of an online status and an offline status.
In another possible implementation manner, the apparatus further includes:
the third sending module is used for responding to the target reaching period and sending a third message obtaining request to the server, wherein the third message obtaining request is used for requesting to obtain an interactive request taking the first user account as a sending target;
the second receiving module is used for receiving an interactive request which is returned by the server and takes the first user account as a sending target;
the display module 1101 is further configured to display interaction request information according to an interaction request that takes the first user account as a sending target, where the interaction request information is used to request feedback of the interaction request that takes the first user account as the sending target.
It should be noted that: in the interaction processing apparatus provided in the foregoing embodiment, when processing an interaction request, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the interactive processing device and the interactive processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In the embodiment of the application, a first terminal detects an interactive operation on user information corresponding to any second user account in a target interactive interface, sends an interactive request taking the second user account as a sending target to a server, indicates the server to store the interactive request to a target message queue through the interactive request, and sends the interactive request to the second terminal based on the target message queue. According to the technical scheme, the interactive request is sent to the second terminal by the interactive request indication server triggered by the interactive operation based on the target message queue, so that the decoupling of the interactive request and data stored in the database is realized, and when the second user account is in an off-line state, the interactive request is processed without multiple interactions with the database, so that the processing process of the interactive request is simplified, the processing time of the interactive request is shortened, and the interactive efficiency is improved.
Fig. 12 is a block diagram of a terminal according to an embodiment of the present application. The terminal may be the first terminal in the above embodiment, or may be the second terminal in the above embodiment. The terminal 1200 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1200 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
In general, terminal 1200 includes: a processor 1201 and a memory 1202.
The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by the display screen. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
In some embodiments, the terminal 1200 may further optionally include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, display 1205, camera assembly 1206, audio circuitry 1207, positioning assembly 1208, and power supply 1209.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, memory 1202, and peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202 and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 1204 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1204 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1204 may communicate with other terminals through at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1204 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to acquire touch signals on or over the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this point, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, disposed on a front panel of the terminal 1200; in other embodiments, the display 1205 can be at least two, respectively disposed on different surfaces of the terminal 1200 or in a folded design; in other embodiments, the display 1205 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 1200. Even further, the display screen 1205 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display panel 1205 can be made of a material such as an LCD (Liquid Crystal Display), an OLED (Organic Light-emitting diode), and the like.
The audio circuitry 1207 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1201 for processing or inputting the electric signals into the radio frequency circuit 1204 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided at different locations of terminal 1200. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The positioning component 1208 is used to locate a current geographic location of the terminal 1200 to implement navigation or LBS (location based Service). The positioning component 1208 can be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 1209 is used to provide power to various components within the terminal 1200. The power source 1209 may be alternating current, direct current, disposable or rechargeable. When the power source 1209 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1200 also includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: acceleration sensor 1211, gyro sensor 1212, pressure sensor 1213, fingerprint sensor 1214, optical sensor 1215, and proximity sensor 1216.
The acceleration sensor 1211 can detect magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1200. For example, the acceleration sensor 1211 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1201 may control the display screen 1205 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1212 may detect a body direction and a rotation angle of the terminal 1200, and the gyro sensor 1212 may collect a 3D motion of the user on the terminal 1200 in cooperation with the acceleration sensor 1211. The processor 1201 can implement the following functions according to the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1213 may be disposed on the side frames of terminal 1200 and/or underlying display 1205. When the pressure sensor 1213 is disposed on the side frame of the terminal 1200, the user's holding signal of the terminal 1200 can be detected, and the processor 1201 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed at a lower layer of the display screen 1205, the processor 1201 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1205. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1214 is used for collecting a fingerprint of the user, and the processor 1201 identifies the user according to the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 1214 may be disposed on the front, back, or side of the terminal 1200. When a physical button or vendor Logo is provided on the terminal 1200, the fingerprint sensor 1214 may be integrated with the physical button or vendor Logo.
The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, the processor 1201 may control the display brightness of the display 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display luminance of the display panel 1205 is increased; when the ambient light intensity is low, the display brightness of the display panel 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the camera head 1206 shooting parameters based on the ambient light intensity collected by optical sensor 1215.
A proximity sensor 1216, also known as a distance sensor, is typically disposed on the front panel of the terminal 1200. The proximity sensor 1216 is used to collect a distance between the user and the front surface of the terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually decreases, the processor 1201 controls the display 1205 to switch from the bright screen state to the dark screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the terminal 1200 gradually becomes larger, the processor 1201 controls the display 1205 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 1200 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 13 is a block diagram of a server 1300 according to an embodiment of the present application, where the server 1300 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1301 and one or more memories 1302, where at least one program code is stored in the memory 1302, and the at least one program code is loaded and executed by the processor 1301 to implement the interaction Processing method provided by each method embodiment. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer-readable storage medium having at least one program code stored therein, the at least one program code being executable by a processor in a terminal or a server to perform the interaction processing method in the above-described embodiments. For example, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (compact disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present application further provides a computer program product, which includes one or more computer programs, and when the computer program is executed by a processor, the computer program is used to implement the interaction processing method provided by the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present application is intended to cover various modifications, alternatives, and equivalents, which may be included within the spirit and scope of the present application.
Claims (15)
1. An interaction processing method, characterized in that the method comprises:
responding to an interaction request received from a first terminal, determining a target message queue, wherein the target message queue is used for storing the interaction request received by a server, the first terminal logs in a first user account, and the sending target of the interaction request is a second user account;
storing the interaction request in the target message queue;
in response to the target period, acquiring an interactive request taking the second user account as a sending target from the target message queue;
and sending the acquired interaction request to a second terminal, wherein the second terminal logs in the second user account.
2. The method of claim 1, wherein determining the target message queue in response to receiving the interactive request from the first terminal comprises any one of:
the method comprises the steps of responding to an interactive request received from a first terminal, obtaining a first message queue of a server, wherein the first message queue is used for storing interactive requests which respectively take a plurality of user accounts as sending targets, and determining the first message queue as a target message queue;
in response to receiving an interactive request of a first terminal, according to a sending target of the interactive request, determining a second message queue corresponding to a second user account from second message queues respectively corresponding to a plurality of user accounts, and determining the second message queue corresponding to the second user account as the target message queue.
3. The method of claim 1, wherein storing the interaction request in the target message queue comprises:
acquiring a first priority of the interactive request and a second priority of other interactive requests existing in the target message queue;
determining a target storage position of the interactive request in the target message queue according to the first priority and the second priority;
and storing the interaction request in a target storage position of the target message queue.
4. The method of claim 1, wherein prior to storing the interaction request in the target message queue, the method further comprises:
in response to there being available storage space in the target message queue, performing the step of storing the interaction request in the target message queue;
and responding to the target message queue without available storage space, and returning first processing result information of the interactive request to the first terminal, wherein the first processing result information is used for indicating that the interactive request is rejected.
5. The method of claim 1, wherein after storing the interaction request in the target message queue, the method further comprises:
and returning second processing result information of the interactive request to the first terminal, wherein the second processing result information is used for indicating that the interactive request is sent.
6. The method according to claim 1, wherein the obtaining of the interactive request targeting the second user account as the sending target from the target message queue in response to reaching the target period comprises any one of:
in response to receiving a first message acquisition request sent by a second terminal after the target period is reached, acquiring an interactive request taking the second user account as a sending target from the target message queue;
and responding to a second message acquisition request triggered by the server when the target period is reached, and acquiring an interactive request taking the second user account as a sending target from the target message queue.
7. The method of claim 1, wherein the interaction request comprises a user relationship processing request and a message interaction request;
the user relationship processing request is used for requesting processing of the user relationship between the first user account and the second user account;
the message interaction request is used for requesting to send a message to the second user account.
8. An interaction processing method, characterized in that the method comprises:
displaying a target interactive interface, wherein the target interactive interface comprises user information corresponding to at least one second user account;
detecting the interactive operation of user information corresponding to any second user account in the target interactive interface;
sending an interactive request taking the second user account as a sending target to a server;
the interaction request is used for indicating a server to store the interaction request to a target message queue, and sending the interaction request to a second terminal based on the target message queue, wherein the second terminal logs in a second user account.
9. The method of claim 8, wherein the interaction request comprises a user relationship processing request and a message interaction request;
the sending of the interaction request with the second user account as a sending target to the server includes:
responding to the interactive operation for processing the user relationship, and sending a user relationship processing request which takes the second user account as a sending target to a server;
and responding to the interactive operation for sending the message to the second user account, and sending a message interactive request taking the second user account as a sending target to a server.
10. The method of claim 8, further comprising:
receiving processing result information of the interactive request returned by the server, wherein the processing result information is used for representing the processing state of the interactive request;
and displaying the processing result information of the interaction request based on the target interaction interface.
11. The method of claim 8, wherein the user information comprises a current activity status of the second user account, and wherein the activity status comprises any one of an online status or an offline status.
12. The method of claim 8, further comprising:
responding to a target period, sending a third message acquisition request to the server, wherein the third message acquisition request is used for requesting to acquire an interactive request taking the first user account as a sending target;
receiving an interactive request which is returned by the server and takes the first user account as a sending target;
and displaying interactive request information according to the interactive request taking the first user account as a sending target, wherein the interactive request information is used for requesting feedback of the interactive request taking the first user account as the sending target.
13. An interaction processing apparatus, characterized in that the apparatus comprises a plurality of functional modules for implementing the interaction processing method according to any one of claims 1 to 12.
14. A computer device, characterized in that the computer device comprises a processor and a memory, in which at least one program code is stored, which is loaded and executed by the processor to implement the interaction processing method according to any of claims 1-12.
15. A computer-readable storage medium having stored therein at least one program code, the at least one program code being loaded and executed by a processor, to implement the interaction processing method according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010437528.0A CN111614549B (en) | 2020-05-21 | 2020-05-21 | Interaction processing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010437528.0A CN111614549B (en) | 2020-05-21 | 2020-05-21 | Interaction processing method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111614549A true CN111614549A (en) | 2020-09-01 |
CN111614549B CN111614549B (en) | 2022-05-31 |
Family
ID=72199509
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010437528.0A Active CN111614549B (en) | 2020-05-21 | 2020-05-21 | Interaction processing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111614549B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112153476A (en) * | 2020-09-22 | 2020-12-29 | 游艺星际(北京)科技有限公司 | Interactive data processing method and device, server and storage medium |
CN112311661A (en) * | 2020-11-24 | 2021-02-02 | 腾讯科技(深圳)有限公司 | Message processing method, device, equipment and storage medium |
CN113225268A (en) * | 2021-04-20 | 2021-08-06 | 北京达佳互联信息技术有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN113515707A (en) * | 2020-09-21 | 2021-10-19 | 腾讯科技(深圳)有限公司 | Data processing method, intelligent device, intelligent equipment and storage medium |
CN113742112A (en) * | 2021-09-15 | 2021-12-03 | 武汉联影智融医疗科技有限公司 | Electrocardio image generation method and system and electronic device |
CN113760421A (en) * | 2021-01-07 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Multi-account data processing method and device, electronic equipment and storage medium |
CN114157622A (en) * | 2021-11-29 | 2022-03-08 | 杭州逗酷软件科技有限公司 | Method, device, server and storage medium for adding friends |
CN114296509A (en) * | 2021-12-29 | 2022-04-08 | 完美世界(北京)软件科技发展有限公司 | Information interaction system and information interaction method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130339465A1 (en) * | 2011-02-21 | 2013-12-19 | Tencent Technology (Shenzhen) Company Limited | Method, apparatus and system for spreading a microblog list |
CN107592284A (en) * | 2016-07-06 | 2018-01-16 | 华为技术有限公司 | The apparatus and method of anti-DoS/DDoS attacks |
CN109639564A (en) * | 2018-12-12 | 2019-04-16 | 金瓜子科技发展(北京)有限公司 | A kind of method, apparatus and computer readable storage medium obtaining offline message |
CN109768910A (en) * | 2017-11-09 | 2019-05-17 | 腾讯科技(深圳)有限公司 | Information processing method, relevant apparatus, equipment and system |
CN110109803A (en) * | 2019-05-09 | 2019-08-09 | 腾讯科技(深圳)有限公司 | A kind of user behavior report method and system |
EP3541025A1 (en) * | 2016-02-25 | 2019-09-18 | Facebook, Inc. | Techniques for messaging bot rich communication |
CN110290217A (en) * | 2019-07-01 | 2019-09-27 | 腾讯科技(深圳)有限公司 | Processing method and processing device, storage medium and the electronic device of request of data |
CN111130986A (en) * | 2018-11-01 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Message sending method, device, equipment and storage medium |
-
2020
- 2020-05-21 CN CN202010437528.0A patent/CN111614549B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130339465A1 (en) * | 2011-02-21 | 2013-12-19 | Tencent Technology (Shenzhen) Company Limited | Method, apparatus and system for spreading a microblog list |
EP3541025A1 (en) * | 2016-02-25 | 2019-09-18 | Facebook, Inc. | Techniques for messaging bot rich communication |
CN107592284A (en) * | 2016-07-06 | 2018-01-16 | 华为技术有限公司 | The apparatus and method of anti-DoS/DDoS attacks |
CN109768910A (en) * | 2017-11-09 | 2019-05-17 | 腾讯科技(深圳)有限公司 | Information processing method, relevant apparatus, equipment and system |
CN111130986A (en) * | 2018-11-01 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Message sending method, device, equipment and storage medium |
CN109639564A (en) * | 2018-12-12 | 2019-04-16 | 金瓜子科技发展(北京)有限公司 | A kind of method, apparatus and computer readable storage medium obtaining offline message |
CN110109803A (en) * | 2019-05-09 | 2019-08-09 | 腾讯科技(深圳)有限公司 | A kind of user behavior report method and system |
CN110290217A (en) * | 2019-07-01 | 2019-09-27 | 腾讯科技(深圳)有限公司 | Processing method and processing device, storage medium and the electronic device of request of data |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113515707B (en) * | 2020-09-21 | 2024-02-09 | 腾讯科技(深圳)有限公司 | Data processing method, intelligent device, intelligent equipment and storage medium |
CN113515707A (en) * | 2020-09-21 | 2021-10-19 | 腾讯科技(深圳)有限公司 | Data processing method, intelligent device, intelligent equipment and storage medium |
CN112153476B (en) * | 2020-09-22 | 2022-07-22 | 游艺星际(北京)科技有限公司 | Interactive data processing method and device, server and storage medium |
CN112153476A (en) * | 2020-09-22 | 2020-12-29 | 游艺星际(北京)科技有限公司 | Interactive data processing method and device, server and storage medium |
CN112311661A (en) * | 2020-11-24 | 2021-02-02 | 腾讯科技(深圳)有限公司 | Message processing method, device, equipment and storage medium |
CN112311661B (en) * | 2020-11-24 | 2023-09-26 | 腾讯科技(深圳)有限公司 | Message processing method, device, equipment and storage medium |
CN113760421A (en) * | 2021-01-07 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Multi-account data processing method and device, electronic equipment and storage medium |
CN113225268B (en) * | 2021-04-20 | 2022-09-30 | 北京达佳互联信息技术有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN113225268A (en) * | 2021-04-20 | 2021-08-06 | 北京达佳互联信息技术有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN113742112A (en) * | 2021-09-15 | 2021-12-03 | 武汉联影智融医疗科技有限公司 | Electrocardio image generation method and system and electronic device |
CN113742112B (en) * | 2021-09-15 | 2024-04-16 | 武汉联影智融医疗科技有限公司 | Electrocardiogram image generation method, system and electronic device |
CN114157622A (en) * | 2021-11-29 | 2022-03-08 | 杭州逗酷软件科技有限公司 | Method, device, server and storage medium for adding friends |
CN114157622B (en) * | 2021-11-29 | 2024-03-19 | 杭州逗酷软件科技有限公司 | Method and device for adding friends, server and storage medium |
CN114296509A (en) * | 2021-12-29 | 2022-04-08 | 完美世界(北京)软件科技发展有限公司 | Information interaction system and information interaction method |
Also Published As
Publication number | Publication date |
---|---|
CN111614549B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111614549B (en) | Interaction processing method and device, computer equipment and storage medium | |
CN112947823B (en) | Session processing method, device, equipment and storage medium | |
CN110278464B (en) | Method and device for displaying list | |
CN111324259B (en) | Group creation method, device and storage medium | |
CN113098755B (en) | Group chat creating method, device, terminal and storage medium | |
CN110674022A (en) | Behavior data acquisition method and device and storage medium | |
CN107682255B (en) | Message transmission method, device and storage medium | |
CN112751679B (en) | Instant messaging message processing method, terminal and server | |
CN112764608B (en) | Message processing method, device, equipment and storage medium | |
CN110147503B (en) | Information issuing method and device, computer equipment and storage medium | |
CN109302385A (en) | Multimedia resource sharing method, device and storage medium | |
CN110569220B (en) | Game resource file display method and device, terminal and storage medium | |
CN111106997B (en) | Message reminding method, device, equipment and storage medium | |
CN112163406A (en) | Interactive message display method and device, computer equipment and storage medium | |
CN109246228B (en) | Resource acquisition method, resource allocation method, device, equipment and storage medium | |
CN111866140A (en) | Fusion management apparatus, management system, service calling method, and medium | |
CN108111397B (en) | Method and device for processing forwarding notification message | |
CN112311661B (en) | Message processing method, device, equipment and storage medium | |
CN114143280B (en) | Session display method and device, electronic equipment and storage medium | |
CN111444289A (en) | Incidence relation establishing method | |
CN113051494A (en) | Information display method and device, electronic equipment and storage medium | |
CN114546188A (en) | Interaction method, device and equipment based on interaction interface and readable storage medium | |
CN114513479B (en) | Message transmitting and receiving method, device, terminal, server and storage medium | |
CN115037702B (en) | Message distribution and data transmission methods and equipment | |
CN111490979B (en) | Information interaction method and device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40028112 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |