CN112492020B - Message pushing method, system, equipment and storage medium - Google Patents

Message pushing method, system, equipment and storage medium Download PDF

Info

Publication number
CN112492020B
CN112492020B CN202011331896.3A CN202011331896A CN112492020B CN 112492020 B CN112492020 B CN 112492020B CN 202011331896 A CN202011331896 A CN 202011331896A CN 112492020 B CN112492020 B CN 112492020B
Authority
CN
China
Prior art keywords
server
long link
terminal equipment
message
pushed
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
Application number
CN202011331896.3A
Other languages
Chinese (zh)
Other versions
CN112492020A (en
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.)
Hangzhou Ezviz Software Co Ltd
Original Assignee
Hangzhou Ezviz Software 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 Hangzhou Ezviz Software Co Ltd filed Critical Hangzhou Ezviz Software Co Ltd
Priority to CN202011331896.3A priority Critical patent/CN112492020B/en
Publication of CN112492020A publication Critical patent/CN112492020A/en
Application granted granted Critical
Publication of CN112492020B publication Critical patent/CN112492020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a message pushing method, a system, equipment and a storage medium. The method comprises the following steps: the method comprises the steps that a first server obtains a message to be pushed of a target application program APP of terminal equipment; if the first long link between the first server and the terminal equipment is in a connection state, the first server sends a message to be pushed to the terminal equipment through the first long link; if the first long link is in the unconnected state, the first server sends a message to be pushed to the second server. According to the embodiment of the application, the second server is a server of a terminal equipment manufacturer, the manufacturer push service is a push service of a system level provided by the manufacturer of the terminal equipment, and when a long link between the terminal equipment and the APP server is in a non-connection state, the second server can push messages to the terminal equipment, so that the reliability of message pushing is improved.

Description

