CN108462734B - Message receiving method and device - Google Patents
Message receiving method and device Download PDFInfo
- Publication number
- CN108462734B CN108462734B CN201710095330.7A CN201710095330A CN108462734B CN 108462734 B CN108462734 B CN 108462734B CN 201710095330 A CN201710095330 A CN 201710095330A CN 108462734 B CN108462734 B CN 108462734B
- Authority
- CN
- China
- Prior art keywords
- preset
- client
- server
- message
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/62—Establishing a time schedule for servicing the requests
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephonic Communication Services (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a message receiving method and a message receiving device. Wherein, the method comprises the following steps: the method comprises the steps that a client receives a first push message sent by a server through a preset interface, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client; displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button; the client responds to the touch signal and sets the preset application to be in a disturbance-free mode. The invention solves the technical problem of low convenience of setting the disturbance-free mode during message receiving in the related technology.
Description
Technical Field
The invention relates to the field of computers, in particular to a message receiving method and device.
Background
At present, in receiving a message of an application, operations for receiving the message are often performed, for example, operations for notifying the message. When setting the mode of the application, the internal operation of the Application (APP) needs to be entered for setting. Specifically, when the user needs to set the disturbance-free mode of the application, the application needs to be opened, the setting is performed in a preset page in the application, for example, the setting entry is deep, the operation is complex, the disturbance-free mode of the message cannot be set immediately when the message is received, the convenience of the disturbance-free mode setting during message receiving is low, and the user experience performance is reduced.
In view of the above-mentioned problem in the related art that the convenience of the setting of the do-not-disturb mode at the time of message reception is low, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a message receiving method and a message receiving device, which at least solve the technical problem of low convenience of setting a disturbance-free mode during message receiving in the related art.
According to an aspect of an embodiment of the present invention, a message receiving method is provided. The message receiving method comprises the following steps: the method comprises the steps that a client receives a first push message sent by a server through a preset interface, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client; displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button; the client responds to the touch signal and sets the preset application to be in a disturbance-free mode.
According to another aspect of the embodiments of the present invention, there is also provided a message receiving apparatus, including: the system comprises a receiving unit, a sending unit and a sending unit, wherein the receiving unit is used for enabling a client to receive a first push message sent by a server through a preset interface, the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client; the display unit is used for displaying a preset button corresponding to the preset information on the client and receiving the touch signal through the preset button; and the setting unit is used for enabling the client to respond to the touch signal and setting the preset application into a disturbance-free mode.
In the embodiment of the invention, a client is adopted to receive a first push message sent by a server through a preset interface, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client; displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button; the client responds to the touch signal and sets the preset application to be in a disturbance-free mode. Through the preset information between the client and the server, the preset button is displayed when the message is received, and the disturbance-free mode can be directly set through the preset button, so that the technical effect of improving the convenience of setting the disturbance-free mode when the message is received is achieved, and the technical problem of low convenience of setting the disturbance-free mode when the message is received in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of a hardware environment of a message receiving method according to an embodiment of the present invention;
fig. 2 is a flowchart of a message receiving method according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for a client to respond to a touch signal and set a predetermined application to a do-not-disturb mode according to an embodiment of the present invention;
fig. 4 is a flowchart of another message receiving method according to an embodiment of the present invention;
fig. 5 is an embodiment of another message receiving method according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for a client to receive a first push message sent by a server through a preset interface according to an embodiment of the present invention;
fig. 7 is a flowchart of a method for displaying preset buttons corresponding to predetermined information by a client according to an embodiment of the present invention;
FIG. 8 is a screen shot of a do not disturb mode setting for de-reception according to an embodiment of the invention;
fig. 9 is a schematic diagram of a message receiving apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention;
fig. 13 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention; and
fig. 14 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, an embodiment of a message receiving method is provided.
Alternatively, in the present embodiment, the message receiving method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a message receiving method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The message receiving method according to the embodiment of the present invention may be executed by the server 102, or executed by the terminal 104, or executed by both the server 102 and the terminal 104. The message receiving method performed by the terminal 104 according to the embodiment of the present invention may also be performed by a client installed thereon.
Fig. 2 is a flowchart of a message receiving method according to an embodiment of the present invention. As shown in fig. 2, the message receiving method may include the steps of:
step S202, the client receives a first push message sent by the server through a preset interface.
In the technical solution provided by step S202 of the present invention, the client receives a first push message sent by the server through a preset interface, where the first push message includes predetermined information between the client and the server, the predetermined information is used to indicate that a mode of a preset application is set to be a do-not-disturb mode, and the preset application is installed on the client.
The preset interface may be a shortcut operation interface for message notification, and the client may register the shortcut operation interface with a preset system, for example, the shortcut operation interface for message notification registered by the client to an Apple (Apple) system and an Android (Android) system. The client registers the shortcut operation interface with a preset system through a key value pair, for example, the client registers a key (category) with a server. Under the condition that the client registers a key with a preset system, after receiving a message pushed by a server, the client displays a button corresponding to the pushed message, wherein the server may be an Apple Push Notification Server (APNs).
After the client registers the shortcut operation interface with the server, the client has the capability of displaying a button corresponding to a push message according to the push message of the server. The first push message may be an instant messaging message sent by a server, and includes predetermined information between the client and the server, where the predetermined information is used to set a mode of a preset application to a non-disturbance mode, and optionally includes a character string preset between the client and the server. The preset application is installed on the client, for example, the preset application is an instant messaging application and has a message do-not-disturb mode, that is, the preset application does not accept a working mode of a message pushed by the server within a preset time. The no-disturbance mode also comprises a night no-disturbance mode, a no-disturbance mode and a no-disturbance mode.
Step S204, displaying a preset button corresponding to the preset information on the client, and receiving the touch signal through the preset button.
In the technical solution provided by step S204 of the present invention, a preset button corresponding to the predetermined information is displayed on the client, and the touch signal is received through the preset button.
After the client receives a first push message pushed by the server through the preset interface, displaying a preset button corresponding to the preset information on the client, wherein the preset button is a shortcut operation button displayed on a preset page of the client. The first push message comprises preset information, the preset information corresponds to the preset button, the first push message and the preset button further correspond to each other, the push messages are different, and the buttons displayed on the client are different. The preset buttons include buttons for briefly entering a do-not-disturb mode, such as a minor mode, wherein the minor mode includes a minor 1 hour mode, a minor 2 hour mode, and a minor 3 hour mode. The preset buttons also include a button for entering the do-not-disturb mode for a long time, such as a next work mode.
And displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button. Optionally, the user clicks a preset button to generate a touch signal. The client receives the touch signal through the preset button, so that a mode of setting the preset application in the preset application program is avoided.
In step S206, the client responds to the touch signal and sets the preset application to the no-disturbance mode.
In the technical solution of the step S206 in the present invention, the client responds to the touch signal and sets the preset application to the disturbance-free mode.
Displaying a preset button corresponding to the preset information on the client, and after receiving the touch signal through the preset button, the client responds to the touch signal and sets the preset application to be in a disturbance-free mode, that is, the client does not receive the message pushed by the server in the disturbance-free mode. The do-not-disturb mode corresponds to a preset button. The rest mode is not to receive the message pushed by the server in a short time, and comprises that the message pushed by the server is not received in 1 hour, the message pushed by the server is not received in 2 hours, and the message pushed by the server is not received in 3 hours. The non-disturbing mode also comprises a long-time receiving message pushed by the server, for example, after the non-disturbing mode is entered, the client can not receive the message pushed by the server until the next morning, so that the touch signal is received through the preset button, the preset application is set to be the non-disturbing mode, and the convenience of setting the non-disturbing mode when the message is received is improved.
Through the steps S202 to S206, receiving, by using the client, a first push message sent by the server through the preset interface, where the first push message includes predetermined information between the client and the server, where the predetermined information is used to indicate that a mode of a preset application is set to be a do-not-disturb mode, and the preset application is installed on the client; displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button; the client responds to the touch signal and sets the preset application to be in a disturbance-free mode. Through the preset information between the client and the server, the preset button is displayed when the message is received, and the disturbance-free mode can be directly set through the preset button, so that the technical effect of improving the convenience of setting the disturbance-free mode when the message is received is achieved, and the technical problem of low convenience of setting the disturbance-free mode when the message is received in the related technology is solved.
As an alternative embodiment, in step S206, the step of the client responding to the touch signal and setting the preset application to the non-disturbing mode includes: after receiving the touch signal through the preset button, the client wakes up the preset application through the server; the client acquires the duration of the disturbance-free mode; the client sends a first request carrying the duration to the server through a preset application.
Fig. 3 is a flowchart of a method for a client to respond to a touch signal and set a predetermined application to a do-not-disturb mode according to an embodiment of the present invention. As shown in fig. 3, the method for the client to respond to the touch signal and set the preset application to the no-disturbance mode includes the following steps:
in step S301, after receiving the touch signal through the preset button, the client wakes up the preset application through the server.
In the technical solution of step S301 in the present invention, after receiving the touch signal through the preset button, the client wakes up the preset application through the server.
After the client receives the touch signal through the preset button, the preset application is awakened through the server, and the preset application can be awakened through the operating system.
In step S302, the client obtains the duration of the do-not-disturb mode.
In the technical solution of step S302 of the present invention, the client obtains the duration of the do not disturb mode, where the duration is obtained by a preset application according to predetermined information.
After the client wakes up the preset application through the server, the client acquires the duration of the do-not-disturb mode, and the duration is obtained by the preset application according to the preset message. Optionally, the preset application calls a preset method, and the duration of the current disturbance-free mode is calculated by the preset method, that is, the shielding time of the application not receiving the message pushed by the server for a long time is preset, so that the client obtains the duration of the disturbance-free mode of the preset application, and the preset application may be an instant messaging application.
Step S303, the client sends a first request carrying the duration to the server through a preset application.
In the technical solution of step S303 of the present invention, the client sends a first request carrying the duration to the server through a preset application, where the server responds to the first request and stops pushing the message to the client within the duration.
For example, the client communicates with the background by calculating how long to stop the APNs notification. For example, if the user clicks "take an hour" the client uploads 3600 seconds to the server, tells the background not to notify the APNs for this period, and resumes the APNs notification once 3600 seconds have elapsed.
After the duration of the no-disturbance mode is obtained by the client, the preset application can send a first request carrying the duration to the server, the server receives the first request and responds to the first request, so that the message is stopped being pushed to the client within the duration, the preset application is enabled to enter the no-disturbance mode under the condition that the client is not called by a foreground, and the technical effect of improving the convenience of setting the no-disturbance mode when the message is received is achieved.
After receiving the touch signal through the preset button, the client of the embodiment wakes up the preset application through the server; the method comprises the steps that a client side obtains the duration of a do-not-disturb mode, and the duration is obtained by a preset application according to preset information; the client sends a first request carrying duration to the server through the preset application, the server responds to the first request and stops pushing information to the client within the duration, the purpose that the client responds to a touch signal and sets the preset application to be in the disturbance-free mode is achieved, and the technical effect of convenience in setting the disturbance-free mode during information receiving is improved.
As an optional implementation manner, after the client sends the first request carrying the duration to the server through the preset application, the client obtains the current remaining time for the server to stop sending the push message to the preset application; the method comprises the steps that a client side obtains the packet returning time when a server sends a push message to a preset application; the client determines a first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time.
Fig. 4 is a flowchart of another message receiving method according to an embodiment of the present invention. As shown in fig. 4, the message receiving method includes the following steps:
step S401, when the preset application is started, the client acquires the current remaining time for the server to stop sending the push message to the preset application.
In the technical solution of step S401 of the present invention, when the preset application is started, the client obtains a current remaining time for the server to stop sending the push message to the preset application, where the duration includes the current remaining time.
After the client sends the first request carrying the duration to the server through the preset application, when the preset application is started, for example, when the preset application is started through the client each time, the client obtains the current remaining time for the server to stop sending the push message to the preset application, that is, the current remaining mask time for the preset application not to receive the message pushed by the server, where the duration includes the current remaining time. And after the client acquires the current remaining time of the push message sent by the server to the preset application, the client stores the current remaining time locally.
Step S402, the client acquires the packet returning time when the server sends the push message to the preset application.
In the technical solution of step S402 of the present invention, the client obtains the back packet time when the server sends the push message to the preset application.
The packet returning time is the time when the server sends the push message to the client. The client obtains the time of the packet return, that is, the time from sending the message pushed by the server to receiving the message by the client.
In step S403, the client determines a first ending time of the do-not-disturb mode according to a sum of the current remaining time and the time for wrapping.
In the technical solution of the above step S403, the client determines the first ending time of the do-not-disturb mode according to the sum of the current remaining time and the packet returning time.
After the client acquires the current remaining time of the server stopping sending the push message to the preset application and the client acquires the packet returning time of the server sending the push message to the preset application, the client adds the current remaining time to the packet returning time so as to determine a first end time of the no-disturbance mode, wherein the first end time is used for indicating when the client ends shielding the message sent by the server.
Optionally, each time the client starts the preset application, the client will pull the current remaining shielding time to the background and store the current remaining shielding time in the local, and each time the packet returning time is added to the shielding remaining time, the client can calculate when the shielding is finished.
In the embodiment, after a client sends a first request carrying duration to a server through a preset application, when the preset application is started, the client acquires the current remaining time for the server to stop sending push messages to the preset application, wherein the duration comprises the current remaining time; the method comprises the steps that a client side obtains the packet returning time when a server sends a push message to a preset application; the client determines a first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time.
As an optional implementation manner, after the client determines the first end time of the do-nothing mode according to the sum of the current remaining time and the packet return time, the client sends a second request carrying the first end time to the server; and the client receives a message pushed by the server after a second end time, wherein the second end time is the sum of the first end time and the service time of the server.
Fig. 5 is an embodiment of another message receiving method according to an embodiment of the present invention. As shown in fig. 5, the message receiving method includes the following steps:
step S501, the client sends a second request carrying the first end time to the server.
In the technical solution of step S501 in the present invention, the client sends a second request carrying the first end time to the server.
After the client determines the first end time of the no-disturbance mode according to the sum of the current remaining time and the packet return time, the client generates a second request according to the first end time, the second request carries the first end time, and the client sends the second request to the server.
Step S502, the client receives a message pushed by the server after the second end time.
In the technical solution of step S502 in the present invention, the client receives a message pushed by the server after a second end time, where the second end time is a sum of the first end time and a service time of the server.
After a client sends a second request carrying a first end time to a server, the server receives the second request, responds to the second request, obtains the first end time, adds the first end time to the service (server) time of the server, and calculates the end time when the server stops pushing messages to a preset application, so that the time when the client stops receiving messages pushed by the server is synchronous with the time when the server stops pushing messages to the client, and the consistency of the time when the client receives messages and the time when the server pushes messages is kept. And reading the second end time at each message pushing time of the server, judging whether the current time exceeds the second end time, and pushing the push message to the client if the current time does not exceed the second end time.
And after the second end time, normal message pushing is resumed, and the client receives the message pushed by the server after the second end time.
In the embodiment, after the client determines the first end time of the no-disturbance mode according to the sum of the current remaining time and the packet return time, the client sends a second request carrying the first end time to the server; the client receives the message pushed by the server after a second end time, wherein the second end time is the sum of the first end time and the service time of the server, so that the consistency of the time for receiving the message by the client and the time for pushing the message by the server is maintained.
As an optional implementation manner, the predetermined information includes a preset character string, and in step S202, the receiving, by the client, the first push message sent by the server through the preset interface includes: the client receives a preset character string sent by the server through a preset interface; step S204, the displaying, by the client, the preset button corresponding to the predetermined information includes: and the client displays a preset button corresponding to the preset character string.
Fig. 6 is a flowchart of a method for a client to receive a first push message sent by a server through a preset interface according to an embodiment of the present invention. As shown in fig. 6, the method for receiving, by the client, the first push message sent by the server through the preset interface includes the following steps:
step S601, the client receives a preset character string sent by the server through a preset interface.
In the technical solution of step S601 of the present invention, the client receives the preset character string sent by the server through the preset interface.
The preset message comprises a preset character string, the preset character string is a specific character string agreed by the client and the server, and the server pushes the specific character string to indicate that a preset button corresponding to the preset character string appears at the client. The corresponding relation between the preset character string and the preset button is determined when the client registers in the preset system, and after the client registers in the preset system, the client is provided with different buttons which are displayed according to different messages pushed by the server.
Step S602, the client displays a preset button corresponding to the preset character string.
In the technical solution of step S602 in the present invention, the client displays a preset button corresponding to the preset character string.
After the client receives the preset character string sent by the server through the preset interface, the client displays a preset button corresponding to the preset character string.
And the server receives the message pushing package, and analyzes the message pushing package to obtain an analysis result. If the analysis result includes the key in the key value pair, searching whether a client registered with the key in the key value pair exists, if so, pushing the message to the client, and displaying a preset button corresponding to the pushed message after the client receives the message. If the user clicks the preset button, the operating system forcibly awakens the preset application and calls the preset method, the preset application calculates the duration time of the current disturbance-free mode to be kept through the preset method, and sends a request carrying the duration time to the background, and the server responds to the request and does not send push information to the client within the duration time, so that the client directly enters the disturbance-free mode under the condition of not awakening the preset application, and the setting rapidity of the disturbance-free mode during message receiving is improved.
According to the embodiment, the client receives the preset character string sent by the server through the preset interface, so that the purpose that the client receives the first push message sent by the server through the preset interface is achieved. The purpose that the client displays the preset button corresponding to the preset information is achieved through the fact that the client displays the preset button corresponding to the preset character string, therefore, the client does not need to enter the interior of the preset application to operate, the non-disturbance mode can be rapidly entered when the message notification is received, and the setting rapidity of the non-disturbance mode during message receiving is improved.
As an alternative embodiment, in step S204, in the case that the client registers the predetermined information, the displaying, by the client, a preset button corresponding to the predetermined information includes: the client judges whether the preset character string comprises a key in a preset key value pair or not, wherein the preset information comprises the key in the preset key value pair; and if the client judges that the preset character string comprises a key in the preset key value pair, displaying a preset button corresponding to the key in the preset key value pair.
Fig. 7 is a flowchart of a method for displaying a preset button corresponding to predetermined information by a client according to an embodiment of the present invention. As shown in fig. 7, the method for displaying the preset button corresponding to the predetermined information by the client includes the following steps:
in step S701, the client determines whether the preset character string includes a key in the preset key value pair.
In the technical scheme of step S701 of the present invention, the client determines whether the preset character string includes a key in a preset key value pair, wherein the predetermined information includes the key in the preset key value pair.
After the client receives the first push message sent by the server through the preset interface, the client determines whether the preset character string includes a key in a preset key value pair, for example, the key is Category, and the key value pair has a value of "1E", where "1E" is used to represent a rest for 1 hour. If the client determines that the preset character string includes a key in the preset key value pair, step S702 is executed.
Step S702 displays a preset button corresponding to a key in a preset key value pair.
In the technical solution of step S702 of the present invention, if the client determines that the preset character string includes a key in the preset key value pair, the client displays a preset button corresponding to the key in the preset key value pair.
After the client judges that the preset character string comprises a key in the preset key value pair, if the client judges that the preset character string comprises the key in the preset key value pair, the client determines that the preset character string is a character string appointed with the server, and displays a preset button corresponding to the key in the preset key value pair.
The embodiment judges whether the preset character string comprises a key in a preset key value pair or not through the client, wherein the preset information comprises the key in the preset key value pair; if the client judges that the preset character string comprises the key in the preset key value pair, the preset button corresponding to the key in the preset key value pair is displayed, the purpose that the client displays the preset button corresponding to the preset information under the condition that the client registers the preset information is achieved, and the setting rapidity of the disturbance-free mode during message receiving is improved.
As an optional implementation manner, in step S202, the receiving, by the client, the first push message sent by the server through the preset interface includes: the client receives a plurality of user-defined fields sent by the server through a preset interface, wherein the plurality of user-defined fields respectively correspond to different durations of the do-not-disturb mode, and the first push message comprises the plurality of user-defined fields.
After a user clicks a preset button, a preset application calculates the duration of the do-not-disturb mode according to a preset method, sends a request carrying the duration to a server, and after receiving the request, the server can issue a custom field, for example, 1E, 2E and 3E, wherein 1E corresponds to a client and displays the do-not-disturb for 1 hour, 2E corresponds to the client and displays the do-not-disturb for 2 hours, and 3E corresponds to the client and displays the do-not-disturb for 3 hours, so that the notification of the client prompts different contents.
Example 2
The technical solution of the present invention will be described below with reference to preferred embodiments.
The message receiving method of the embodiment can quickly enter a holiday mode and a working off mode when receiving the message. The mobile terminal can provide the above functions. The APNS of the iOS system may directly provide a shortcut button unified solution. The android system also provides a similar solution.
And the client registers a shortcut operation interface for notification to the apple system. The client may register the uimumetableuserinnotificationcategory interface in advance with the Apple through UIRemoteNotifications. After the client can register the UIMutableUserNotification category interface in advance to the Apple through UIRemoteNotifications, the client has the capability of displaying different buttons according to different contents pushed by the APNs. At this time, the client and the background are required to agree on a specific character string, and the background pushes a special character string to the client to indicate that the corresponding button appears on the client. For example, in the instant messaging application, when the APNs are pushed in the background, the key-value key value pair with the key of "category" and the value of "1E" is carried in the pushed structure, and when the instant messaging application receives the APNs, the corresponding button is displayed on the popup window capable of being pushed.
The server may issue custom fields, for example, 1E, 2E, and 3E, which respectively correspond to the client and display a rest for one hour, two hours, and three hours, so that the notification of the client prompts different contents. And when the APNs server receives the APNs packets, analyzing the APNs packets to obtain analysis results. If the key category is contained in the resolving result, the client side searches whether the category is disconnected for registration. If the client registered with the key category is found, the corresponding button can be displayed on the information display frame popped up by the client. If the user clicks the button, the operating system forcibly wakes up the App and calls an application, namely, a handleActionWithIdentifier, for RemoteNotification and a completionHandler, a method is adopted, the instant messaging application can calculate how long the instant messaging application needs to be free from being disturbed currently in the method and sends a request to the next day, and then the client directly enters a holiday and off-duty disturbance-free mode under the condition of not waking up the APP.
The way for the client to communicate with the background is to calculate how long to stop the APNs notification. For example, if the user clicks "take an hour" the client uploads 3600 seconds, telling the background not to notify the APNs for this period, and resumes the APNs notification once 3600 seconds have elapsed.
And when the client starts the App each time, the client pulls the current residual shielding time to the background and stores the current residual shielding time in the local. Each time the packet return time is added with the remaining time of the shielding, the client can calculate when the shielding is finished. After receiving the remaining time of the notification of stopping the APNs from the client, the background adds the server time with the time to calculate the shielding end time of the APNs at the server end, reads the time each time when the APNs need to be sent, and does not send the APNs to the client if the current time is still in the shielding period.
The disturbance-free mode of message reception of this embodiment can swiftly operate, does not need to get into in the APP and go the operation, and in addition, the function perception that disturbance-free mode was exempted from to the minor holiday, had gone off duty to disturbance-free mode is more extensive, has improved user's experience performance.
Example 3
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application for implementing the message receiving method.
Fig. 8 is a screen shot of a no-disturb mode setting for no-receive according to an embodiment of the invention. As shown in fig. 8, the client receives, through a preset interface, a first push message sent by the server, where the content of the first push message is "is the product requirement document cleared? "where the first push message includes predetermined information between the client and the server, the predetermined information being used to indicate that the mode of the preset application is set to the do-not-disturb mode, such as" 1 hour of rest "," off duty ". The instant messaging application is installed on the client; preset buttons corresponding to the first push message, such as a "1 hour of rest" button and a "work off" button, are displayed on the client. Receiving a touch signal through a preset button; after receiving the touch signal through the preset button, the client sets the preset application to be in a disturbance-free mode.
When the embodiment receives the message notification, the operation is directly and quickly performed on the message notification, and the operation enters a low-duty and off-duty disturbance-free mode. Therefore, when the mobile terminal receives the message notification, the interface provided by the system can be utilized to provide a quick operation entrance on the message notification, and the purpose of directly entering a rest and going off duty under the condition of not waking up the APP is achieved, so that the technical effect of improving the convenience of the non-disturbing mode setting during message receiving is realized, and the technical problem of low convenience of the non-disturbing mode setting during message receiving in the related art is solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 4
According to the embodiment of the invention, the invention also provides a message receiving device for implementing the message receiving method. Fig. 9 is a schematic diagram of a message receiving apparatus according to an embodiment of the present invention. As shown in fig. 9, the message receiving apparatus may include: a receiving unit 10, a display unit 20, and a setting unit 30.
The receiving unit 10 is configured to enable the client to receive a first push message sent by the server through a preset interface, where the first push message includes predetermined information between the client and the server, the predetermined information is used to indicate that a mode of a preset application is set to be a do-not-disturb mode, and the preset application is installed on the client.
The preset interface may be a shortcut operation interface for message notification, and the client may register the shortcut operation interface with a preset system. The client registers the shortcut operation interface with a preset system through a key value pair, for example, the client registers a key (category) with a server. In the case where the client has registered a key with a preset system, the reception unit 10 causes the client to display a button corresponding to a push message after receiving the message pushed by the server.
After the client registers the shortcut operation interface with the server, the client has the capability of displaying a button corresponding to a push message according to the push message of the server. The first push message may be an instant messaging message sent by a server, and includes predetermined information between the client and the server, where the predetermined information is used to set a mode of a preset application to a non-disturbance mode, and optionally includes a character string preset between the client and the server. The preset application is installed on the client, for example, the preset application is an instant messaging application and has a message do-not-disturb mode, that is, the preset application does not accept a working mode of a message pushed by the server within a preset time.
The display unit 20 is configured to display a preset button corresponding to the predetermined information on the client, and receive the touch signal through the preset button.
After the receiving unit 10 enables the client to receive the first push message pushed by the server through the preset interface, the display unit 20 enables the client to display a preset button corresponding to the predetermined information, where the preset button is a shortcut button displayed on a preset page of the client. The first push message comprises preset information, the preset information corresponds to the preset button, the first push message and the preset button further correspond to each other, the push messages are different, and the buttons displayed on the client are different. The preset buttons include a button for briefly entering the do-not-disturb mode.
The display unit 20 displays a preset button corresponding to predetermined information on the client, and receives a touch signal through the preset button. Optionally, the user clicks a preset button to generate a touch signal. The client receives the touch signal through the preset button, so that a mode of setting the preset application in the preset application program is avoided.
The setting unit 30 is configured to enable the client to respond to the touch signal, and set the preset application to the non-disturbing mode.
After the display unit 20 displays a preset button corresponding to the predetermined information on the client and receives the touch signal through the preset button, the client responds to the touch signal and sets the preset application to the non-disturbance mode, that is, the client does not receive the message pushed by the server in the non-disturbance mode. This do not disturb mode and preset the button corresponding, realized receiving touch signal through presetting the button, will predetermine the application and set up to do not disturb the mode, improved the convenience that does not disturb the mode setting when the message reception.
Fig. 10 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention. As shown in fig. 10, the message receiving apparatus may include: a receiving unit 10, a display unit 20, and a setting unit 30. Wherein the setting unit 30 includes: a wake-up module 31, a first acquisition module 32 and a first sending module 33.
It should be noted that the receiving unit 10, the display unit 20, and the setting unit 30 in this embodiment have the same functions as those in the message receiving apparatus in the embodiment shown in fig. 9, and are not described again here.
And the wake-up module 31 is configured to wake up the preset application through the server after the client receives the touch signal through the preset button.
After the client receives the touch signal through the preset button, the wake-up module 31 is configured to wake up the preset application through the server, and may wake up the preset application through the operating system.
A first obtaining module 32, configured to enable the client to obtain a duration of the do-not-disturb mode, where the duration is obtained by a preset application according to predetermined information.
After the wake-up module 31 makes the client wake up the preset application through the server, the first obtaining module 32 is configured to make the client obtain a duration of the do-nothing mode, where the duration is obtained by the preset application according to a predetermined message. Optionally, the preset application calls a preset method, and the duration of the current disturbance-free mode is calculated by the preset method, so that the client acquires the duration of the preset application disturbance-free mode.
The first sending module 33 is configured to enable the client to send a first request carrying the duration to the server through a preset application, where the server responds to the first request and stops pushing the message to the client within the duration.
After the client acquires the duration of the do-not-disturb mode through the first acquisition module 32, the preset application can send a first request carrying the duration to the server, and the server receives the first request and responds to the first request, so that the message is stopped being pushed to the client within the duration, the preset application is enabled to enter the do-not-disturb mode under the condition that the client is not called by the foreground, and the technical effect of improving the convenience of the set of the do-not-disturb mode during message reception is achieved.
Fig. 11 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention. As shown in fig. 11, the message receiving apparatus may include: a receiving unit 10, a display unit 20, and a setting unit 30. The setting unit 30 includes: a wake-up module 31, a first acquisition module 32 and a first sending module 33. Wherein, the setting unit 30 further includes: a second acquisition module 34, a third acquisition module 35 and a determination module 36.
It should be noted that the receiving unit 10, the display unit 20, the setting unit 30, the waking module 31, the first obtaining module 32, and the first sending module 33 of this embodiment are the same as the message receiving apparatus of the embodiment shown in fig. 10, and are not described again here.
A second obtaining module 34, configured to, after the client sends the first request with the duration to the server through the preset application, when the preset application is started, enable the client to obtain a current remaining time for the server to stop sending the push message to the preset application, where the duration includes the current remaining time.
After the first sending module 33 enables the client to send the first request carrying the duration to the server through the preset application, when the preset application is started, for example, when the preset application is started through the client each time, the second obtaining module 34 enables the client to obtain the current remaining time for the server to stop sending the push message to the preset application, that is, the preset application does not receive the current remaining mask time of the message pushed by the server, where the duration includes the current remaining time. And after the client acquires the current remaining time of the push message sent by the server to the preset application, the client stores the current remaining time locally.
The third obtaining module 35 is configured to enable the client to obtain a packet return time when the server sends the push message to the preset application.
The packet returning time is the time when the server sends the push message to the client. The third obtaining module 35 enables the client to obtain the time of the packet return, that is, the time from sending the message pushed by the server to receiving the message by the client.
A determining module 36, configured to enable the client to determine a first ending time of the do-not-disturb mode according to a sum of the current remaining time and the packet return time.
After the third obtaining module 35 makes the client obtain the current remaining time for the server to stop sending the push message to the preset application, and the client obtains the packet returning time for the server to send the push message to the preset application, the client adds the current remaining time to the packet returning time to determine the first end time of the no-disturb mode, where the first end time is used to indicate when the client ends to shield the message pushed by the receiving server.
Optionally, each time the client starts the preset application, the client will pull the current remaining shielding time to the background and store the current remaining shielding time in the local, and each time the packet returning time is added to the shielding remaining time, the client can calculate when the shielding is finished.
Fig. 12 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention. As shown in fig. 12, the message receiving apparatus may include: a receiving unit 10, a display unit 20, and a setting unit 30. The setting unit 30 includes: a wake-up module 31, a first acquisition module 32 and a first sending module 33. The setting unit 30 further includes: a second acquisition module 34, a third acquisition module 35 and a determination module 36. The setting unit 30 further includes a second sending module 37 and a receiving module 38.
It should be noted that, the receiving unit 10, the display unit 20, the setting unit 30, the waking module 31, the first obtaining module 32, the first sending module 33, the second obtaining module 34, the third obtaining module 35, and the determining module 36 in this embodiment are the same as those in the message receiving apparatus in the embodiment shown in fig. 11, and are not described again here.
A second sending module 37, configured to, after the client determines the first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time, enable the client to send a second request carrying the first end time to the server.
After the second sending module 37 enables the client to determine the first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time, a second request is generated according to the first end time, the second request carries the first end time, and the second sending module 37 enables the client to send the second request to the server.
And a receiving module 38, configured to enable the client to receive a message pushed by the server after a second end time, where the second end time is a sum of the first end time and a service time of the server.
After the second sending module 37 enables the client to send the second request carrying the first end time to the server, the server receives the second request, responds to the second request, obtains the first end time, adds the first end time to the service (server) time of the server, and calculates the end time when the server stops pushing the message to the preset application, so that the time when the client stops receiving the message pushed by the server and the time when the server stops pushing the message to the client are synchronized, and the time consistency between the message received by the client and the message pushed by the server is maintained. And reading the second end time at each message pushing time of the server, judging whether the current time exceeds the second end time, and pushing the push message to the client if the current time does not exceed the second end time.
After the second end time, normal message pushing is resumed, and the receiving module 38 enables the client to receive the message pushed by the server after the second end time.
Optionally, the predetermined information includes a preset character string, and the receiving unit 10 is configured to enable the client to receive the preset character string sent by the server through a preset interface; the display unit 20 is configured to cause the client to display a preset button corresponding to a preset character string.
Fig. 13 is a schematic diagram of another message receiving apparatus according to an embodiment of the present invention. As shown in fig. 13, the message receiving apparatus may include: a receiving unit 10, a display unit 20, and a setting unit 30. Wherein, the display unit 20 includes: a judging module 21 and a display module 22.
It should be noted that the receiving unit 10, the display unit 20 and the setting unit 30 of this embodiment have the same functions as those of the message receiving apparatus of the embodiment shown in fig. 9, and are not described again here.
The determining module 21 is configured to enable the client to determine whether the preset character string includes a key in a preset key value pair, where the predetermined information includes the key in the preset key value pair.
After the receiving unit is configured to enable the client to receive the first push message sent by the server through the preset interface, the determining module 21 is configured to enable the client to determine whether the preset character string includes a key in the preset key value pair.
And a display module 22, configured to display a preset button corresponding to a key in the preset key value pair if the client determines that the preset character string includes the key in the preset key value pair.
After the determining module 21 makes the client determine that the preset character string includes a key in the preset key value pair, if the client determines that the preset character string includes a key in the preset key value pair, the client determines that the preset character string is a character string agreed with the server, and the display module 22 makes the client display a preset button corresponding to the key in the preset key value pair.
Optionally, the receiving unit 10 is configured to enable the client to receive, through a preset interface, a plurality of custom fields sent by the server, where the plurality of custom fields respectively correspond to different durations of the do-not-disturb mode, and the first push message includes the plurality of custom fields.
It should be noted that the receiving unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the display unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, and the setting unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application.
The embodiment is configured to enable a client to receive a first push message sent by a server through a preset interface through a receiving unit 10, where the first push message includes predetermined information between the client and the server, the predetermined information is used to indicate that a mode of a preset application is set to be a do-not-disturb mode, the preset application is installed on the client, a preset button corresponding to the predetermined information is displayed on the client through a display unit 20, and a touch signal is received through the preset button, the client responds to the touch signal through a setting unit 30, and the preset application is set to be the do-not-disturb mode.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
Example 5
According to the embodiment of the invention, the invention also provides a server or a terminal for implementing the message receiving method.
Fig. 14 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 14, the terminal may include: one or more processors 141 (only one shown), memory 143, and transmission device 145. As shown in fig. 14, the terminal may further include an input-output device 207.
The memory 143 may be used to store software programs and modules, such as program instructions/modules corresponding to the message receiving method and apparatus in the embodiments of the present invention, and the processor 141 executes various functional applications and data processing by running the software programs and modules stored in the memory 143, so as to implement the message receiving method described above. Memory 143 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 143 may further include memory located remotely from processor 141, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 145 is used for receiving or transmitting data via a network, and may also be used for data transmission between the processor and the memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 145 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 145 is a Radio Frequency (RF) module for communicating with the internet by wireless.
Wherein, in particular, the memory 143 is used for storing application programs.
Processor 141 may invoke an application stored in memory 143 via transport 145 to perform the following steps:
the method comprises the steps that a client receives a first push message sent by a server through a preset interface, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client;
displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button;
the client responds to the touch signal and sets the preset application to be in a disturbance-free mode.
Processor 141 is also configured to perform the following steps: after receiving the touch signal through the preset button, the client wakes up the preset application through the server; the method comprises the steps that a client side obtains the duration of a do-not-disturb mode, wherein the duration is obtained by a preset application according to preset information; the client sends a first request carrying the duration to the server through a preset application, wherein the server responds to the first request and stops pushing the message to the client within the duration.
Processor 141 is also configured to perform the following steps: after a client sends a first request carrying duration to a server through a preset application, when the preset application is started, the client acquires the current remaining time for the server to stop sending push messages to the preset application, wherein the duration comprises the current remaining time; the method comprises the steps that a client side obtains the packet returning time when a server sends a push message to a preset application; the client determines a first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time.
Processor 141 is also configured to perform the following steps: after the client determines the first end time of the disturbance-free mode according to the sum of the current remaining time and the packet returning time, the client sends a second request carrying the first end time to the server; and the client receives a message pushed by the server after a second end time, wherein the second end time is the sum of the first end time and the service time of the server.
Processor 141 is also configured to perform the following steps: the predetermined information comprises a preset character string, and the step of receiving a first push message sent by the server through a preset interface by the client comprises the following steps: the client receives a preset character string sent by the server through a preset interface; the client displaying a preset button corresponding to the predetermined information includes: and the client displays a preset button corresponding to the preset character string.
Processor 141 is also configured to perform the following steps: the client judges whether the preset character string comprises a key in a preset key value pair or not, wherein the preset information comprises the key in the preset key value pair; and if the client judges that the preset character string comprises a key in the preset key value pair, displaying a preset button corresponding to the key in the preset key value pair.
Processor 141 is also configured to perform the following steps: the client receives a plurality of user-defined fields sent by the server through a preset interface, wherein the plurality of user-defined fields respectively correspond to different durations of the do-not-disturb mode, and the first push message comprises the plurality of user-defined fields.
The embodiment of the invention provides a scheme for receiving a message. Receiving a first push message sent by a server through a preset interface by using a client, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client; displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button; the client responds to the touch signal and sets the preset application to be in a disturbance-free mode. Through the preset information between the client and the server, the preset button is displayed when the message is received, and the disturbance-free mode can be directly set through the preset button, so that the technical effect of improving the convenience of setting the disturbance-free mode when the message is received is achieved, and the technical problem of low convenience of setting the disturbance-free mode when the message is received in the related technology is solved. Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 14 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 14 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 14, or have a different configuration than shown in FIG. 14.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 6
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the message receiving method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
the method comprises the steps that a client receives a first push message sent by a server through a preset interface, wherein the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client;
displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button;
the client responds to the touch signal and sets the preset application to be in a disturbance-free mode.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after receiving the touch signal through the preset button, the client wakes up the preset application through the server; the method comprises the steps that a client side obtains the duration of a do-not-disturb mode, wherein the duration is obtained by a preset application according to preset information; the client sends a first request carrying the duration to the server through a preset application, wherein the server responds to the first request and stops pushing the message to the client within the duration.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after a client sends a first request carrying duration to a server through a preset application, when the preset application is started, the client acquires the current remaining time for the server to stop sending push messages to the preset application, wherein the duration comprises the current remaining time; the method comprises the steps that a client side obtains the packet returning time when a server sends a push message to a preset application; the client determines a first end time of the do-not-disturb mode according to the sum of the current remaining time and the packet return time.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the client determines the first end time of the disturbance-free mode according to the sum of the current remaining time and the packet returning time, the client sends a second request carrying the first end time to the server; and the client receives a message pushed by the server after a second end time, wherein the second end time is the sum of the first end time and the service time of the server.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the predetermined information comprises a preset character string, and the step of receiving a first push message sent by the server through a preset interface by the client comprises the following steps: the client receives a preset character string sent by the server through a preset interface; the client displaying a preset button corresponding to the predetermined information includes: and the client displays a preset button corresponding to the preset character string.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the client judges whether the preset character string comprises a key in a preset key value pair or not, wherein the preset information comprises the key in the preset key value pair; and if the client judges that the preset character string comprises a key in the preset key value pair, displaying a preset button corresponding to the key in the preset key value pair.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the client receives a plurality of user-defined fields sent by the server through a preset interface, wherein the plurality of user-defined fields respectively correspond to different durations of the do-not-disturb mode, and the first push message comprises the plurality of user-defined fields.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (14)
1. A message receiving method, comprising:
the method comprises the steps that a client receives a first push message sent by a server through a preset interface, wherein the preset interface is a shortcut operation interface used for message notification, the first push message comprises preset information between the client and the server, the preset information is used for indicating that a mode of a preset application is set to be a disturbance-free mode, and the preset application is installed on the client;
displaying a preset button corresponding to the preset information on the client, and receiving a touch signal through the preset button;
and the client responds to the touch signal and sets the preset application to be in the disturbance-free mode.
2. The method of claim 1, wherein the client responding to the touch signal and setting the preset application to the do-not-disturb mode comprises:
the client awakens the preset application through the server after receiving the touch signal through the preset button;
the client acquires the duration of the disturbance-free mode, wherein the duration is obtained by the preset application according to the preset information;
and the client sends a first request carrying the duration to the server through the preset application, wherein the server responds to the first request and stops pushing messages to the client within the duration.
3. The method according to claim 2, wherein after the client sends the first request carrying the duration to the server through the preset application, the method further comprises:
when the preset application is started, the client acquires the current remaining time for the server to stop sending the push message to the preset application, wherein the duration comprises the current remaining time;
the client acquires the packet returning time when the server sends the push message to the preset application;
and the client determines a first ending time of the no-disturbance mode according to the sum of the current remaining time and the packet returning time.
4. The method of claim 3, wherein after the client determines a first end time of the do-not-disturb mode according to a sum of the current remaining time and the packet return time, the method further comprises:
the client sends a second request carrying the first end time to the server;
and the client receives a message pushed by the server after a second end time, wherein the second end time is the sum of the first end time and the service time of the server.
5. The method of claim 1, wherein the predetermined information includes a predetermined character string,
the receiving, by the client, the first push message sent by the server through the preset interface includes: the client receives the preset character string sent by the server through the preset interface;
the displaying, by the client, the preset button corresponding to the predetermined information includes: and the client displays the preset button corresponding to the preset character string.
6. The method of claim 5, wherein the client displaying the preset button corresponding to the predetermined information comprises:
the client judges whether the preset character string comprises a key in a preset key value pair or not, wherein the preset information comprises the key in the preset key value pair;
and if the client judges that the preset character string comprises a key in the preset key value pair, displaying the preset button corresponding to the key in the preset key value pair.
7. The method of claim 1, wherein the client receiving the first push message sent by the server through the preset interface comprises:
the client receives a plurality of user-defined fields sent by the server through the preset interface, wherein the user-defined fields respectively correspond to different durations of the do-not-disturb mode, and the first push message comprises the user-defined fields.
8. A message receiving apparatus, comprising:
a receiving unit, configured to enable a client to receive a first push message sent by a server through a preset interface, where the preset interface is a shortcut operation interface for message notification, the first push message includes predetermined information between the client and the server, the predetermined information is used to indicate that a mode of a preset application is set to a non-disturbance mode, and the preset application is installed on the client;
the display unit is used for displaying a preset button corresponding to the preset information on the client and receiving a touch signal through the preset button;
and the setting unit is used for enabling the client to respond to the touch signal and setting the preset application to be in the disturbance-free mode.
9. The apparatus according to claim 8, wherein the setting unit includes:
the awakening module is used for awakening the preset application through the server after the client receives the touch signal through the preset button;
a first obtaining module, configured to enable the client to obtain a duration of the do-not-disturb mode, where the duration is obtained by the preset application according to the predetermined information;
and the first sending module is used for enabling the client to send a first request carrying the duration to the server through the preset application, wherein the server responds to the first request and stops pushing the message to the client within the duration.
10. The apparatus of claim 9, wherein the setting unit further comprises:
a second obtaining module, configured to, after the client sends the first request carrying the duration to the server through the preset application, when the preset application is started, enable the client to obtain a current remaining time for the server to stop sending the push message to the preset application, where the duration includes the current remaining time;
a third obtaining module, configured to enable the client to obtain a packet return time when the server sends the push message to the preset application;
a determining module, configured to enable the client to determine a first end time of the do-not-disturb mode according to a sum of the current remaining time and the packet return time.
11. The apparatus of claim 10, wherein the setting unit further comprises:
a second sending module, configured to, after the client determines a first end time of the do-not-disturb mode according to a sum of the current remaining time and the packet return time, enable the client to send a second request carrying the first end time to the server;
a receiving module, configured to enable the client to receive a message pushed by the server after a second end time, where the second end time is a sum of the first end time and a service time of the server.
12. The apparatus of claim 8, wherein the predetermined information includes a predetermined character string,
the receiving unit is used for enabling the client to receive the preset character string sent by the server through the preset interface;
the display unit is used for enabling the client to display the preset button corresponding to the preset character string.
13. The apparatus of claim 12, wherein the display unit comprises:
a judging module, configured to enable the client to judge whether the preset character string includes a key in a preset key value pair, where the predetermined information includes the key in the preset key value pair;
and the display module is used for displaying the preset button corresponding to the key in the preset key value pair if the client judges that the preset character string comprises the key in the preset key value pair.
14. The apparatus according to claim 8, wherein the receiving unit is configured to enable the client to receive, through the preset interface, a plurality of custom fields sent by the server, where the plurality of custom fields respectively correspond to different durations of the do-not-disturb mode, and the first push message includes the plurality of custom fields.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710095330.7A CN108462734B (en) | 2017-02-20 | 2017-02-20 | Message receiving method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710095330.7A CN108462734B (en) | 2017-02-20 | 2017-02-20 | Message receiving method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108462734A CN108462734A (en) | 2018-08-28 |
CN108462734B true CN108462734B (en) | 2020-11-17 |
Family
ID=63229249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710095330.7A Active CN108462734B (en) | 2017-02-20 | 2017-02-20 | Message receiving method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108462734B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109889438B (en) * | 2019-03-19 | 2021-07-13 | 北京达佳互联信息技术有限公司 | Message pushing method, message pushing device and computer readable storage medium |
CN110365541B (en) * | 2019-07-31 | 2021-06-15 | 腾讯科技(深圳)有限公司 | Method for generating corresponding relation in gateway, and method and device for sending instruction |
CN114268663A (en) * | 2020-09-14 | 2022-04-01 | 华为技术有限公司 | Management method of push message and related device |
CN112600978B (en) * | 2020-12-30 | 2023-03-24 | 北京字跳网络技术有限公司 | Information processing method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003337499A (en) * | 2002-05-21 | 2003-11-28 | Canon Inc | Image forming apparatus |
CN103686645A (en) * | 2012-09-25 | 2014-03-26 | 京东方科技集团股份有限公司 | A user terminal conversation notifying method and a user terminal conversation notifying apparatus |
CN104035553A (en) * | 2013-03-06 | 2014-09-10 | 飞思卡尔半导体公司 | Systems and methods for indicating that an interface is being touched |
CN104346217A (en) * | 2014-10-08 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Method and system for prompting push information |
CN104978201A (en) * | 2015-07-14 | 2015-10-14 | 安一恒通(北京)科技有限公司 | Method and device for controlling automatic pop-up window display |
CN105979069A (en) * | 2016-04-25 | 2016-09-28 | 乐视控股(北京)有限公司 | Application shortcut operating method and application shortcut operating device |
CN205959049U (en) * | 2016-08-10 | 2017-02-15 | 广东灵镜医疗实业有限公司 | Central control panel for operating room |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100447B (en) * | 2015-06-30 | 2019-03-08 | 联想(北京)有限公司 | A kind of setting of application attribute and message treatment method, device |
-
2017
- 2017-02-20 CN CN201710095330.7A patent/CN108462734B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003337499A (en) * | 2002-05-21 | 2003-11-28 | Canon Inc | Image forming apparatus |
CN103686645A (en) * | 2012-09-25 | 2014-03-26 | 京东方科技集团股份有限公司 | A user terminal conversation notifying method and a user terminal conversation notifying apparatus |
CN104035553A (en) * | 2013-03-06 | 2014-09-10 | 飞思卡尔半导体公司 | Systems and methods for indicating that an interface is being touched |
CN104346217A (en) * | 2014-10-08 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Method and system for prompting push information |
CN104978201A (en) * | 2015-07-14 | 2015-10-14 | 安一恒通(北京)科技有限公司 | Method and device for controlling automatic pop-up window display |
CN105979069A (en) * | 2016-04-25 | 2016-09-28 | 乐视控股(北京)有限公司 | Application shortcut operating method and application shortcut operating device |
CN205959049U (en) * | 2016-08-10 | 2017-02-15 | 广东灵镜医疗实业有限公司 | Central control panel for operating room |
Also Published As
Publication number | Publication date |
---|---|
CN108462734A (en) | 2018-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108462734B (en) | Message receiving method and device | |
EP3334127B1 (en) | Message pushing method and apparatus thereof | |
CN110324793B (en) | Information reminding method and device and electronic terminal | |
EP2999276A1 (en) | Method and terminal for reporting sensor data | |
US11221743B2 (en) | Information processing method, terminal, server, and computer storage medium | |
CN102932238A (en) | Reminding method and equipment of group messages | |
CN108810116A (en) | Message treatment method and Related product | |
CN104021218A (en) | Information display method and device | |
CN112566078A (en) | Device connection method and apparatus, storage medium, and electronic apparatus | |
CN111857609A (en) | Method and device for uploading cloud printing log and computer storage medium | |
US20240298258A1 (en) | Network Connection Method, Electronic Device and Non-Transitory Readable Storage Medium | |
CN104636460A (en) | Article information pushing method and device | |
CN105144651A (en) | Application recommendations | |
CN108809815B (en) | Method for updating unread number of session, session processing method, device and system | |
CN109032465B (en) | Data processing method and device and mobile terminal | |
CN112929254B (en) | Message processing method and device and electronic equipment | |
CN108111565B (en) | Message transmission method and device | |
CN103139820A (en) | Link detection method and network elements | |
CN116546428B (en) | Paging method, device, equipment and storage medium of knapsack base station | |
CN110619698B (en) | Information prompting method and device based on Internet of things operating system | |
CN110298001B (en) | Method and device for acquiring log data packet and computer readable storage medium | |
CN111024955A (en) | Method and hand-held glucose meter for transmitting glucose measurements | |
CN106339230B (en) | Graphical interface display method and device | |
CN111770522B (en) | Method, device, terminal and storage medium for identifying data dialing abnormality | |
CN110908737A (en) | Application alignment awakening method and device, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |