CN114666404A - Method and device for sending push message and server - Google Patents

Method and device for sending push message and server Download PDF

Info

Publication number
CN114666404A
CN114666404A CN202210191836.9A CN202210191836A CN114666404A CN 114666404 A CN114666404 A CN 114666404A CN 202210191836 A CN202210191836 A CN 202210191836A CN 114666404 A CN114666404 A CN 114666404A
Authority
CN
China
Prior art keywords
push message
target
user terminal
server
information
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.)
Pending
Application number
CN202210191836.9A
Other languages
Chinese (zh)
Inventor
冯硕
徐鑫源
章宇通
韩楠
才华
章政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202210191836.9A priority Critical patent/CN114666404A/en
Publication of CN114666404A publication Critical patent/CN114666404A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method, a device and a server for sending a push message, and belongs to the technical field of internet. The method comprises the following steps: acquiring running associated information of a target application program in a user terminal; under the condition that the target application program is determined to be in a login state and to run in a foreground of the user terminal based on the running association information, establishing long connection between the first server and the user terminal; sending a target push message to the user terminal through the long link so as to enable a target application program of the user terminal to output the target push message, or displaying a target identifier associated with the target push message, wherein the target push message is as follows: pre-stored on a first server and sent by a second server associated with the target application.

Description

Method and device for sending push message and server
Technical Field
The application belongs to the technical field of internet, and particularly relates to a method, a device and a server for sending a push message.
Background
With the rapid development of electronic technology, user terminals such as smart phones and tablet computers are becoming more and more popular and becoming indispensable tools in people's daily life. The user terminal may implement various functions, such as instant chat, shopping, payment, and travel, by installing various applications.
In the process of using each application program by the user, an operator or a merchant corresponding to the application program may send a push message to the user terminal to provide notification service to the user through the push message, for example, the merchant sends a coupon push message for prompting the user to receive a coupon to the application program of the user terminal, or the operator sends an update push message for prompting the version of the application program of the user to send an update to the application function program of the user terminal, and so on. However, in the process of sending a push message of an application program, there is a problem that sending the push message is generally delayed, and thus, the real-time performance of providing a notification service to a user through the push message is reduced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a server for sending a push message, which can solve the problem of reduced real-time performance of providing a notification service to a user through a push message.
In a first aspect, an embodiment of the present application provides a method for sending a push message, which is applied to a first server, and includes:
acquiring operation associated information of a target application program in a user terminal;
under the condition that the target application program is determined to be in a login state and operates in a foreground of the user terminal based on the operation associated information, establishing long connection between the first server and the user terminal;
sending a target push message to the user terminal through the long link so that a target application program of the user terminal outputs the target push message, or displaying a target identifier associated with the target push message,
wherein the target push message is: pre-stored on the first server and sent by a second server associated with the target application.
In a second aspect, an embodiment of the present application provides a sending apparatus for pushing a message,
applied to a first server, comprising:
the system comprises a correlation information acquisition module, a correlation information acquisition module and a correlation information acquisition module, wherein the correlation information acquisition module is used for acquiring running correlation information of a target application program in a user terminal;
the long link establishing module is used for establishing long link between the first server and the user terminal under the condition that the target application program is determined to be in a login state and run in the foreground of the user terminal based on the running correlation information;
a push message sending module, configured to send a target push message to the user terminal through the long link, so that a target application of the user terminal outputs the target push message, or a target identifier associated with the target push message is displayed,
wherein the target push message is: pre-stored on the first server and sent by a second server associated with the target application.
In a third aspect, embodiments of the present application provide a server, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, the target push message is sent to the first server for storage through the second server in advance, the first server determines that the target application program is in a login state and runs in the foreground of the user terminal based on the associated running information of the target application program in the user terminal, a long link between the first server and the user terminal is established, and the target push message stored in advance is sent to the user terminal through the long link. Therefore, under the condition that the first server determines that the target application program of the user terminal is in a login state and runs in the foreground, the push message pre-stored in the first server can be continuously transmitted to the user terminal in real time through the long-chain connection, and therefore the real-time performance of providing notification service for the user through the push message is improved.
Drawings
Fig. 1 is a flowchart illustrating an embodiment of a method for sending a push message according to the present application;
fig. 2 is one of schematic diagrams of a display interface of a user terminal in an embodiment of a method for sending a push message provided by the present application;
fig. 3 is a second flowchart of an embodiment of a method for sending a push message provided in the present application;
fig. 4 is a second schematic diagram of a display interface of a user terminal in an embodiment of a method for sending a push message provided by the present application;
fig. 5 is a schematic structural diagram of an embodiment of a push message sending apparatus provided in the present application;
fig. 6 is a schematic structural diagram of an embodiment of a server provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The method for sending a push message according to the embodiments of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flow chart of a method for sending a push message according to an embodiment of the present application, where the method is applied to a first server. As shown in fig. 1, the sending method of the push message at least includes the following steps 101 to 103.
Step 101, obtaining operation associated information of a target application program in a user terminal.
102, under the condition that the target application program is determined to be in a login state and to run in the foreground of the user terminal based on the running association information, establishing a long link between the first server and the user terminal.
And 103, sending the target push message to the user terminal through the long-chain connection so that the user terminal outputs the target push message or displays a target identifier associated with the target push message.
Wherein, the target push message is: pre-stored on a first server and sent by a second server associated with the target application.
Based on the method, the target push message is sent to the first server for storage through the second server in advance, the first server establishes long-chain connection between the first server and the user terminal under the condition that the first server determines that the target application program is in a login state and runs in the foreground of the user terminal based on the associated running information of the target application program in the user terminal, and the target push message stored in advance is sent to the user terminal through the long-chain connection. Therefore, under the condition that the first server determines that the target application program of the user terminal is in a login state and runs in the foreground, the push message pre-stored in the first server can be continuously transmitted to the user terminal in real time through the long-chain connection, and therefore the real-time performance of providing notification service for the user through the push message is improved.
In step 101, the first server may obtain the operation related information of the target application in the user terminal.
In this embodiment of the present application, the obtaining of the operation related information of the target application in the user terminal may be that the first server sends a request to the user terminal, and the target user terminal feeds back the operation related information to the first server in response to the request; alternatively, the user terminal may actively transmit the operation related information to the first server.
The target application program may be any application program with a function of receiving a push message, and may be an instant chat application program, a browser or an audio/video playing application program, and the like. Specifically, the target application may be an application capable of providing a financial service function.
For example, as shown in fig. 2, the display interface of the financial service application is a display interface of the financial service application, and the display interface of the financial service application may include a plurality of function blocks, such as "home", "life", "message", "financial service", and "my", and each function block may receive an associated push message, such as in the case where the user receives bonus activity information, the "my" block may receive a push message associated with the bonus activity information.
The operation-related information may be any information that can indicate whether the target application is in a login state and whether the target application is operating in the foreground of the user terminal. Specifically, the operation related information may include a user login status indication and an operation status indication, and the operation related information may further include at least one of application version information and system information and version information of the user terminal.
It should be noted that, the obtaining, by the first server, the operation related information of the target application in the user terminal may be obtained according to a preset frequency. For example, the first server may send the request to the ue once at a preset time interval (e.g., 10 seconds, 30 seconds, or 1 minute, etc.) to request the ue to feed back the operation related information.
Alternatively, the first server may acquire the operation related information of the target application program in the user terminal, or may acquire the operation related information of the target application program in the user terminal in response to a push request sent by a second server when the first server receives the push request.
The push request may be a request for the second server to request a push message to be sent to the first server. In addition, the second server may be a server associated with the target application, and the second server may generate a push message.
For example, as shown in fig. 3, in a case where the target application is a financial service application having a display interface as shown in fig. 2, in a case where a financial service system (i.e., a second server) associated with the financial service application generates a push message (i.e., a target push message) associated with reward activity information, the financial service system may send an information acquisition request to a cloud server front-end system (also referred to as an "ARIS server") through a public cloud server (i.e., the first server includes the cloud server front-end system and a public cloud server), and the financial service application feeds back operation associated information to the cloud server front-end system through the public cloud server.
The user terminal may be one terminal, or may be a plurality of terminals. In the case that the user terminals are multiple terminals, the first server may simultaneously obtain the operation-related information of the target application program in the multiple user terminals.
In the step 102, after the first server acquires the operation related information, the first server may determine, through the operation related information, whether the target application is in a login state and operates in the foreground, and establish a long link between the first server and the user terminal when it is determined that the target application is in the login state and operates in the foreground.
It should be noted that the long link mentioned above means that a plurality of data packets can be continuously transmitted over one connection, and during the connection holding period, if no data packet is transmitted, a link detection packet needs to be transmitted in both directions. Since the implementation process for establishing a long link is well known to those skilled in the art, it is not described herein in detail.
For example, as shown in fig. 3, when the cloud server front-end system receives the operation related information sent by the financial service application program, if the cloud server front-end system determines that the financial service application program is in a login state in the user equipment and is operated in the foreground according to the operation related information, the cloud server front-end system may instruct the public cloud server to establish a long link with the user terminal.
In step 103, after the first server establishes a long link with the ue, the first server may send a pre-stored target push message to the ue.
In this embodiment of the application, after the user terminal receives the target push message sent by the first server, the user terminal may output the target push message in a target application program, or display a target identifier associated with the target push message in the target application program.
The user terminal may output the target push message in the target application program through at least one of a popup, a carousel, a message notification, and the like.
The target application program may display any mark capable of indicating the target push message, and the shape, size, color, position, and the like of the mark may be set according to actual needs.
For example, if the target application is a financial service application having a display interface as shown in fig. 2, and the first server sends a push message associated with reward activity information (i.e., a target push message) to the user terminal, the user terminal may display a red dot (indicated by a black solid dot in the drawing) in the "reward" function bar of the "my" function board to prompt that the user has received the push message associated with reward activity information through the red dot.
It should be noted that the display position of the target mark may be fixed in advance, or the display position of the target mark may be changed in transmission. Specifically, the operation related information may further include identifier display information, where the identifier display information is used to indicate a display position of the target identifier, and after the user terminal receives the target push message, the user terminal may display the target push message according to the identifier display information related to the target push message.
In this embodiment of the application, after the user terminal receives the target push message, the user terminal may cache the target push message, and after the user views the target push message, the user terminal may clear the target push message.
And under the condition that the user terminal displays the target identification associated with the target push message, if the user terminal receives the operation aiming at the target identification, the user terminal confirms that the user views the target push message.
For example, as shown in fig. 4, in the case where the user terminal receives a push message associated with bonus activity information, the user terminal may cache the push message and display a red dot in the "bonus" bar to indicate that the push message associated with bonus activity information has been received. And if the user terminal receives the clicking operation of the user on the reward function bar, the user terminal displays the push message associated with the reward activity information, and after the user exits the reward function bar, the red dots displayed in the reward function bar are cleared, and the cached push message associated with the reward activity information is cleared.
It should be noted that the target push message is a push message pre-stored in the first server, and may be a push message received and stored before the first server establishes a long link with the user terminal; alternatively, the push message may be received and stored after the first server establishes the long link with the user terminal, which is not limited herein.
The second server may send the push message to the first server, where the push message is generated by the second server, and then the push message is directly sent to the first server, and the first server receives the push message and then stores the push message.
In addition, after receiving the target push message, the user terminal may return push message delivery information to the first server, and the first server may feed back a push completion result to the second server based on the push message delivery information.
In some embodiments, the obtaining of the running association information of the target application in the user terminal includes:
and under the condition of receiving the push request sent by the second server, responding to the push request, and acquiring the running associated information of the target application program in the user terminal.
Step 102 may include:
and under the condition that the target application program is determined to be in a login state based on the operation associated information and operates in the foreground of the user terminal, acquiring and storing a target push message corresponding to the push request from the second server, and establishing long connection between the first server and the user terminal.
Based on this, the first server obtains the running associated information of the target application program in the user terminal only when receiving the push request sent by the second server, stores the target push message corresponding to the push request, and establishes the long link between the first server and the user terminal, so that the waste of the operation resources of the first server can be avoided, and the utilization rate of the operation resources of the first server can be improved.
It should be noted that, in the case that the first server determines that the target application is not in the login state based on the operation association information and/or runs in the background of the user terminal, the first server may not perform any operation.
In some embodiments, after the obtaining, in response to the push request, the running association information of the target application in the user terminal in the case of receiving the push request sent by the second server, the method further includes:
sending a query request to a second server under the condition that the target application program is determined not to be in a login state and/or to run in a background of the user terminal based on the running association information;
and receiving the target push message fed back by the second server in response to the query request, and storing the target push message.
Based on this, under the condition that the first server determines that the target application program is not in a login state and/or runs in the background of the user terminal based on the running association information, the first server may actively initiate a query request to the second server to obtain and store the target push message, so that the target push message may be obtained from the second server in time for storage, and the timeliness of notifying the user through the push message is further improved.
It should be noted that, in the case that the first server establishes the long link with the user terminal, if the first server receives the push request, the first server may obtain and store the target push message corresponding to the push request from the second server in response to the push request.
In some embodiments, obtaining and storing a targeted push message corresponding to the push request from the second server includes:
acquiring server identity information in a push request;
verifying the identity information of the server to obtain a verification result;
and under the condition that the verification result is that the verification is passed, acquiring and storing the target push message corresponding to the push request from the second server.
Based on this, the first server can check the second server according to the server identity information of the second server when acquiring the corresponding push message according to the push request, and acquire the target push message from the second server when the check is passed, thereby avoiding the server without authority from sending the push message to the first server, reducing the redundancy of the message stored by the first server, and avoiding the waste of the storage resource of the first server.
In this embodiment, the verifying the server identity information to obtain the verification result may be matching the server identity information with the preset identity information in the first server, and obtaining the verification result as passing the verification when the preset identity information matched with the server identity information is found in the first server, or else, obtaining the verification result as failing the verification.
For example, as shown in fig. 3, after the cloud server front-end system receives the push request, the cloud server front-end system may perform check interface current limiting judgment, and query a mechanism white list from the local cache in combination with the data server; verifying whether the identity information (namely the server identity information) of the financial service system is in an organization white list (namely obtaining a verification result); and under the condition that the identity information of the financial service system is in the organization white list, acquiring and storing the cid (namely the target push message) from the pipeline thread in the data server according to the identity information of the financial service system.
It should be noted that, the first server sends the target push message to the user terminal through the long link, and may be that the first server sends part or all of the push message stored in the first server to the user terminal.
In some embodiments, before sending the targeted push message to the user terminal over the long-chain connection, the method further includes:
and determining a target push message matched with the operation associated information in at least one push message prestored in the first server based on the operation associated information.
Based on this, the first server may determine, based on the operation association information, a target push message matching the operation association information from among the at least one push message stored therein, so that the push message matching the user terminal may be sent to the user terminal.
In this embodiment, the determining, based on the operation related information, a target push message matched with the operation related information in at least one push message pre-stored in the first server may be that the operation related information includes system version information of the user terminal and the like, and each push message carries the system version information, and the first user terminal determines, as the target push message, a push message carrying the same system version information as the system version information of the user terminal.
In some embodiments, the running association information includes version information of the target application in the user terminal; the at least one push message comprises a version update push message.
The determining, based on the operation related information, a target push message matching the operation related information in at least one push message pre-stored in the first server may include:
and matching the version information in the operation associated information with preset version information, and determining the version updating push message as a target push message under the condition of determining that the version information in the operation associated information is matched with the preset version information.
Based on this, the first server may determine an appropriate target push message to send to the user terminal according to the version information of the target application program.
For example, in a case where the push message stored in the first server includes a push message of version 1.0 and a push message of version 2.0, if the version of the financial service application program is version 1.0, the first server transmits only the push message of version 1.0 to the financial service application program.
In some embodiments, after sending the targeted push message to the user terminal over the long-chain connection, the method further includes:
receiving a target request sent by a user terminal, wherein the target request is a request sent by the user terminal when the user terminal receives a target push message checked by a user of the user terminal;
and responding to the target request, and generating mark information corresponding to the target push message, wherein the mark information is used for forbidding the first server to send the target push message to the user terminal.
Based on this, after the user terminal views the target push message, the target request may be sent to the first server, and the first server generates the tag information corresponding to the target push message based on the target request, so as to avoid the first server repeatedly sending the push message to the user terminal.
For example, after the user terminal receives a click operation of the user on the "reward" function bar, the user terminal may send the target request to the cloud server front-end system through the cloud server, and after the cloud server front-end system receives the target request, the cloud server front-end system marks a push message which is stored by the cloud server front-end system and is associated with reward activity information.
In some embodiments, after sending the targeted push message to the user terminal over the long-chain connection, the method further includes:
and under the condition that the preset duration is reached, if the target request is not received, re-executing to send the target push message to the user terminal through the long link.
Based on this, if the user of the user terminal does not check the push message when the preset time length is reached, that is, the first server does not receive the target request when the preset time length is reached, the first server may re-send the target push message to the user terminal, so that the user terminal can notify the user to check the push message.
In some embodiments, step 103 includes:
establishing a push event log associated with a target push message and storing the push event log;
and after the push event log is established, coding the target push message, and sending the coded target push message to the user terminal through long-chain connection.
Based on the above, in the process of sending the target push message to the user terminal, a push event log associated with the target push message can be established and stored, so as to facilitate the subsequent query of the event sending the target push message.
For example, as shown in fig. 3, the cloud server front-end system may query a public cloud task Identity (ID) in the data server according to an MD5 value of a new push message content (i.e., a target push message), and send the cloud task ID to the cloud server for storage, the cloud server returns the cloud task ID to the cloud server front-end system, the cloud server front-end system may store the push new message content MD5 as a key (key) of a key-value pair, and the cloud task ID as a value of the key-value pair in the data server, so as to establish a push event log and store the push event log; and finally, coding the new push message and setting the new push message as push message content transmission, wherein if the push message is sent in a single-user push mode, the public cloud server can send the coded push message content to a financial service application program of the user terminal according to the task arrangement of the cloud server front-end system.
In some embodiments, before sending the targeted push message to the user terminal over the long-chain connection, the method further includes:
determining display information based on the operation associated information;
sending a target push message to a user terminal through a long link, comprising:
and sending the target push message and the display information to the user terminal through the long link so that the user terminal displays the target identification associated with the target push message based on the display information.
Based on this, the first server may determine display information based on the operation association information, and send the display information and the target push message to the user terminal at the same time, so that the user terminal displays the target identifier according to the display information, thereby improving the display effect of the target terminal.
The display information may be information indicating at least one of a display position, a size, a shape, a color, and the like of the target mark.
For example, in the case that the target push message is the push message associated with the reward activity information, the display information may be position information indicating a display area corresponding to the "reward" function bar, and the like.
In some embodiments, the user terminal comprises a plurality of terminals.
The sending of the target push message to the user terminal through the long link includes:
establishing a long-linked asynchronous thread pool task;
and sending the target push message to the user terminal through the asynchronous thread pool corresponding to the asynchronous thread pool task based on the long-link asynchronous thread pool task.
Based on this, the first server can send the target push message to the plurality of terminals through the asynchronous thread pool task, so that the efficiency of sending the target push message is improved.
It should be noted that, the task of establishing the long link in the asynchronous thread pool may be that the first server establishes multiple threads associated with the long link, so as to send the target push message to multiple user terminals through the multiple threads.
For example, as shown in fig. 3, in the case that the user terminal includes a plurality of user terminals, through the multi-thread multi-user push mode, the public cloud server may send the encoded push message content to the financial service applications of the plurality of user terminals according to the cloud server front-end system task arrangement.
Fig. 5 is a schematic structural diagram of a push message sending apparatus according to an embodiment of the present application, where the push message sending apparatus is applied to the first server. As shown in fig. 5, the apparatus 500 for sending push messages includes:
a correlation information obtaining module 501, configured to obtain operation correlation information of a target application in a user terminal;
a long link establishing module 502, configured to establish a long link between the first server and the user terminal when it is determined that the target application is in a login state and is running in a foreground of the user terminal based on the running association information;
a push message sending module 503, configured to send the target push message to the user terminal through the long link, so that the target application of the user terminal outputs the target push message, or, displays a target identifier associated with the target push message,
wherein, the target push message is: pre-stored on a first server and sent by a second server associated with the target application.
In some embodiments, the information obtaining module is specifically configured to:
under the condition of receiving a push request sent by a second server, responding to the push request, and acquiring running associated information of a target application program in a user terminal;
the long link establishing module 502 is specifically configured to:
and under the condition that the target application program is determined to be in a login state based on the operation associated information and operates in the foreground of the user terminal, acquiring and storing a target push message corresponding to the push request from the second server, and establishing long connection between the first server and the user terminal.
In some embodiments, further comprising:
the query request sending module is used for sending a query request to the second server under the condition that the target application program is determined not to be in a login state and/or to run in a background of the user terminal based on the running association information;
and the push message receiving module is used for receiving the target push message fed back by the second server in response to the query request and storing the target push message.
In some embodiments, the long link establishment module 502 comprises:
the identity information acquisition unit is used for acquiring the server identity information of the second server in the push request;
the verification unit is used for verifying the server identity information to obtain a verification result;
and the first push message acquisition unit is used for acquiring and storing the target push message corresponding to the push request from the second server under the condition that the verification result is that the verification is passed.
In some embodiments, further comprising:
and the push message matching module is used for determining a target push message matched with the operation associated information in at least one push message pre-stored in the first server based on the operation associated information.
In some embodiments, the running association information includes version information of the target application in the user terminal; the at least one push message comprises a version update push message.
The push message matching module may be specifically configured to:
and matching the version information in the operation associated information with preset version information, and determining the version updating push message as a target push message under the condition of determining that the version information in the operation associated information is matched with the preset version information.
In some embodiments, further comprising:
the target request receiving module is used for receiving a target request sent by a user terminal, wherein the target request is a request sent by the user terminal when the user terminal receives a target push message checked by a user of the user terminal;
and the marking information generating module is used for responding to the target request and generating marking information corresponding to the target push message, and the marking information is used for forbidding the first server to send the target push message to the user terminal.
In some embodiments, further comprising:
and the re-execution module is used for re-executing the target push message sent to the user terminal through the long link if the target request is not received under the condition that the preset duration is reached.
In some embodiments, further comprising:
and the display information determining module is used for determining the display information based on the operation associated information.
The push message sending module 503 may be specifically configured to:
and sending the target push message and the display information to the user terminal through the long link so that the user terminal displays the target identification associated with the target push message based on the display information.
In some embodiments, the user terminal comprises a plurality of terminals.
The push message sending module 503 may include:
the task establishing unit is used for establishing a long-linked asynchronous thread pool task;
and the second push message sending unit is used for sending the target push message to the user terminal through the asynchronous thread pool corresponding to the asynchronous thread pool task based on the long-link asynchronous thread pool task.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs operations and advantageous effects have been described in detail in the embodiment related to the method, and will not be elaborated upon here.
Based on the same inventive concept, the embodiment of the present application further provides a server, which is specifically described in detail with reference to fig. 6.
Fig. 6 is a block diagram of a server according to an embodiment of the present disclosure.
As shown in fig. 6, the server 600 can implement a structure diagram of an exemplary hardware architecture of a push message sending method and a push message sending apparatus according to an embodiment of the present application. The server 600 may include a processor 601 and a memory 602 storing computer program instructions. Specifically, each processor may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
The various memories described above may include mass storage for information or instructions. By way of example, and not limitation, memory may include a Hard Disk Drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. The memory may include removable or non-removable (or fixed) media, where appropriate. The memory may be internal or external to the integrated gateway device, where appropriate. In a particular embodiment, the memory is non-volatile solid-state memory. In a particular embodiment, the memory includes read only memory (ROK). Where appropriate, the ROK may be mask-programmed ROK, Programmable ROK (PROK), Erasable PROK (EPROK), Electrically Erasable PROK (EEPROK), electrically rewritable ROK (EAROK), or flash memory, or a combination of two or more of these.
The processor 601, by reading and executing the computer program instructions stored in the memory 602, performs the following steps:
the processor 601 is used for acquiring the running associated information of the target application program in the user terminal;
under the condition that the target application program is determined to be in a login state and to run in a foreground of the user terminal based on the running association information, establishing long connection between the first server and the user terminal;
sending the target push message to the user terminal via the long link to cause a target application of the user terminal to output the target push message, or, displaying a target identifier associated with the target push message,
wherein, the target push message is: pre-stored on a first server and sent by a second server associated with the target application.
In some embodiments, the processor 601, in a case of receiving a push request sent by a second server, obtains, in response to the push request, operation association information of a target application in a user terminal;
and under the condition that the target application program is determined to be in a login state based on the operation associated information and operates in the foreground of the user terminal, acquiring and storing a target push message corresponding to the push request from the second server, and establishing long connection between the first server and the user terminal.
In some embodiments, the processor 601, in case that it is determined that the target application is not in a login state and/or is running in the background of the user terminal based on the running association information, sends the query request to the second server;
and receiving the target push message fed back by the second server in response to the query request, and storing the target push message.
In some embodiments, the processor 601 performs obtaining the server identity information of the second server in the push request;
verifying the identity information of the server to obtain a verification result;
and under the condition that the verification result is that the verification is passed, acquiring and storing the target push message corresponding to the push request from the second server.
In some embodiments, the processor 601 executes determining, based on the running association information, a target push message matching the running association information from among at least one push message prestored in the first server.
In some embodiments, the running association information includes version information of the target application in the user terminal; the at least one push message comprises a version update push message.
The processor 601 may perform matching between the version information in the operation related information and the preset version information, and determine that the version update push message is the target push message when it is determined that the version information in the operation related information is matched with the preset version information.
In some embodiments, the processor 601 executes receiving a target request sent by a user terminal, where the target request is a request sent by the user terminal when receiving a target push message viewed by a user of the user terminal;
and responding to the target request, and generating mark information corresponding to the target push message, wherein the mark information is used for forbidding the first server to send the target push message to the user terminal.
In some embodiments, the processor 601, when the preset time duration is reached, re-executes sending of the target push message to the user terminal through the long link if the target request is not received.
In some embodiments, the processor 601, performing determining display information based on the operation association information;
and sending the target push message and the display information to the user terminal through the long link so that the user terminal displays the target identification associated with the target push message based on the display information.
In some embodiments, the user terminal comprises a plurality of terminals.
A processor 601, which can execute asynchronous thread pool task for establishing long link;
and sending the target push message to the user terminal through the asynchronous thread pool corresponding to the asynchronous thread pool task based on the long-link asynchronous thread pool task.
With respect to the server 600 in the above embodiment, the specific manner in which the processor 601 performs the operations and the advantages thereof have been described in detail in the embodiment related to the method, and will not be elaborated herein.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned method for sending a push message, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
Wherein, the processor is the processor in the server described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a non-transitory computer readable storage medium such as a magnetic or optical disk.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned method for sending a push message, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing embodiment of sending a push message, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (22)