Message pushing method, system, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a message pushing method, a system, equipment and a storage medium.
Background
With the rapid development of the mobile internet, a message push function is increasingly important in APPlication programs (APPs) of terminal devices. The message pushing function plays an important role in improving the activity of products and improving the viscosity of users.
In the related art, a message is pushed to an APP through a long link between a terminal device and an APP server, and when the process of the APP is turned off, the long link between the terminal device and the APP server is disconnected, so that the APP cannot receive the pushed message. Therefore, how to improve the reliability of push messages is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a message pushing method, a system, equipment and a storage medium, so as to improve the reliability of pushing messages.
In a first aspect, an embodiment of the present application provides a message pushing method, including:
the method comprises the steps that a first server obtains a message to be pushed of a target application program APP of terminal equipment;
if the first long link between the first server and the terminal equipment is in a connection state, the first server sends the message to be pushed to the terminal equipment through the first long link;
if the first long link is in the non-connection state, the first server sends the message to be pushed to a second server, so that the second server sends the message to be pushed to the terminal equipment.
In a second aspect, an embodiment of the present application provides a message pushing method, including:
if a first long link between the terminal equipment and the first server is in a connection state, the terminal equipment acquires a message to be pushed of a target application program APP sent by the first server through the first long link;
and if the first long link is in a non-connection state, the terminal equipment acquires a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal equipment.
In a third aspect, an embodiment of the present application provides a message pushing device, including:
the acquisition module is used for acquiring a message to be pushed of a target application program APP of the terminal equipment;
a sending module, configured to send the message to be pushed to the terminal device through the first long link if it is determined that the first long link between the first server and the terminal device is in a connection state;
the sending module is further configured to send the message to be pushed to a second server if it is determined that the first long link is in a non-connection state, so that the second server sends the message to be pushed to the terminal device.
In a fourth aspect, an embodiment of the present application provides a message pushing device, including:
the acquisition module is used for acquiring a message to be pushed of a target application program APP sent by the first server through the first long link if the first long link between the terminal equipment and the first server is in a connection state;
the acquisition module is further configured to, if the first long link is in a non-connection state, acquire, by the terminal device, a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal device.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the first aspects.
In a sixth aspect, embodiments of the present application provide a first server, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of the first aspects via execution of the executable instructions.
In a seventh aspect, an embodiment of the present application provides a terminal device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of the second aspects via execution of the executable instructions.
In an eighth aspect, an embodiment of the present application provides a message pushing system, including:
the system comprises terminal equipment, a first server and a second server;
the first server is used for acquiring a message to be pushed of a target application program APP of the terminal equipment; if the first long link between the first server and the terminal equipment is in a connection state, sending the message to be pushed to the terminal equipment through the first long link; if the first long link is determined to be in a non-connection state, sending the message to be pushed to a second server, so that the second server sends the message to be pushed to the terminal equipment;
the terminal equipment is used for acquiring a message to be pushed of a target APP sent by the first server through the first long link if the first long link is in a connection state; and if the first long link is in a non-connection state, acquiring a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal equipment.
According to the message pushing method, system, device and storage medium, when a first long link between a first server and terminal equipment is in a connection state, a message to be pushed is sent to the terminal equipment through the first long link; and when the first long link is in a non-connection state, sending the message to be pushed to a second server, and sending the message to be pushed through the second server. In the scheme, when the first long link is in the connection state, the message to be pushed is sent through the first long link, and when the first long link is in the non-connection state, the message to be pushed is sent through the second server, and no matter whether the first long link is in the connection state or not, the message can be pushed, so that the reliability of the message pushing is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram of a system architecture provided in an embodiment of the present application;
fig. 2 is a flow chart of a message pushing method according to an embodiment of the present application;
fig. 3 is an interface schematic diagram of a terminal device according to an embodiment of the present application;
fig. 4 is an interactive flow diagram of a message pushing method according to an embodiment of the present application;
fig. 5 is a flow chart of a message pushing method according to another embodiment of the present application;
FIG. 6 is a schematic diagram of an initialization push principle according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a pushing principle of a verification manufacturer according to an embodiment of the present application;
FIG. 8 is a schematic diagram of device interaction provided by an embodiment of the present application;
fig. 9 is a flowchart of a message pushing method according to another embodiment of the present application;
FIG. 10 is a schematic diagram of a message pushing device according to an embodiment of the present disclosure;
FIG. 11 is a schematic structural diagram of a message pushing device according to another embodiment of the present application;
fig. 12 is a schematic structural diagram of a first server according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 14 is a schematic structural diagram of a second server according to an embodiment of the present application.
Specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
First, a description is given of a part of vocabulary and an application scenario according to an embodiment of the present application.
A long link means that multiple packets can be sent consecutively over one connection, which long link is maintained through heartbeat packets.
Vendor push service refers to a push service at a system level provided by a vendor of a terminal device. The message can be pushed to the terminal equipment no matter whether the process of the APP is closed or not.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application. As shown in fig. 1, the system architecture of the embodiment of the present application may include, but is not limited to: a terminal device 11, a first server 12 and a second server. The terminal device includes, for example: user equipment such as cell phones, tablet computers, wearable equipment and the like.
Wherein the terminal device 11 and the first server 12 and the second server 13 can be connected through a network respectively. The first server 12 and the second server 13 may be connected via a network.
The first server may be a server corresponding to the application program APP in the terminal device, and the second server may be a server of a vendor to which the terminal device belongs.
In the related art, a message is pushed to an APP through a long link between a terminal device and an APP server, and when the process of the APP is turned off, the long link between the terminal device and the APP server is disconnected, so that the APP cannot receive the pushed message. Therefore, how to improve the reliability of push messages is a technical problem that needs to be solved by those skilled in the art.
According to the method, when a first long link between a first server and terminal equipment is in a connection state, a message to be pushed is sent to the terminal equipment through the first long link; and when the first long link is in a non-connection state, sending the message to be pushed to a second server, and sending the message to be pushed through the second server. Because the second server is a server of a terminal equipment manufacturer, push messages are sent to the terminal equipment through manufacturer push services, and the manufacturer push services are push services of a system level provided by the manufacturer of the terminal equipment, and can push messages no matter whether the process of the APP is closed or not, namely, when a long link between the terminal equipment and the APP server is in a non-connection state, the second server can push messages to the terminal equipment.
The technical scheme of the present application is described in detail below with specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a flow chart of a message pushing method according to an embodiment of the present application. As shown in fig. 2, the method provided in this embodiment includes:
step 101, a first server acquires a message to be pushed of a target application program APP of a terminal device.
Specifically, the first server may be a server corresponding to the target APP, and when the first server receives the message indicating that the message needs to be pushed to a certain terminal device, the first server obtains a message to be pushed of the target APP of the terminal device.
For example, the target APP is a news APP, the message to be pushed is, for example, a news push message generated according to the browsing habit of the user, the target APP is a shopping APP, and the message to be pushed is, for example, a push message generated according to the purchasing habit of the user and used for recommending goods.
For example, the internet of things device triggers an alarm, and generates a message to be pushed, namely alarm information.
As shown in fig. 3, after receiving the message to be pushed, the terminal device displays the message to be pushed on an interface of the terminal device.
Step 102, if it is determined that the first long link between the first server and the terminal device is in a connection state, the first server sends a message to be pushed to the terminal device through the first long link.
Specifically, in order to push a message, a first long link is provided between a first server and a terminal device, when a process of the target APP in the terminal device is started, the first long link is in a connection state, and if the process of the target APP is closed, the first long link is in a non-connection state.
As shown in fig. 4, if it is determined that the first server is in a connection state with the first long link of the terminal device, the first server may send a message to be pushed to the terminal device through the first long link.
Step 103, if the first long link is determined to be in the non-connection state, the first server sends the message to be pushed to the second server, so that the second server sends the message to be pushed to the terminal device.
Specifically, as shown in fig. 4, when the first long link is in the non-connection state, the first server cannot send the message to be pushed to the terminal device through the first long link. Thus, the first server may send the message to be pushed to the second server, and to the terminal device through the second server.
The second server may be a server of a manufacturer to which the terminal device belongs, a second long link is provided between the terminal device and the second server, the second long link is not required to be opened by a process of the target APP, and only the target APP is required to be registered in the second server, that is, after the second long link is established, no matter whether the APP process is opened or not, the second long link is in a connection state.
For example, when the user uses the target APP, the user account is logged in and the second long link is registered.
In the embodiment of the present application, the first server maintains two long links for the account logged in by the same terminal device. One is a first long link between the terminal device and the first server and one is a second long link between the terminal device and the vendor's second server (vendor's corresponding second long link also needs to be controlled by the first server because the originator of the final push message is the first server).
The first long link requires the terminal device and the APP server (i.e., the first server) to be maintained, while vendor push services are maintained through vendor servers and terminal devices. When the APP server finds that the first long link and the second long link of the manufacturer push service are connected successfully at the same time, the first long link can be preferentially utilized for pushing. When the first long link is disconnected, switching to a manufacturer push service to push the message.
In the method of the embodiment, when a first long link between a first server and a terminal device is in a connection state, a message to be pushed is sent to the terminal device through the first long link; and when the first long link is in a non-connection state, sending the message to be pushed to a second server, and sending the message to be pushed through the second server. In the scheme, when the first long link is in the connection state, the message to be pushed is sent through the first long link, and when the first long link is in the non-connection state, the message to be pushed is sent through the second server, and no matter whether the first long link is in the connection state or not, the message can be pushed, so that the reliability of the message pushing is improved.
Based on the above embodiment, before step 102, the method further includes:
it is determined whether the first long link is in a connected state.
In an embodiment, "determining whether the first long link is in a connected state" may be implemented by:
and if the first server receives the heartbeat packet sent by the terminal equipment within the preset time, the first server determines that the first long link is in a connection state.
In an embodiment, "determining that the first long link is in the disconnected state" may be achieved by:
if the first server receives a connection disconnection indication message sent by the terminal equipment, the first server determines that the first long link is in a non-connection state; or alternatively, the first and second heat exchangers may be,
if the first server does not receive the heartbeat packet sent by the terminal device within a preset duration, the first server determines that the first long link is in a non-connection state.
Specifically, when the terminal device logs in the target APP, connection is established with the APP server (i.e., the first server), after connection is established, in order to maintain the long link, the terminal device may send a heartbeat packet at regular time, and if the first server receives the heartbeat packet sent by the terminal device within a preset duration, the first server determines that the first long link is in a connection state.
And if the first server does not receive the heartbeat packet sent by the terminal equipment within the preset duration, the first server determines that the first long link is in a non-connection state.
Or after the connection is established, when the process of the terminal equipment is closed, the terminal equipment sends a connection disconnection indication message to the first server, and the first server determines that the first long link is in a non-connection state after receiving the connection disconnection indication message.
In one embodiment, as shown in fig. 4, the method further comprises:
the first server establishes the first long link.
The first server establishes the first long link, which can be specifically realized by the following steps:
the first server establishes the first long link according to a first request sent by the terminal equipment, and sends the identification of the first long link to the terminal equipment.
Specifically, when the user uses the target APP and logs in to the account, the terminal device sends a first request to the first server, where the first request is used to request to establish a first long link between the terminal device and the first server.
The first server establishes the first long link, allocates an identifier as the identifier of the first long link corresponding to the terminal equipment, and sends the identifier to the terminal equipment.
The first server carries the identifier of the first long link when pushing the message to the terminal equipment, and the terminal equipment can determine which APP corresponds to the pushed message.
In the above embodiment, the first long link is established before the message is pushed, and it is required to detect whether the first long link is in a connection state or not when the message is pushed, when the first long link is in a connection state, the message to be pushed is sent through the first long link, and when the first long link is in a non-connection state, the message to be pushed is sent through the second server, and no matter whether the first long link is in a connection state or not, the message can be pushed, so that the reliability of the message to be pushed is improved.
In one embodiment, step 103 may be implemented as follows:
the first server obtains the identification of a second long link between the terminal equipment and the second server;
and the first server sends the message to be pushed and the identification of the second long link to the second server.
Specifically, as shown in fig. 4, when the user uses the target APP and logs in to the account, the terminal device sends a second request to the second server, where the second request is used to request to establish a second long link between the terminal device and the second server. The second server establishes the second long link, allocates an identifier as the identifier of the second long link corresponding to the terminal device, and sends the identifier to the terminal device.
The first server obtains the identity of the second long link between the terminal device and the second server from the terminal device. When the first server pushes the message to the terminal equipment through the second server, the second server needs to inform which terminal equipment the message is pushed to, and the message can be realized by informing the identifier of the second long link corresponding to the terminal equipment.
Therefore, the first server carries the identifier of the second long link when sending the message to be pushed to the second server, so that the second server pushes the message to the terminal equipment through the second long link.
In the above embodiment, the second long link is established before the message is pushed, when the first long link is in the connection state, the message to be pushed is sent through the first long link, and when the first long link is in the non-connection state, the message to be pushed is sent through the second server, and no matter whether the first long link is in the connection state or not, the message can be pushed, so that the reliability of the message pushing is improved.
Fig. 5 is a flow chart of a message pushing method according to another embodiment of the present application. As shown in fig. 5, the method provided in this embodiment includes:
step 201, if a first long link between a terminal device and a first server is in a connection state, the terminal device obtains a message to be pushed of a target application APP sent by the first server through the first long link.
Step 202, if the first long link is in a non-connection state, the terminal device obtains a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal device.
Specifically, when the target APP is in an operating state, the terminal device continuously maintains a first long link with the APP server (i.e., the first server). Since the first long chain is maintained through the heartbeat packet, the first long link will always be in a connected state as long as the APP is still in progress.
When the APP process is killed by the system, i.e. the process is closed, then the terminal device cannot continue to maintain the first long link with the APP server, and the first long link is automatically disconnected. The server side receives the indication message of the long link disconnection.
Because the manufacturer pushes the server only needs APP registration, the APP is not required to maintain a corresponding long link. For APP, when APP process is killed off, the first long link cannot be maintained, and then APP server end can be automatically switched to the second long link of the second server of manufacturer to push.
In one embodiment, as shown in fig. 4, the method further comprises:
the terminal equipment sends a first request to the first server, wherein the first request is used for requesting to establish a first long link with the first server;
and the terminal equipment acquires the identification of the first long link returned by the first server.
As shown in fig. 6, a first long link between the terminal device and the first server is established, that is, the first long link is initialized, and if the first long link fails, a retry is performed.
In one embodiment, the method further comprises:
if the target APP is restarted, the terminal equipment determines whether the APP is in a login state;
if yes, resending the first request.
Specifically, when the target APP is restarted, the APP may determine whether the current scenario is a login state, and if so, re-rebuild the first long link to the first server, that is, send a first request to the first server for requesting to establish the first long link.
In the above embodiment, after the target APP restarts, the first long link is in a non-connection state, and the first long link needs to be re-established when pushing the message.
In one embodiment, the method further comprises:
the terminal equipment sends a second request to the second server, wherein the second request is used for requesting to establish a second long link with the first server;
and the terminal equipment acquires the identifier of the second long link returned by the second server.
In an embodiment, the step of "the terminal device sends the second request to the second server" may be implemented by:
the terminal equipment determines vendor push services supported by the terminal equipment;
and the terminal equipment sends the second request to a second server corresponding to the manufacturer push service.
As shown in fig. 6, the terminal device determines the supported vendor push service, and sends the second request to a second server corresponding to the vendor push service, establishes a second long link between the terminal device and the second server, initializes the second long link, for example, initializes the vendor 1 push service, and retries if it fails.
In an embodiment, the "the terminal device determines the vendor push service supported by the terminal device" may be specifically implemented by the following manner:
the terminal equipment determines the system type of the terminal equipment and the manufacturer to which the terminal equipment belongs;
and the terminal equipment determines the vendor push service supported by the terminal equipment according to the system type of the terminal equipment and the vendor to which the terminal equipment belongs.
Specifically, before initializing the vendor push service, as shown in fig. 6, it is required to verify vendor push, that is, determine the vendor push service supported by the terminal device, as shown in fig. 7, first determine the system type of the terminal device, and if the system type is an IOS system, determine that the vendor push service supported by the terminal device is an apple push notification service (Apple Push Notification service, APNS).
If the system type is android system, determining that the system of the terminal equipment is domestic or overseas, and if the system is overseas, determining that vendor push services supported by the terminal equipment are (Firebase Cloud Messaging, FCM) push.
If yes, determining the manufacturer to which the terminal equipment belongs, and accordingly determining the manufacturer push service supported by the terminal equipment.
In the method of the embodiment, when a first long link between a first server and a terminal device is in a connection state, a message to be pushed is sent to the terminal device through the first long link; and when the first long link is in a non-connection state, sending the message to be pushed to a second server, and sending the message to be pushed through the second server. Because the second server is a server of a terminal equipment manufacturer, the push message is sent to the terminal equipment through manufacturer push service, and the manufacturer push service is a push service of a system level provided by the manufacturer of the terminal equipment, and can push the message no matter whether the process of the APP is closed or not, namely, when a long link between the terminal equipment and the APP server is in a non-connection state, the second server can also push the message to the terminal equipment, so that the reliability of the push message is improved.
In an embodiment, a terminal device includes: the application program APP and the SDK comprise interfaces, and a process for establishing long links and a message pushing process are described in combination with the processes shown in fig. 6, 7 and 8:
for a first long link of the terminal device with the first server:
the terminal equipment calls an interface in the SDK to initiate a registration request to the first server, the first long link between the terminal equipment and the first server is requested to be established, after the establishment is successful, registration completion indication information is returned to the interface in the SDK, and if the registration completion indication information fails, retry is carried out.
For a second long link of the terminal device with the second server:
the terminal equipment calls an interface in the SDK to determine a target manufacturer to which the terminal equipment belongs, initiates a registration request to a second server of the target manufacturer, requests to establish a second long link between the terminal equipment and the second server, returns registration completion indication information to the interface in the SDK after the second server is successfully established, returns an identifier of the second long link, the SDK transmits the identifier of the second long link to the APP, and the terminal equipment transmits the identifier of the second long link to the first server; if the second server of the target manufacturer is not found, ending.
Message pushing process:
the alarm trigger triggers an alarm to generate a message to be pushed, and if the first long link is in a connection state, the first server sends the message to be pushed to the SDK, and the SDK sends the message to be pushed to the terminal equipment; if the first long link is in a non-connection state, the first server sends the message to be pushed to the second server, the second server sends the message to be pushed to the SDK, and the SDK sends the message to be pushed to the terminal equipment.
Fig. 9 is a flowchart of a message pushing method according to another embodiment of the present application. As shown in fig. 9, the method provided in this embodiment includes:
step 301, a second server receives a message to be pushed of a target APP sent by a first server, where the message to be pushed is sent when a first long link between the first server and a terminal device is in a non-connection state;
step 302, the second server sends the message to be pushed to the terminal device through the second long link.
In an embodiment, the second server receives a second request sent by the terminal device, and is used for requesting to establish a second long link between the second server and the terminal device;
and the second server sends the identification of the second long link to the terminal equipment.
The method of this embodiment, similar to the foregoing methods of the first server side and the terminal device side, implements similar principles and technical effects, and is not described herein again.
Fig. 10 is a schematic structural diagram of a message pushing device provided in an embodiment of the present application, as shown in fig. 10, where the message pushing device in this embodiment includes:
an obtaining module 110, configured to obtain a message to be pushed of a target application APP of a terminal device;
a sending module 111, configured to send the message to be pushed to the terminal device through the first long link if it is determined that the first long link between the first server and the terminal device is in a connection state;
the sending module 111 is further configured to send the message to be pushed to a second server if it is determined that the first long link is in a non-connection state, so that the second server sends the message to be pushed to the terminal device.
The device of the present embodiment may be used to execute the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 11 is a schematic structural diagram of a message pushing device according to another embodiment of the present application, as shown in fig. 11, where the message pushing device in this embodiment includes:
the obtaining module 120 is configured to obtain, by using the terminal device, a message to be pushed of the target application APP sent by the first server, if the first long link between the terminal device and the first server is in a connection state;
the obtaining module 120 is further configured to obtain, by the terminal device, a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal device if the first long link is in a non-connection state.
The device of the present embodiment may be used to execute the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The embodiment of the application also provides a message pushing system, which comprises:
the system comprises terminal equipment, a first server and a second server;
the first server is used for acquiring a message to be pushed of a target application program APP of the terminal equipment; if the first long link between the first server and the terminal equipment is in a connection state, sending the message to be pushed to the terminal equipment through the first long link; if the first long link is determined to be in a non-connection state, sending the message to be pushed to a second server, so that the second server sends the message to be pushed to the terminal equipment;
the terminal equipment is used for acquiring a message to be pushed of a target APP sent by the first server through the first long link if the first long link is in a connection state; and if the first long link is in a non-connection state, acquiring a message to be pushed of the target APP sent by the second server through a second long link between the second server and the terminal equipment.
The system of the present embodiment may be used to execute the technical solutions of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 12 is a schematic structural diagram of a first server according to an embodiment of the present application, as shown in fig. 12, where the first server includes:
a processor 210, and a memory 211 for storing executable instructions of the processor 210.
Optionally, the method may further include: communication interface 212 is used to enable communication with other devices.
The components may communicate via one or more buses.
The processor 210 is configured to execute the corresponding method in the foregoing method embodiment by executing the executable instruction, and the specific implementation process may refer to the foregoing method embodiment and will not be described herein.
Fig. 13 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, as shown in fig. 13, where the terminal device includes:
a processor 220, and a memory 221 for storing executable instructions of the processor 220.
Optionally, the method may further include: communication interface 222 is used to enable communication with other devices.
Optionally, the method may further include: and the display is used for displaying the received push message of the target APP.
The components may communicate via one or more buses.
The processor 220 is configured to execute the corresponding method in the foregoing method embodiment by executing the executable instruction, and the specific implementation process may refer to the foregoing method embodiment and will not be described herein.
Fig. 14 is a schematic structural diagram of a second server according to an embodiment of the present application, as shown in fig. 14, where the second server includes:
a processor 230, and a memory 231 for storing executable instructions of the processor 230.
Optionally, the method may further include: communication interface 232 for enabling communication with other devices.
The components may communicate via one or more buses.
The processor 230 is configured to execute the corresponding method in the foregoing method embodiment by executing the executable instruction, and the specific implementation process may be referred to the foregoing method embodiment and will not be described herein.
The embodiment of the application further provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements a method corresponding to the foregoing method embodiment, and a specific implementation process of the computer program may refer to the foregoing method embodiment, and its implementation principle and technical effect are similar, and are not repeated herein.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A message pushing method, comprising:
the method comprises the steps that a first server obtains a message to be pushed of a target application program APP of terminal equipment;
if the first long link between the first server and the terminal equipment is in a connection state, the first server sends the message to be pushed to the terminal equipment through the first long link;
if the first long link is determined to be in a non-connection state, then
The first server obtains the identification of a second long link between the terminal equipment and a second server;
the first server sends the message to be pushed and the identifier of the second long link to the second server so that the second server sends the message to be pushed to the terminal equipment;
after the first server sends the message to be pushed to the terminal equipment through the first long link, if the first long link is disconnected, switching to send the message to be pushed to the terminal equipment through the second server;
before the first server obtains the identifier of the second long link between the terminal device and the second server, the method further comprises:
the first server receives the identifier of the second long link sent by the terminal equipment, wherein the identifier of the second long link is a second request sent by the terminal equipment to the second server when a user uses the target APP and logs in an account, and the second server establishes the second long link and then distributes the second request to the terminal equipment.
2. The method of claim 1, wherein the determining that the first long link between the first server and the terminal device is in a connected state comprises:
and if the first server receives the heartbeat packet sent by the terminal equipment within the preset time, the first server determines that the first long link is in a connection state.
3. The method of claim 1 or 2, wherein the determining that the first long link is in a non-connected state comprises:
if the first server receives a connection disconnection indication message sent by the terminal equipment, the first server determines that the first long link is in a non-connection state; or alternatively, the first and second heat exchangers may be,
if the first server does not receive the heartbeat packet sent by the terminal device within a preset duration, the first server determines that the first long link is in a non-connection state.
4. A method according to claim 3, wherein before the first server receives the connection disconnection indication message sent by the terminal device, the method further comprises:
the first server establishes the first long link.
5. The method of claim 4, wherein the first server establishing the first long link comprises:
the first server establishes the first long link according to a first request sent by the terminal equipment, and sends the identification of the first long link to the terminal equipment.
6. A message pushing method, comprising:
if a first long link between a terminal device and a first server is in a connection state, the terminal device acquires a message to be pushed of a target application program APP sent by the first server through the first long link;
if the first long link is in a non-connection state, the terminal equipment acquires a message to be pushed of a target APP sent by a second server through a second long link between the second server and the terminal equipment;
before the terminal equipment obtains the message to be pushed of the target APP sent by the second server through the second long link between the second server and the terminal equipment, the method further comprises the following steps:
the terminal equipment sends the identification of the second long link to the first server;
after the terminal equipment obtains a message to be pushed of a target application program APP sent by the first server through the first long link, if the first long link is disconnected, the terminal equipment is switched to obtain the message to be pushed sent by the second server through a second long link between the second server and the terminal equipment;
before the terminal device sends the identifier of the second long link to the first server, the method further includes:
the terminal equipment sends a second request to the second server, wherein the second request is used for requesting to establish a second long link with the second server;
and the terminal equipment acquires the identifier of the second long link returned by the second server.
7. The method according to claim 6, wherein before the terminal device obtains the message to be pushed of the target application APP sent by the first server through the first long link, the method further comprises:
the terminal equipment sends a first request to the first server, wherein the first request is used for requesting to establish a first long link with the first server;
and the terminal equipment acquires the identification of the first long link returned by the first server.
8. The method of claim 6, wherein the terminal device sending a second request to the second server comprises:
the terminal equipment determines vendor push services supported by the terminal equipment;
and the terminal equipment sends the second request to a second server corresponding to the manufacturer push service.
9. The method of claim 8, wherein the terminal device determining vendor push services supported by the terminal device comprises:
the terminal equipment determines the system type of the terminal equipment and the manufacturer to which the terminal equipment belongs;
and the terminal equipment determines the vendor push service supported by the terminal equipment according to the system type of the terminal equipment and the vendor to which the terminal equipment belongs.
10. The method as recited in claim 7, further comprising:
if the target APP is restarted, the terminal equipment determines whether the APP is in a login state;
if yes, resending the first request.
11. A message pushing system, comprising:
the system comprises terminal equipment, a first server and a second server;
the first server is used for acquiring a message to be pushed of a target application program APP of the terminal equipment; if the first long link between the first server and the terminal equipment is in a connection state, sending the message to be pushed to the terminal equipment through the first long link; if the first long link is determined to be in a non-connection state, the first server acquires an identifier of a second long link between the terminal equipment and the second server;
the first server sends the message to be pushed and the identifier of the second long link to the second server so that the second server sends the message to be pushed to the terminal equipment;
the terminal equipment is used for acquiring a message to be pushed of a target APP sent by the first server through the first long link if the first long link is in a connection state; if the first long link is in a non-connection state, acquiring a message to be pushed of a target APP sent by the second server through a second long link between the second server and the terminal equipment;
before the to-be-pushed message of the target APP sent by the second server is obtained through a second long link between the second server and the terminal equipment, the terminal equipment is further configured to send an identifier of the second long link to the first server, where the identifier of the second long link is that a user sends a second request to the second server when using the target APP and logging in an account, and the second server establishes the second long link and then distributes the second request to the terminal equipment;
after the first server sends the message to be pushed to the terminal device through the first long link, if the first long link is disconnected, the first server is further configured to switch to send the message to be pushed to the terminal device through the second server;
after the terminal device obtains the message to be pushed of the target application program APP sent by the first server through the first long link, if the first long link is disconnected, the terminal device is further configured to switch to obtain the message to be pushed sent by the second server through a second long link between the second server and the terminal device.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-5, 6-10.
13. A first server, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-5 via execution of the executable instructions.
14. A terminal device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 6-10 via execution of the executable instructions.
CN202011331896.3A 2020-11-24 2020-11-24 Message pushing method, system, equipment and storage medium Active CN112492020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011331896.3A CN112492020B (en) 2020-11-24 2020-11-24 Message pushing method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011331896.3A CN112492020B (en) 2020-11-24 2020-11-24 Message pushing method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112492020A CN112492020A (en) 2021-03-12
CN112492020B true CN112492020B (en) 2023-04-25

