A message push method and device
By selecting a suitable message push service and performing application keep-alive processing, the problem of low message arrival rate caused by poor compatibility between different manufacturers and application closure is solved, and the user experience and application retention rate are improved.
Patent Information
- Application Number
- CN202010074719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-22
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-01-22
AI Technical Summary
Existing push services have poor compatibility among different manufacturers and applications, resulting in low message arrival rates and poor user experience. In addition, applications are often closed by the system, affecting the reliability of message push.
By selecting the most suitable service from preset message push services, obtaining the device identifier to establish a connection, performing keep-alive processing to keep the application running, and locally caching messages to be pushed to improve the message arrival rate.
It improves the compatibility and arrival rate of message push, improves user experience and application retention rate.
Smart Images

Figure CN113238808B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a message pushing method and device. Background Art
[0002] Based on the needs of product functions and operational activities, many applications will use the message push function to push some system notifications, consultations, and activity messages to users, so that users can obtain and consume messages in a timely manner. Currently, the commonly used push services (also known as push SDKs or push software development kits) include: Xiaomi Push Service, Huawei Push Service, Jiguang Push Service, etc.
[0003] At present, there are many push services. Different manufacturers or applications may use different push services. Different push services have different application permissions, push channels, push traffic consumption, push message formats, etc. They are not adaptable to different clients, so they are not compatible. In addition, in order to save resources, running applications are often closed by the system, which makes the arrival rate of push service push messages biased, resulting in poor user experience. Summary of the invention
[0004] In view of this, the present invention provides a message push method and device, which can select the message push service that is most suitable for the client from the preset message push services according to the client, and has universality. It can keep the application in a running state by keeping the application alive, thereby improving the message arrival rate of the messages to be pushed.
[0005] To achieve the above object, according to a first aspect of the present invention, a message push method is provided, which is applied to a client and includes:
[0006] Determine a message push service applicable to the client from one or more preset message push services;
[0007] Obtaining a device identifier corresponding to the client through the determined message push service, and sending the device identifier to a push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier;
[0008] The message to be pushed to the one or more applications is obtained from the push service platform through the connection.
[0009] Optionally, it also includes:
[0010] The device identifier is sent to the service end, so that the service end sends the message to be pushed to the push service platform according to the device identifier.
[0011] Optionally, obtaining the message to be pushed to the one or more applications from the push service platform through the connection includes:
[0012] Passively receiving the message to be pushed pushed by the push service platform through the connection;
[0013] Or actively pull the message to be pushed from the push service platform through the connection.
[0014] Optionally, it also includes:
[0015] After receiving the message to be pushed pushed by the push service platform, a confirmation receipt indication corresponding to the message to be pushed is returned to the push service platform.
[0016] Optionally, it also includes:
[0017] After acquiring the message to be pushed from the push service platform through the connection, storing the acquired message to be pushed in a local cache;
[0018] After a preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, wherein the preset cache time is determined according to the time when the user of the client uses the one or more applications.
[0019] Optionally, it also includes:
[0020] A keep-alive process is performed on one or more applications of the client so that the connection between the application and the push service platform is in a connected state.
[0021] Optionally, the keep-alive processing is to configure a daemon process for the application process;
[0022] When the application process is closed, starting the application process through the daemon;
[0023] When the daemon is shut down, the daemon process is started by the application process.
[0024] Optionally, the keep-alive processing is to increase the priority of the application process so that the application process is closed after one or more other processes are closed.
[0025] Optionally, the keep-alive processing is, when the application process is closed, starting the application process through other running applications corresponding to the determined message push service.
[0026] To achieve the above object, according to the second aspect of the present invention, a message push client is provided, comprising: a message push service determination module, a device identifier acquisition module, and a to-be-pushed message acquisition module; wherein:
[0027] The message push service determination module is used to determine a message push service applicable to the client from one or more preset message push services;
[0028] The device identifier acquisition module is used to acquire a device identifier of the client through the determined message push service, and send the device identifier to the push service platform so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier;
[0029] The to-be-pushed message acquisition module is used to acquire the to-be-pushed message to be pushed to one or more applications of the client from the push service platform through the connection.
[0030] Optionally, the device identifier acquisition module is further used to:
[0031] The device identifier is sent to the service end, so that the service end sends the message to be pushed to the push service platform according to the device identifier.
[0032] Optionally, obtaining the message to be pushed to one or more applications of the client from the push service platform through the connection includes:
[0033] Passively receiving the message to be pushed pushed by the push service platform through the connection;
[0034] Or actively pull the message to be pushed from the push service platform through the connection.
[0035] Optionally, the module for acquiring messages to be pushed is further used to:
[0036] After receiving the message to be pushed pushed by the push service platform, a confirmation receipt indication corresponding to the message to be pushed is returned to the push service platform.
[0037] Optionally, the module for acquiring messages to be pushed is further used to:
[0038] After acquiring the message to be pushed from the push service platform through the connection, storing the acquired message to be pushed in a local cache;
[0039] After a preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, wherein the preset cache time is determined according to the time when the user of the client uses the one or more applications.
[0040] Optionally, the device identifier acquisition module is further used to:
[0041] A keep-alive process is performed on one or more applications of the client so that the connection between the application and the push service platform is in a connected state.
[0042] Optionally,
[0043] The keep-alive process is to configure a daemon process for the application process;
[0044] When the application process is closed, starting the application process through the daemon;
[0045] When the daemon is shut down, the daemon process is started by the application process.
[0046] Optionally,
[0047] The keep-alive process is to increase the priority of the application process so that the application process is closed after one or more other processes are closed.
[0048] Optionally,
[0049] The keep-alive processing is to start the application process through other running applications corresponding to the determined message push service when the application process is closed.
[0050] To achieve the above object, according to a third aspect of the present invention, a message push method is provided, which is applied to a push service platform, comprising:
[0051] Receiving a device identifier corresponding to the client sent by the client;
[0052] Establishing a connection between one or more applications of the client and the push service platform according to the device identifier;
[0053] The message to be pushed of one or more applications to be pushed to the client is sent through the connection.
[0054] Optionally, it also includes:
[0055] The message to be pushed is received from the service end according to the device identifier.
[0056] Optionally, it also includes:
[0057] Receive a confirmation receipt indication returned by the client according to the message to be pushed.
[0058] Optionally, it also includes:
[0059] The message to be pushed is stored in the local cache according to any of the following situations: failure to push the message to be pushed, failure to receive the confirmation receipt indication within the threshold time after pushing the message to be pushed, and the presence of a message to be pushed that has timed out and has not been sent in the push service platform.
[0060] Optionally, it also includes:
[0061] According to the preset message processing rules, the message to be pushed stored in the local cache is processed in any of the following ways: deleting the message to be pushed, or re-pushing the message to be pushed.
[0062] Optionally, it also includes:
[0063] Determine whether the message to be pushed sent by the service end meets the preset rules;
[0064] In the case of complying with the preset rules, the format of the message to be pushed is converted so that the format of the message to be pushed complies with the message storage format of the push service platform or the message receiving format of the client.
[0065] To achieve the above-mentioned purpose, according to the fourth aspect of the present invention, there is provided an electronic device for message push, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned message push method.
[0066] To achieve the above objective, according to a fifth aspect of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any of the methods described in the above message pushing methods is implemented.
[0067] The above invention has the following advantages or beneficial effects: by determining the message push service suitable for the client from one or more preset message push services, good compatibility between the message push service and the client and the message push service is guaranteed; by keeping the client application alive, the application is always in a running state, ensuring that the connection between the application and the push service platform is in a connected state, thereby ensuring the arrival rate of the messages to be pushed; by caching the received messages to be pushed locally on the client, and determining the time to send the messages to be pushed to the application based on the user's application usage habits or time, etc., the user's click rate on the push messages is improved to a certain extent, thereby improving the user's experience of using the application, and thereby improving the retention rate of the application.
[0068] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0070] Figure 1 is a schematic diagram of the main process of the message push method applied to the client according to an embodiment of the present invention;
[0071] Figure 2 is a schematic diagram of the main process of another message push method applied to a client according to an embodiment of the present invention;
[0072] Figure 3 is a schematic diagram of main modules of a message push client according to an embodiment of the present invention;
[0073] Figure 4 is a schematic diagram of the main process of a message push method applied to a push service platform according to an embodiment of the present invention;
[0074] Figure 5 is a schematic diagram of the main process of another message push method applied to a push service platform according to an embodiment of the present invention;
[0075] Figure 6 is a schematic diagram of the main structure of a message push system according to an embodiment of the present invention;
[0076] Figure 7 is a schematic diagram of the main process of a message push method applied to a message push system according to an embodiment of the present invention;
[0077] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0078] Fig. 9It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0079] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0080] Figure 1 is a schematic diagram of the main process of the message push method applied to the client according to an embodiment of the present invention, such as Figure 1 As shown, the method may specifically include the following steps:
[0081] Step S101: Determine a message push service applicable to the client from one or more preset message push services.
[0082] The preset one or more message push services include but are not limited to: Xiaomi push service, Huawei push service, Aurora push service, pigeon push service, etc. In addition, you can also customize the message push service according to actual needs. Specifically, you can integrate multiple different push services through the template design mode, and provide a unified interface to the outside to select the appropriate message push service according to the actual needs of the client. In this way, the characteristics of each different push can be used to improve the adaptability of the message push service and the client, thereby improving the push arrival rate to a certain extent.
[0083] Step S102, obtaining the device identifier corresponding to the client through the determined message push service, and sending the device identifier to the push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier.
[0084] The device identifier, or Device Token (DT for short), corresponds to the client such as the mobile phone system, and is generally fixed. Therefore, a connection can be established with the push service platform through the device identifier, so that the push service platform can push messages through the device identifier. In addition, the push service platform can also push messages to one or more client applications based on the user account, client model, etc. used by the client user when logging into the application, which can realize both targeted sending of messages to be pushed and group sending of messages to be pushed.
[0085] In a preferred embodiment, the connection between one or more applications of the client and the push service platform is a Socket long connection. Furthermore, the Netty long connection framework is used to establish a Socket long connection between one or more applications of the client and the push service platform, and then a message can be sent to the server at a certain time interval to ensure the Socket long connection, and the length of the time interval can be set according to the actual application. The so-called Netty refers to a popular asynchronous event-driven Java open source network application framework for rapid development of maintainable high-performance protocol servers and clients.
[0086] In an optional implementation, the device identifier is sent to the business end so that the business end sends the message to be pushed to the push service platform according to the device identifier. That is to say, by sending the device identifier to the business end, the business end selects one or more clients to receive the message through the device identifier when sending relevant operation, advertising, and activity messages to the push service platform. It can be understood that the business end is bound to the corresponding push service platform by default in order to send messages. At the same time, when there are one or more push service platforms, the push service platform to receive the message can also be selected according to the identifier of the service platform to complete the message push.
[0087] In an optional implementation, one or more applications of the client are kept alive so that the connection between the application and the push service platform is in a connected state. In this way, it can be ensured that the client application is always in a running state, so that the connection between the application and the push service platform will not be closed due to the non-operation of the application. It is understandable that there are many ways to keep the application alive, including but not limited to: dual-process daemon, one-pixel page, etc.
[0088] In an optional implementation, the keep-alive process is to configure a daemon process for the application process; when the application process is closed, the application process is started by the daemon; when the daemon is closed, the daemon process is started by the application process. In other words, the daemon and the application process poll to detect the status of each other, and if the other party is found to be closed, the other party's process is immediately restarted to reach the daemon state. In this way, this dual-process daemon mechanism can be used to detect in real time whether the application is closed or killed in the background. If it is killed, the daemon process will immediately restart the application and run it in the background, thereby ensuring a long link for the application push service platform.
[0089] In an optional implementation, the keep-alive process is to increase the priority of the application process so that the application process is closed after one or more other processes are closed. It is understandable that one or more applications in the client have different priorities when running in the background. The higher the priority, the lower the probability of being closed or killed when running in the background. Therefore, the possibility of the application being closed can be reduced by increasing the priority of the application process, thereby ensuring the long link of the application to the push service platform.
[0090] In an optional implementation, the keep-alive process is to start the application process through other running applications corresponding to the determined message push service when the application process is closed. Specifically, taking the applications A and B using the same message push service as an example, when both applications A and B are in the background running state, if application B finds that application A is closed in the background, application B can restart application A to ensure a long connection between application A and the push service platform.
[0091] Step S103: acquiring the message to be pushed to the one or more applications from the push service platform through the connection.
[0092] In an optional embodiment, obtaining the messages to be pushed to the one or more applications from the push service platform through the connection includes: passively receiving the messages to be pushed pushed by the push service platform through the connection; or actively pulling the messages to be pushed from the push service platform through the connection. That is to say, the application can not only passively receive the messages pushed (pushed) by the push service platform, but also actively pull (pull) messages according to the strategy to ensure the real-time nature of the messages. Specifically, the client can determine the frequency and time of actively pulling the messages to be pushed based on the memory occupancy rate, power consumption rate, traffic consumption, and application response rate during the application runtime, so as not to affect the normal operation of the client, while ensuring the timeliness of obtaining the messages to be pushed.
[0093] In an optional implementation, after receiving the message to be pushed pushed by the push service platform, a confirmation receipt indication corresponding to the message to be pushed is returned to the push service platform. On this basis, the push service platform can calculate the arrival rate of the message to be pushed according to the received confirmation receipt indication. At the same time, in the case of failure to push the message or failure to receive the confirmation receipt indication, the corresponding message to be pushed can be processed, such as deleting the message to be pushed or resending the message to be pushed.
[0094] In an optional embodiment, after obtaining the message to be pushed from the push service platform through the connection, the obtained message to be pushed is stored in a local cache; after a preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, and the preset cache time is determined based on the time that the user of the client uses the one or more applications.
[0095] It is understandable that although the application can be kept running as much as possible through the keep-alive process, it is inevitable that the application will be closed sometimes. In this way, in order to ensure the arrival rate of the message to be pushed, the message to be pushed can be temporarily cached in the local cache when it is received, and then the cached message to be pushed can be sent to the application according to the user's activity, that is, the time period when the user uses the application, etc., to increase the probability of the user clicking on or viewing the push message. Specifically, taking the user's active time as 6:00 pm-22:00 as an example, the locally cached message to be pushed can be pushed to the application during the time period of 6:00 pm-22:00 pm, so that the user can see the message to be pushed in time.
[0096] Based on the above embodiments, by determining the message push service suitable for the client from one or more preset message push services, good compatibility between the message push service and the client and the message push service is ensured; by keeping the client application alive, the application is always in a running state, which ensures that the connection between the application and the push service platform is in a connected state, thereby ensuring the arrival rate of the messages to be pushed; by caching the received messages to be pushed locally on the client, and determining the time to send the messages to be pushed to the application based on the user's application usage habits or time, etc., the user's click rate on push messages is improved to a certain extent, thereby improving the user's experience of using the application, and thereby improving the retention rate of the application.
[0097] See also Figure 2 Based on the above embodiment, the embodiment of the present invention provides another message push method applied to a client, and the method may specifically include the following steps:
[0098] Step S201, determine a message push service applicable to the client from one or more preset message push services. The preset one or more message push services include but are not limited to: Xiaomi push service, Huawei push service, Jiguang push service, pigeon push service, etc. In addition, the message push service can also be customized according to actual needs.
[0099] Step S202, through the determined message push service, obtain the device identifier corresponding to the client, and send the device identifier to the push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier. The connection uses the Netty long connection framework to establish a Socket long connection between one or more applications of the client and the push service platform.
[0100] Step S203, obtaining the message to be pushed to the one or more applications from the push service platform through the connection. It is understandable that the application can not only passively receive the message pushed by the push service platform, but also actively pull the message according to the strategy to ensure the real-time nature of the message. Specifically, the client can determine the frequency and time of actively pulling the message to be pushed according to the memory occupancy rate, power consumption rate, traffic consumption and application response rate during the application runtime, so as not to affect the normal operation of the client, while ensuring the timeliness of obtaining the message to be pushed.
[0101] Step S204, after receiving the message to be pushed pushed by the push service platform, return the confirmation receipt indication corresponding to the message to be pushed to the push service platform. On this basis, the push service platform can calculate the arrival rate of the message to be pushed according to the received confirmation receipt indication. At the same time, in the case of failure to push the message or failure to receive the confirmation receipt indication, the corresponding message to be pushed can be processed, such as deleting the message to be pushed or resending the message to be pushed.
[0102] Step S205: store the acquired message to be pushed into the local cache.
[0103] Step S206, after the preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, and the preset cache time is determined according to the time when the user of the client uses the one or more applications. In this way, when the application is closed, the message to be pushed of the application can be received, and then according to the user activity, that is, the time period when the user uses the application, etc., it is determined when to send the cached message to be pushed to the application, so as to increase the probability of the user clicking on or viewing the message to be pushed.
[0104] See also Figure 3 Based on the above embodiment, a message push client 300 is provided, including: a message push service determination module 301, a device identifier acquisition module 302, and a to-be-pushed message acquisition module 303; wherein,
[0105] The message push service determination module 301 is used to determine a message push service applicable to the client from one or more preset message push services;
[0106] The device identifier acquisition module 302 is used to acquire a device identifier of the client through the determined message push service, and send the device identifier to the push service platform so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier;
[0107] The to-be-pushed message acquisition module 303 is used to acquire the to-be-pushed message to be pushed to one or more applications of the client from the push service platform through the connection.
[0108] In an optional implementation, the device identifier acquisition module 302 is further configured to:
[0109] The device identifier is sent to the service end, so that the service end sends the message to be pushed to the push service platform according to the device identifier.
[0110] In an optional implementation, obtaining the message to be pushed to one or more applications of the client from the push service platform through the connection includes:
[0111] Passively receive the message to be pushed pushed by the push service platform through the connection; or actively pull the message to be pushed from the push service platform through the connection.
[0112] In an optional implementation, the to-be-pushed message acquisition module 303 is further configured to:
[0113] After receiving the message to be pushed pushed by the push service platform, a confirmation receipt indication corresponding to the message to be pushed is returned to the push service platform.
[0114] In an optional implementation, the module 303 for acquiring messages to be pushed is further used to:
[0115] After obtaining the message to be pushed from the push service platform through the connection, the obtained message to be pushed is stored in the local cache; after the preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, and the preset cache time is determined according to the time when the user of the client uses the one or more applications.
[0116] In an optional implementation, the device identifier acquisition module 302 is further configured to:
[0117] A keep-alive process is performed on one or more applications of the client so that the connection between the application and the push service platform is in a connected state.
[0118] In an optional implementation manner, the keep-alive processing is to configure a daemon process for the application process;
[0119] When the application process is closed, starting the application process through the daemon;
[0120] When the daemon is shut down, the daemon process is started by the application process.
[0121] In an optional implementation, the keep-alive processing is to increase the priority of the application process so that the application process is closed after one or more other processes are closed.
[0122] In an optional implementation, the keep-alive processing is to start the application process by other running applications corresponding to the determined message push service when the application process is closed.
[0123] See also Figure 4 Based on the above embodiment, a message push method applied to a push service platform is provided, and the method may specifically include the following steps:
[0124] Step S401: receiving a device identifier corresponding to the client sent by the client.
[0125] Step S402: sending the device identifier to the client, so as to establish a connection between one or more applications of the client and the push service platform according to the device identifier.
[0126] In an optional implementation, the receiving service end sends the message to be pushed according to the device identifier. That is to say, when the service end sends the relevant operation, advertising, and activity messages to the push service platform, it selects one or more clients to receive the message through the device identifier. It can be understood that the service end is bound to the corresponding push service platform by default in order to send messages. At the same time, when there are one or more push service platforms, the push service platform to receive the message can also be selected according to the identifier of the service platform to complete the message push.
[0127] On this basis, the push service platform can store the pending messages sent by the business end in a first-in-first-out queue, and then push the pending messages in the queue to the designated client, and delete the messages in the queue after successful sending. At the same time, different management mechanisms for pending messages that have timed out and have not been sent, as well as management mechanisms for pending messages that have failed to be pushed, can be formulated according to different actual needs.
[0128] In an optional implementation, it is determined whether the message to be pushed received from the service end complies with preset rules; if it complies with the preset rules, the format of the message to be pushed is converted so that the format of the message to be pushed complies with the message storage format of the push service platform or the message receiving format of the client.
[0129] The preset rules include but are not limited to: the format of the message to be pushed, the timeliness of the message to be pushed, whether the message to be pushed indicates the user identifier receiving the message, whether the message to be pushed indicates the device identifier receiving the message, etc. By converting the format of the message to be pushed into a unified message storage format or the message receiving format of the client, the compatibility of the push service platform with the message format not corresponding to the message push service is guaranteed.
[0130] Step S403, sending the messages to be pushed to one or more applications of the client through the connection. It can be understood that after receiving the messages to be pushed sent by the business end, the push service platform can actively push the messages to be pushed to the client through the first-in-first-out queue, and can also push the messages to be pushed to the client immediately according to the pull request of the messages to be pushed sent by the client at regular intervals, and when there is no latest message to be pushed, it does not directly reject the pull request of the messages to be pushed, but continues to monitor the update of the messages to be pushed of the push service platform. Once there is a new message to be pushed, the latest message to be pushed is returned according to the pull request of the messages to be pushed, thereby ensuring the real-time nature of the messages to be pushed. In addition, a timeout period can be set for the messages that have not been sent successfully, and they are cleared immediately after the timeout to ensure that the length of the queue is not too long.
[0131] In an optional implementation, a confirmation receipt indication returned by the client according to the message to be pushed is received.
[0132] On this basis, the push service platform may store the message to be pushed in the local cache in any of the following situations: failure to push the message to be pushed, failure to receive the confirmation receipt indication within the threshold time after pushing the message to be pushed, or the presence of a message to be pushed that has timed out and has not been sent in the push service platform.
[0133] Furthermore, according to the preset message processing rules, the message to be pushed stored in the local cache is processed in any of the following ways: deleting the message to be pushed, or re-pushing the message to be pushed. The preset message rules are set according to actual needs, including but not limited to deleting the message to be pushed that has not been sent due to timeout, resending the message to be pushed that has not been sent due to timeout, and resending the message to be pushed that has not received a confirmation receipt indication.
[0134] See also Figure 5 Based on the above embodiment, another message push method applied to a push service platform is provided. The method may specifically include the following steps:
[0135] Step S501: receiving a device identifier corresponding to the client sent by the client.
[0136] Step S502: establishing a connection between one or more applications of the client and the push service platform according to the device identifier.
[0137] In addition, the receiving service end sends the message to be pushed according to the device identifier. That is to say, when the service end sends the relevant operation, advertising, and activity messages to the push service platform, it selects one or more clients to receive the message through the device identifier. It can be understood that the service end is bound to the corresponding push service platform by default in order to send messages. At the same time, if there are one or more push service platforms, the push service platform to receive the message can also be selected according to the identifier of the service platform to complete the message push.
[0138] On this basis, the push service platform can store the pending messages sent by the business end in a first-in-first-out queue, and then push the pending messages in the queue to the designated client, and delete the messages in the queue after successful sending. At the same time, different management mechanisms for pending messages that have timed out and have not been sent, as well as management mechanisms for pending messages that have failed to be pushed, can be formulated according to different actual needs.
[0139] Furthermore, it is determined whether the message to be pushed sent by the received business terminal complies with the preset rules; if it complies with the preset rules, the format of the message to be pushed is converted so that the format of the message to be pushed complies with the message storage format of the push service platform or the message receiving format of the client.
[0140] The preset rules include but are not limited to: the format of the message to be pushed, the timeliness of the message to be pushed, whether the message to be pushed indicates the user identifier receiving the message, whether the message to be pushed indicates the device identifier receiving the message, etc. By converting the format of the message to be pushed into a unified message storage format or the message receiving format of the client, the compatibility of the push service platform with the message format not corresponding to the message push service is guaranteed.
[0141] Step S503: Send the push message of one or more applications to be pushed to the client through the connection.
[0142] Step S504: receiving a confirmation receipt indication returned by the client according to the message to be pushed.
[0143] Step S505, storing the message to be pushed to the local cache according to any of the following situations: failure to push the message to be pushed, failure to receive the confirmation receipt indication within a threshold time after pushing the message to be pushed, and the presence of a message to be pushed that has timed out and has not been sent in the push service platform.
[0144] Step S506: According to a preset message processing rule, the message to be pushed stored in the local cache is processed in any of the following ways: deleting the message to be pushed, or re-pushing the message to be pushed.
[0145] See also Figure 3 and Figure 6 Based on the above embodiment, a message push system 600 is provided, including a message push client 300 and a push service platform 601; wherein,
[0146] The message push client 300 is used to determine a message push service applicable to the client from one or more preset message push services; obtain a device identifier corresponding to the client through the determined message push service, and send the device identifier to a push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier; obtain a to-be-pushed message to be pushed to the one or more applications from the push service platform through the connection;
[0147] The push service platform 601 is used to receive a device identifier corresponding to the client sent by the client, establish a connection between one or more applications of the client and the push service platform according to the device identifier; and send a push message to be pushed to one or more applications of the client through the connection.
[0148] See also Figure 7 Based on the above embodiment, a message push method applied to a message push system is provided, and the method specifically comprises the following steps:
[0149] Step S701: The client determines a message push service applicable to the client from one or more preset message push services.
[0150] Step S702: The client obtains a device identifier corresponding to the client through the determined message push service.
[0151] Step S703: The client sends the device identifier to the push service platform.
[0152] Step S704: the push service platform receives the device identifier corresponding to the client sent by the client.
[0153] Step S705: The push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier.
[0154] Step S706, receiving the message to be pushed sent by the service end according to the device identifier, and judging whether the message to be pushed sent by the service end meets the preset rules. The preset rules include but are not limited to: the format of the message to be pushed, the timeliness of the message to be pushed, whether the message to be pushed indicates the user identifier of the message to be received, whether the message to be pushed indicates the device identifier of the message to be received, etc. By converting the format of the message to be pushed into a unified message storage format or the message receiving format of the client, the compatibility of the push service platform with the message format that is not corresponding to the message push service is guaranteed.
[0155] Step S707: The push service platform converts the format of the message to be pushed in accordance with the preset rule, so that the format of the message to be pushed complies with the message storage format of the push service platform or the message receiving format of the client.
[0156] Step S708: The client obtains the message to be pushed to the one or more applications from the push service platform through the connection. It can be understood that this includes passively receiving the message to be pushed pushed by the push service platform through the connection; or actively pulling the message to be pushed from the push service platform through the connection.
[0157] Step S709: After receiving the message to be pushed pushed by the push service platform, the client returns a confirmation receipt indication corresponding to the message to be pushed to the push service platform.
[0158] Step S710, the push service platform receives the confirmation receipt indication returned by the client according to the message to be pushed. It is understandable that the push service platform can store the message to be pushed in the local cache according to any of the following situations: failure to push the message to be pushed, failure to receive the confirmation receipt indication within the threshold time after pushing the message to be pushed, and the existence of a message to be pushed that has timed out and has not been sent in the push service platform. On this basis, the push service platform also performs any of the following processing on the message to be pushed stored in the local cache according to the preset message processing rules: deleting the message to be pushed, and re-pushing the message to be pushed.
[0159] Step S711, the client stores the acquired message to be pushed in a local cache;
[0160] Step S712: the client pushes the message to be pushed to the one or more applications after a preset cache time corresponding to the message to be pushed has passed, wherein the preset cache time is determined according to the time the user of the client uses the one or more applications.
[0161] Figure 8 An exemplary system architecture 800 is shown to which the message push method or message push device according to the embodiment of the present invention can be applied.
[0162] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0163] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0164] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0165] Server 805 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 801, 802, and 803. The backend management server may analyze and process received data such as product information query requests, and feed back the processing results to the terminal device.
[0166] It should be noted that the message push method applied to the push service platform provided in the embodiment of the present invention is generally executed by the server 805 .
[0167] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0168] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0169] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0170] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0171] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0172] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0173] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0174] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a message push service determination module, a device identifier acquisition module, and a message acquisition module to be pushed. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the message push service determination module may also be described as "a module for determining a message push service applicable to the client from one or more preset message push services."
[0175] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: determining a message push service applicable to the client from one or more preset message push services; obtaining a device identifier corresponding to the client through the determined message push service, and sending the device identifier to a push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier; obtaining a message to be pushed to the one or more applications from the push service platform through the connection.
[0176] According to the technical solution of the embodiments of the present invention, by determining the message push service suitable for the client from one or more preset message push services, good compatibility between the message push service and the client and the message push service is guaranteed; by keeping the client application alive, the application is always in a running state, which ensures that the connection between the application and the push service platform is in a connected state, thereby ensuring the arrival rate of the messages to be pushed; by caching the received messages to be pushed locally on the client, and determining the time to send the messages to be pushed to the application based on the user's application usage habits or time, etc., the user's click rate on the push messages is improved to a certain extent, thereby improving the user's experience of using the application, and thereby improving the retention rate of the application.
[0177] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A message push method, characterized in that: Applied to the client, including: Determine a message push service applicable to the client from one or more preset message push services; Obtaining a device identifier corresponding to the client through the determined message push service, and sending the device identifier to a push service platform, so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier; Sending the device identifier to the service end, so that the service end sends the message to be pushed to the push service platform according to the device identifier; Performing keep-alive processing on one or more applications of the client so that the connection between the application and the push service platform is in a connected state; the keep-alive processing includes configuring a daemon process for the application process; starting the application process through the daemon when the application process is closed; and starting the daemon process through the application process when the daemon is closed; The message to be pushed to the one or more applications is obtained from the push service platform through the connection.
2. The message push method according to claim 1, characterized in that: The obtaining, through the connection, from the push service platform the message to be pushed to the one or more applications, comprises: Passively receiving the message to be pushed pushed by the push service platform through the connection; Or actively pull the message to be pushed from the push service platform through the connection.
3. The message push method according to claim 2, characterized in that: Also includes: After receiving the message to be pushed pushed by the push service platform, a confirmation receipt indication corresponding to the message to be pushed is returned to the push service platform.
4. The message push method according to claim 1, characterized in that: Also includes: After acquiring the message to be pushed from the push service platform through the connection, storing the acquired message to be pushed in a local cache; After a preset cache time corresponding to the message to be pushed has passed, the message to be pushed is pushed to the one or more applications, wherein the preset cache time is determined according to the time when the user of the client uses the one or more applications.
5. The message push method according to claim 1, characterized in that: The keep-alive process is to increase the priority of the application process so that the application process is closed after one or more other processes are closed.
6. The message push method according to claim 1, characterized in that: The keep-alive processing is to start the application process through other running applications corresponding to the determined message push service when the application process is closed.
7. A message push client, characterized in that: include: Message push service determination module, device identifier acquisition module, and to-be-pushed message acquisition module; wherein, The message push service determination module is used to determine a message push service applicable to the client from one or more preset message push services; The device identifier acquisition module is used to obtain a device identifier of the client through the determined message push service, and send the device identifier to the push service platform so that the push service platform establishes a connection between one or more applications of the client and the push service platform according to the device identifier; it is also used to send the device identifier to the service end so that the service end sends the message to be pushed to the push service platform according to the device identifier; it is also used to perform keep-alive processing on one or more applications of the client so that the connection between the application and the push service platform is in a connected state; the keep-alive processing is to configure a daemon process for the application process; when the application process is closed, start the application process through the daemon; when the daemon is closed, start the daemon process through the application process; The to-be-pushed message acquisition module is used to acquire the to-be-pushed message to be pushed to one or more applications of the client from the push service platform through the connection.
8. A message push method, characterized in that: Applied to push service platforms, including: Receiving a device identifier corresponding to the client sent by the client; Establishing a connection between one or more applications of the client and the push service platform according to the device identifier; Sending the device identifier to the service end, so that the service end sends the message to be pushed to the push service platform according to the device identifier; Performing keep-alive processing on one or more applications of the client so that the connection between the application and the push service platform is in a connected state; the keep-alive processing includes configuring a daemon process for the application process; starting the application process through the daemon when the application process is closed; and starting the daemon process through the application process when the daemon is closed; The message to be pushed of one or more applications to be pushed to the client is sent through the connection.
9. An electronic device for message push, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