1. A method for sending a push message, which is applied to a first server, comprises the following steps:
acquiring running associated information of a target application program in a user terminal;
establishing a long link between the first server and the user terminal under the condition that the target application program is determined to be in a login state and run in the foreground of the user terminal based on the running association information;
sending a target push message to the user terminal through the long link so that a target application program of the user terminal outputs the target push message, or displaying a target identifier associated with the target push message,
wherein the target push message is: pre-stored on the first server and sent by a second server associated with the target application.
2. The method of claim 1, wherein the obtaining of the running association information of the target application in the user terminal comprises:
under the condition of receiving a push request sent by the second server, responding to the push request, and acquiring running associated information of a target application program in a user terminal;
the establishing of the long link between the first server and the user terminal under the condition that the target application program is determined to be in a login state and to run in the foreground of the user terminal based on the running association information includes:
and under the condition that the target application program is determined to be in a login state and to run in the foreground of the user terminal based on the running association information, obtaining and storing a target push message corresponding to the push request from the second server, and establishing long link between the first server and the user terminal.
3. The method according to claim 2, wherein after acquiring the running association information of the target application in the user terminal in response to the push request in case of receiving the push request sent by the second server, the method further comprises:
sending a query request to the second server under the condition that the target application program is determined not to be in a login state and/or to run in a background of the user terminal based on the running association information;
and receiving a target push message fed back by the second server in response to the query request, and storing the target push message.
4. The method of claim 2, wherein the obtaining and storing the targeted push message corresponding to the push request from the second server comprises:
obtaining server identity information of the second server in the push request;
verifying the server identity information to obtain a verification result;
and under the condition that the verification result is that the verification is passed, acquiring and storing a target push message corresponding to the push request from the second server.
5. The method of claim 1, wherein before sending the targeted push message to the user terminal over the long link, further comprising:
and determining a target push message matched with the operation associated information in at least one push message pre-stored by the first server based on the operation associated information.
6. The method according to claim 5, wherein the operation association information includes version information of the target application program in the user terminal; the at least one push message comprises a version update push message;
the determining, based on the operation association information, a target push message matching the operation association information in at least one push message pre-stored by the first server includes:
and matching the version information in the operation associated information with preset version information, and determining the version updating push message as the target push message under the condition of determining that the version information in the operation associated information is matched with the preset version information.
7. The method of claim 1, wherein after sending the targeted push message to the user terminal over the long link, further comprising:
receiving a target request sent by the user terminal, wherein the target request is a request sent by the user terminal when the user terminal receives a condition that the user terminal checks the target push message;
and responding to the target request, and generating mark information corresponding to the target push message, wherein the mark information is used for prohibiting the first server from sending the target push message to the user terminal.
8. The method of claim 1, further comprising, after sending the targeted push message to the user terminal over the long link:
and under the condition that the preset time length is reached, if the target request is not received, re-executing the target push message sent to the user terminal through the long link.
9. The method of claim 1, wherein before sending the targeted push message to the user terminal over the long link, further comprising:
determining display information based on the operation associated information;
the sending a target push message to the user terminal through the long link includes:
and sending a target push message and the display information to the user terminal through the long link so that the user terminal displays a target identifier associated with the target push message based on the display information.
10. The method of claim 1, wherein the user terminal comprises a plurality of terminals,
the sending a target push message to the user terminal through the long link includes:
establishing the asynchronous thread pool task of the long link;
and sending a target push message to the user terminal through an asynchronous thread pool corresponding to the asynchronous thread pool task based on the long-link asynchronous thread pool task.
11. A device for sending push messages, applied to a first server, comprising:
the system comprises a correlation information acquisition module, a correlation information acquisition module and a correlation information acquisition module, wherein the correlation information acquisition module is used for acquiring running correlation information of a target application program in a user terminal;
the long link establishing module is used for establishing long link between the first server and the user terminal under the condition that the target application program is determined to be in a login state and run in the foreground of the user terminal based on the running correlation information;
a push message sending module, configured to send a target push message to the user terminal through the long link, so that a target application of the user terminal outputs the target push message, or a target identifier associated with the target push message is displayed,
wherein the target push message is: pre-stored on the first server and sent by a second server associated with the target application.
12. The apparatus of claim 11, wherein the information obtaining module is specifically configured to:
under the condition of receiving a push request sent by the second server, responding to the push request, and acquiring operation associated information of a target application program in a user terminal;
the long link establishing module is specifically configured to:
and under the condition that the target application program is determined to be in a login state and to run in the foreground of the user terminal based on the running association information, obtaining and storing a target push message corresponding to the push request from the second server, and establishing long link between the first server and the user terminal.
13. The apparatus of claim 12, further comprising:
the query request sending module is used for sending a query request to the second server under the condition that the target application program is determined not to be in a login state and/or to run in a background of the user terminal based on the running correlation information;
and the push message receiving module is used for receiving the target push message fed back by the second server in response to the query request and storing the target push message.
14. The apparatus of claim 12, wherein the long link establishing module comprises:
an identity information obtaining unit, configured to obtain server identity information of the second server in the push request;
the verification unit is used for verifying the server identity information to obtain a verification result;
and the first push message acquisition unit is used for acquiring and storing the target push message corresponding to the push request from the second server under the condition that the verification result is that the verification is passed.
15. The apparatus of claim 11, further comprising:
and the push message matching module is used for determining a target push message matched with the operation associated information in at least one push message prestored by the first server based on the operation associated information.
16. The apparatus according to claim 15, wherein the operation related information includes version information of the target application in the user terminal; the at least one push message comprises a version update push message;
the push message matching module is specifically configured to:
and matching the version information in the operation associated information with preset version information, and determining the version updating push message as the target push message under the condition of determining that the version information in the operation associated information is matched with the preset version information.
17. The apparatus of claim 11, further comprising:
a target request receiving module, configured to receive a target request sent by the user terminal, where the target request is a request sent by the user terminal when the user terminal receives a request sent by the user terminal when viewing the target push message;
a tag information generating module, configured to generate, in response to the target request, tag information corresponding to the target push message, where the tag information is used to prohibit the first server from sending the target push message to the user terminal.
18. The apparatus of claim 11, further comprising:
and the re-execution module is used for re-executing the target push message sent to the user terminal through the long link if the target request is not received under the condition that the preset time length is reached.
19. The apparatus of claim 11, further comprising:
the display information determining module is used for determining display information based on the operation associated information;
the push message sending module is specifically configured to:
and sending a target push message and the display information to the user terminal through the long link so that the user terminal displays a target identifier associated with the target push message based on the display information.
20. The apparatus of claim 11, wherein the user terminal comprises a plurality of terminals,
the push message sending module comprises:
the task establishing unit is used for establishing the asynchronous thread pool task of the long link;
and the second push message sending unit is used for sending the target push message to the user terminal through the asynchronous thread pool corresponding to the asynchronous thread pool task based on the long-chained asynchronous thread pool task.
21. A server, characterized by comprising a processor and a memory, said memory storing a program or instructions executable on said processor, said program or instructions, when executed by said processor, implementing the steps of the method of push message transmission according to any of claims 1-10.
22. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method of sending a push message according to any one of claims 1-10.
CN202210191836.9A 2022-02-28 2022-02-28 Method and device for sending push message and server Pending CN114666404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210191836.9A CN114666404A (en) 2022-02-28 2022-02-28 Method and device for sending push message and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210191836.9A CN114666404A (en) 2022-02-28 2022-02-28 Method and device for sending push message and server