Family

ID=74934221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011331896.3A Active CN112492020B (en) 2020-11-24 2020-11-24 Message pushing method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112492020B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114558A (en) * 2021-04-07 2021-07-13 成都卫士通信息产业股份有限公司 Communication message transmission method, device, communication server and computer storage medium
CN114666404A (en) * 2022-02-28 2022-06-24 中国银联股份有限公司 Method and device for sending push message and server
CN115086417A (en) * 2022-07-20 2022-09-20 北京拓普丰联信息科技股份有限公司 Message pushing method and device, electronic equipment and storage medium
CN116668211B (en) * 2022-10-25 2024-06-07 荣耀终端有限公司 Communication method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109451025A (en) * 2018-11-14 2019-03-08 深圳市云歌人工智能技术有限公司 Information push method, device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254390A (en) * 2016-09-22 2016-12-21 曙光信息产业(北京)有限公司 Information push method and system
CN109286642A (en) * 2017-07-20 2019-01-29 武汉楚鼎信息技术有限公司 A kind of method of Push active push speed-optimization
CN108063724A (en) * 2018-01-12 2018-05-22 吉浦斯信息咨询(深圳)有限公司 Information push method and its system based on Android platform
CN110417915B (en) * 2019-08-22 2021-12-31 北京大米科技有限公司 Push message transmission method and device, storage medium and electronic equipment
CN111741058A (en) * 2020-05-07 2020-10-02 北京五八信息技术有限公司 Message pushing method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109451025A (en) * 2018-11-14 2019-03-08 深圳市云歌人工智能技术有限公司 Information push method, device and storage medium