Publications (1)

Publication Number Publication Date
CN114666404A true CN114666404A (en) 2022-06-24

Family

ID=82027208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210191836.9A Pending CN114666404A (en) 2022-02-28 2022-02-28 Method and device for sending push message and server

Country Status (1)

Country Link
CN (1) CN114666404A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300162A1 (en) * 2005-05-27 2009-12-03 Maria Lorenza Demarie System and method for performing mobile services, in particular push services in a wireless communication
CN105791352A (en) * 2014-12-24 2016-07-20 深圳市腾讯计算机系统有限公司 Message pushing method and system for application
CN107578234A (en) * 2017-09-01 2018-01-12 泰康保险集团股份有限公司 Method of payment, payment mechanism, medium and electronic equipment
CN107872528A (en) * 2017-11-21 2018-04-03 口碑(上海)信息技术有限公司 Information push method and device
CN109218370A (en) * 2017-07-06 2019-01-15 北京嘀嘀无限科技发展有限公司 Message method and device, electronic equipment
CN109428921A (en) * 2017-08-28 2019-03-05 北京嘀嘀无限科技发展有限公司 Information push method and device
CN110134869A (en) * 2019-05-16 2019-08-16 苏州达家迎信息技术有限公司 A kind of information-pushing method, device, equipment and storage medium
CN111049732A (en) * 2019-12-06 2020-04-21 北京达佳互联信息技术有限公司 Push message display method and device, electronic equipment and medium
CN111176809A (en) * 2019-12-18 2020-05-19 任子行网络技术股份有限公司 Application keep-alive processing method and system containing long-connection communication process under android platform
CN112492020A (en) * 2020-11-24 2021-03-12 杭州萤石软件有限公司 Message pushing method, system, device and storage medium
CN114116267A (en) * 2021-09-10 2022-03-01 武汉武钢绿色城市技术发展有限公司 Method for APP awakening and non-sensing login to H5 page directly

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300162A1 (en) * 2005-05-27 2009-12-03 Maria Lorenza Demarie System and method for performing mobile services, in particular push services in a wireless communication
CN105791352A (en) * 2014-12-24 2016-07-20 深圳市腾讯计算机系统有限公司 Message pushing method and system for application
CN109218370A (en) * 2017-07-06 2019-01-15 北京嘀嘀无限科技发展有限公司 Message method and device, electronic equipment
CN109428921A (en) * 2017-08-28 2019-03-05 北京嘀嘀无限科技发展有限公司 Information push method and device
CN107578234A (en) * 2017-09-01 2018-01-12 泰康保险集团股份有限公司 Method of payment, payment mechanism, medium and electronic equipment
CN107872528A (en) * 2017-11-21 2018-04-03 口碑(上海)信息技术有限公司 Information push method and device
CN110134869A (en) * 2019-05-16 2019-08-16 苏州达家迎信息技术有限公司 A kind of information-pushing method, device, equipment and storage medium
CN111049732A (en) * 2019-12-06 2020-04-21 北京达佳互联信息技术有限公司 Push message display method and device, electronic equipment and medium
CN111176809A (en) * 2019-12-18 2020-05-19 任子行网络技术股份有限公司 Application keep-alive processing method and system containing long-connection communication process under android platform
CN112492020A (en) * 2020-11-24 2021-03-12 杭州萤石软件有限公司 Message pushing method, system, device and storage medium
CN114116267A (en) * 2021-09-10 2022-03-01 武汉武钢绿色城市技术发展有限公司 Method for APP awakening and non-sensing login to H5 page directly