Also Published As

Publication number Publication date
CN112492020A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN112492020B (en) Message pushing method, system, equipment and storage medium
KR102471046B1 (en) Method and device for re-establishing session, access and mobility management function, session management function, and terminal
CN108712485B (en) Resource subscription method and device for Internet of things equipment
JP2007512602A (en) Terminal device settings
CN112286667A (en) Application program control method and device, electronic equipment and medium
US20190028332A1 (en) Configuration information push method and device
CN112804213B (en) Communication disconnection reconnection method, device, system, readable medium and electronic equipment
US20240089304A1 (en) Voice Call Method and User Equipment
WO2022033521A1 (en) Session update method, terminal, and network-side device
CN107872326B (en) Method, device and system for releasing session resources
KR20190118647A (en) Information processing methods, apparatus, computer readable storage media and electronic devices
CN109963353B (en) Call reestablishment method and device for broadband and narrowband fusion system
WO2016011572A1 (en) Apn configuration method, user equipment and configuration server
CN114979989A (en) 5G message drop-back method, system and device
CN113596792A (en) Binding method and device of electronic equipment, storage medium and electronic device
CN110933775A (en) Method and device for establishing signal connection and electronic equipment
CN106708881B (en) Interaction method and device based on network file system
CN110049522B (en) Working mode switching method and device and storage medium
CN113141606A (en) Operator network switching method and device of equipment
CN110121215B (en) Data connection establishment method and device of 5G terminal and 5G terminal
CN107846403B (en) Method and system for communication between SIM card and application server
CN108307457B (en) Message routing method and device
US11272357B2 (en) Method and device for determining SIM card information
CN104935571A (en) Interaction method of TV game server and client
CN103685482A (en) Application program distributing method and application program distributing 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
GR01 Patent grant
GR01 Patent grant