Similar Documents

Publication Publication Date Title
CN110392054B (en) Login verification method, device, system, equipment and readable storage medium
TWI530882B (en) Information push method, server, user terminal, and system
US10834031B2 (en) Information exchange method, client, and apparatus
US20170329565A1 (en) Information processing method, client, server, and computer-readable storage medium
WO2019019645A1 (en) Method and apparatus for executing information pushing task, and computer device and storage medium
CN105577602A (en) Data pushing method and data pushing device based on open application programming interface
CN107948328B (en) Information pushing method and device and electronic equipment
CN109615443B (en) User processing method, device, server and storage medium based on block chain
CN111294288A (en) Traffic identification method and device, application program interface gateway and storage medium
CN111641554B (en) Message processing method and device and computer readable storage medium
CN104050204A (en) Method of combining network data and mobile device using the same
CN105664490A (en) Method and system for realizing game interaction
CN114666404A (en) Method and device for sending push message and server
CN108989404B (en) Barrage message issuing method, server, system and storage medium
CN110620672B (en) Multi-person session data processing method and device, computer equipment and storage medium
CN110751464A (en) Information prompting method, device, equipment and storage medium
US10506021B2 (en) Method and device for providing communication connection for a plurality of candidate applications in a mobile device
CN111538899B (en) Resource information pushing method, equipment side and server side
CN110995706B (en) Authentication system, method, device and storage medium for communication application
CN109150696B (en) Information processing method, server, client, and computer-readable storage medium
CN114270389A (en) Information acquisition method, device, system, electronic equipment and storage medium
CN113283264B (en) Identification code sharing method and device
CN112637038B (en) Method and device for associating instant messaging application with mailbox
CN112202701B (en) Data processing method, device, server, terminal, system and storage medium
CN114531484B (en) Message pushing method, device and system

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