A method and system for push notifications

CN116436887BActive Publication Date: 2026-09-01INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310162710.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-09-01
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

当前,互联网大数据发展迅速,用户群体数量庞大,为保证广大用户群可实现功能体验,通常会选择基于第三方推送平台来支持推送服务,在实现信息传递高效的同时也引发了用户信息泄漏的问题

Benefits of technology

[0046]本发明提供的一种消息推送方法及系统,依据客户端的状态设计区别的消息推送模式。当客户端在线状态时实现端对端加密应用内推送,从而可以实现用户及时、快速、高效、稳定、安全接收到消息通知。当客户端离线状态时虽依赖于第三方平台转发实现推送,但第三方无法获取到具体推送内容,从而保证用户数据安全,防止第三方获取数据信息。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116436887B_ABST
    Figure CN116436887B_ABST
Patent Text Reader

Abstract

This invention discloses a message push method and system. The method includes: obtaining the ClientUUID of a client and generating a main message queue based on the client's business request containing a message to be pushed; consuming the main message queue to obtain a message push notification containing the message to be pushed and its corresponding Message ID and type; determining whether the client is online based on the client's ClientUUID; if the client is online, pushing the message push notification to the client; if the client is offline, sending the client's ClientUUID, the Message ID, the type, and the private device ID to a platform, so that information can be transmitted between the platform and a third-party platform based on the client's ClientUUID, and the client can retrieve the message to be pushed from its private device based on the Message ID, type, and private device ID. This invention ensures user data security and prevents third parties from obtaining data information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and in particular to a method and system for message push. Background Technology

[0002] Push notifications, serving as a crucial bridge between clients and servers, are a vital interaction method for users to perceive information and experience business functions. Establishing a push notification mechanism within a system ensures that business operations can reliably and promptly deliver application information from the push module to users. Currently, with the rapid development of internet big data and a massive user base, to guarantee a smooth user experience, third-party push platforms are often chosen to support push services. While achieving efficient information delivery, this also raises concerns about user information leakage. Users' personal data no longer belongs to them; data is transferred, information is leaked, and privacy information becomes a commodity for various platforms to pursue commercial interests. Summary of the Invention

[0003] To address the problems of the prior art, this invention provides a message push method and system. This system ensures a good user experience while protecting user data security and preventing information leakage risks.

[0004] The technical content of this invention includes:

[0005] A message push method, applied to a private device that has established a trust relationship with a client, the method comprising:

[0006] Obtain the ClientUUID of the client, and generate the main message queue based on the client's business request containing the message to be pushed;

[0007] Consume the main message queue to obtain a message push notification containing the message to be pushed and the Message ID and type corresponding to the message to be pushed.

[0008] Based on the ClientUUID of the client, determine whether the client is online;

[0009] When the client is online, the message push notification will be sent to the client;

[0010] When the client is offline, the client's ClientUUID, the Message ID, the type, and the private device ID are sent to the platform so that information can be transmitted between the platform and a third-party platform based on the client's ClientUUID, and the client can obtain the message to be pushed from the private device based on the Message ID, the type, and the private device ID.

[0011] Further, determining whether the client is online based on the client's ClientUUID includes:

[0012] Establish long polling with the client;

[0013] When a client requests the poll interface with an encrypted access token, the timestamp of the ClientUUID is saved.

[0014] If the difference between the current time and the timestamp is greater than a set value, or if a preset identifier is detected, the client is determined to be offline; wherein, the preset identifier indicates that the client actively disconnected.

[0015] If the difference between the current time and the timestamp is less than a set value, and no preset identifier is found, the client is determined to be online.

[0016] Furthermore, the step of pushing the message notification to the client includes:

[0017] Based on the message push notification, a client message queue is generated;

[0018] The client message queue is pushed to the client so that the client can obtain the message to be pushed through the encrypted poll interface.

[0019] Furthermore, when the client is offline, the ClientUUID, MessageID, type, and private device ID of the client are sent to the platform, including:

[0020] Based on the ClientUUID of the client, the Message ID and type of the push notification, and the private device ID, an offline message queue is generated;

[0021] Set a preset time range;

[0022] Suspend the thread corresponding to the offline message queue;

[0023] If the client is determined to be online within the preset time range, a client message queue is generated based on the message push notification, and the client message queue is pushed to the client so that the client can obtain the message to be pushed through the encrypted poll interface;

[0024] If the client is determined to be offline within the preset time range, the offline message queue is sent to the platform.

[0025] Furthermore, after the platform transmits the Message ID to the client via a third-party platform based on the client's ClientUUID, the client retrieves the message to be pushed from the private device based on the Message ID, the type, and the private device ID, including:

[0026] The platform obtains the deviceToken of all clients by calling the SDK interface of the third-party platform through the client.

[0027] The platform obtains the deviceToken corresponding to the client based on the client's ClientUUID, generates a Push message containing the Message ID, the type, and the private device ID, and then sends the deviceToken and the Push message to the third-party platform.

[0028] The third-party platform pushes the Push message to the client based on the deviceToken;

[0029] The client accesses the private device based on the Push message to obtain the message to be pushed.

[0030] Furthermore, the third-party platform pushes the Push message to the client based on the deviceToken, including:

[0031] Retrieve all push messages from this client;

[0032] Establish a push message sequence for all push messages;

[0033] Based on the aforementioned Push message timing, Push messages are pushed to the client sequentially.

[0034] Furthermore, the third-party platform includes: Umeng Push Server or Huawei Push Server.

[0035] A message push system, characterized in that the system comprises:

[0036] The client is used to provide the client's ClientUUID and the business request containing the message to be pushed;

[0037] A private device is used to obtain the ClientUUID of a client and generate a main message queue based on the client's business request containing the message to be pushed; consume the main message queue to obtain a message push notification containing the message to be pushed and the Message ID and type corresponding to the message to be pushed; determine whether the client is online based on the client's ClientUUID; if the client is online, push the message push notification to the client; if the client is offline, send the client's ClientUUID, the Message ID, the type, and the private device ID to the platform;

[0038] The platform is used to send the client's ClientUUID, the MessageID, the type, and the private device ID to a third-party platform based on the client's ClientUUID;

[0039] A third-party platform is used to send the Message ID, the type, and the private device ID to the client based on the client's ClientUUID.

[0040] An electronic device, comprising:

[0041] processor;

[0042] Memory used to store the processor's executable instructions;

[0043] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement any of the methods described above.

[0044] A computer-readable storage medium having stored thereon computer program instructions, characterized in that, when executed by a processor, the program instructions implement any of the methods described above.

[0045] Compared with the prior art, the present invention has at least the following advantages:

[0046] This invention provides a message push method and system that designs different message push modes based on the client's status. When the client is online, end-to-end encrypted in-application push is implemented, enabling users to receive message notifications promptly, quickly, efficiently, stably, and securely. When the client is offline, although push is achieved through a third-party platform, the third party cannot obtain the specific push content, thus ensuring user data security and preventing third parties from obtaining data information. Attached Figure Description

[0047] Figure 1 Diagram of a push notification system.

[0048] Figure 2 Message push flowchart.

[0049] Figure 3 The specific steps for operating the private device processing module. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] The message push system of this invention includes: a client, a private device, a platform, and a third-party platform. The client is a terminal program that allows users to receive push messages, including apps, web applications, and PCs. The platform is a relay scheduling and management console between the private device and the client, used to manage client device identifiers, relay messages, cached data, etc. The private device is used to store and process business and push messages, and selects whether to access an external third-party platform (Umeng or other vendor channels) based on the client's status, thereby realizing message push. It can be a hardware device including a processor and a memory, the memory storing computer programs, or it can be a storage medium storing computer programs.

[0052] I. Building a message push system.

[0053] like Figure 1 As shown, message push is divided into in-app push and system push based on the client's status. When the client is online, in-app push can be implemented. When the client is offline, the message needs to be pushed to a third-party vendor's channel via the platform's forwarding function.

[0054] like Figure 2 As shown. The private device's message push module determines the client's status by referring to the client's ClientUUID timestamp. When the client is online, the client establishes a long polling mechanism with the private device. The message push module sends the message content to be pushed to a separate queue for the client's ClientUUID. The private device then pushes the message content to the corresponding client. The client retrieves the message data to be pushed to that client through an encrypted poll interface, thus achieving in-application push. The private device is a user's personal storage device. The poll interface called by the client uses a symmetric key encrypted with a public-private key, ensuring that the message data is not read or recorded by the platform, thereby guaranteeing user data security.

[0055] like Figure 3 As shown, the message push module of the private device determines the client's status by referring to the timestamp of the client's ClientUUID. When the client is offline, the message push module sends the message content to be pushed to the corresponding push_notification_platform (offline message queue) queue, and sends the Message ID, type, and ClientUUID to the platform and third-party vendor channels. During this forwarding process, only the Message ID, type, and ClientUUID are transmitted, not the actual message data; the message itself remains stored in the private device. After the third-party vendor channel returns it to the target client, the client requests the specific message content from the private device based on the received Message ID.

[0056] Specifically, the client and the private device use a pre-defined encryption scheme to establish a trust relationship through the poll interface for message push. When the client sends an access request to the private device, it carries an accessToken for authentication, thereby ensuring data security.

[0057] Specifically, offline push notifications will have a slightly smaller delay compared to online in-app push notifications, but both methods ensure user data security.

[0058] Specifically, the private device includes a message push module, a business module, and a data storage module. The message push module establishes a long polling mechanism with the client that sends the request, and is responsible for scheduling messages to be pushed, encrypting the push message data, and accurately pushing the content to the client or the platform. The business module receives the business request from the requesting client, converts it into the push message to be notified and the corresponding Message ID, and stores them all in the data storage module. The data storage module is used to record and store message push notifications or query the message notification generation message queue, and sends the received message push notifications to the message push module.

[0059] Specifically, the business module in the private device stores the generated notification messages in the message queue of the data storage module; when the message push module receives the message push notification, it will push it to the platform according to the judgment, which can handle the push needs of multiple messages and multiple clients at the same time.

[0060] Specifically, the platform includes a management module, a forwarding module, and a caching module. The forwarding module is used to verify the identity of private devices, receive forwarding messages, and send them to the corresponding third-party vendor channels; the caching module is used to cache message data with a certain time limit, thereby supporting situations where there are network anomalies or third-party vendor channel system anomalies; the management module is used to coordinate and manage the device identifier (deviceToken) and other content of the client.

[0061] Specifically, the message push will be sent in a consistent time sequence to avoid multiple messages being pushed to the same client in a chaotic manner.

[0062] II. Platform Integration.

[0063] Taking a client-side app as an example, the client-side app generates a ClientUUID as a unique identifier for the corresponding user device, used for subsequent message push interfaces between the private device and the platform. It also integrates other selectable third-party vendor channels, such as Umeng Push Server and Huawei Push Server. The platform sets up a message push interface for the private device, using boxRegKey authentication to verify the device's identity information. It determines the push channel based on the client-side app's status and uses the ClientUUID to identify the target push device for targeted message push. The platform sets up a deviceToken registration interface for the client-side app. This deviceToken corresponds one-to-one with the ClientUUID previously generated on the app side. The deviceToken is the device identity identifier obtained when the app integrates the third-party vendor channel SDK and must be registered with the platform. Specifically, the platform relays pushed messages without reading or recording the message data, only transmitting the Message ID. The message sequence forwarded by the platform to Umeng or third-party vendor channels is not determined by the platform but is guaranteed based on the selected Umeng or third-party vendor.

[0064] Here are the specific steps for users to receive push notifications, using a client-side app as an example:

[0065] 1. The app comes pre-installed with PushSDKs from third-party vendors such as Umeng and Huawei. When the user's app is online, push notifications are sent directly within the app. When the user's app is offline, push notifications are sent via Umeng or other third-party vendor channels. The app can obtain the deviceToken by calling the Umeng SDK interface.

[0066] 2. The APP reports the obtained deviceToken to the platform;

[0067] 3. The private device and the platform management module use the stored deviceToken to call the API provided by Umeng (Push server) to push Push messages.

[0068] 4. The Umeng Push server will receive the Push message from the platform and forward it to the user device corresponding to the deviceToken through other third-party vendor Push servers. The device will then receive the Push message.

[0069] Optionally, when other third-party push servers detect a device's response message, they send a response status receipt to the Umeng push server, which can then display a notification on the app.

[0070] III. Architecture of the message push module between the client and the private device.

[0071] The message push module establishes a long polling mechanism with the client that sends the request, responsible for receiving push notifications, encrypting push data, and accurately pushing it to the platform. After receiving a business request for a push message from the client, the message push module stores it in the main message queue `push_notification`. If multiple clients simultaneously send push messages to the private device, each client will form its own separate message queue, arranged by its corresponding `ClientUUID`.

[0072] Specifically, business request messages from the business module will directly enter the main message queue `push_notification` of the message push module. Based on the client's status, the message is extracted, split, and stored in the corresponding message queue, while also being automatically stored to support later retrieval. If the client (APP) is online, the message is sent to a separate queue corresponding to the client's `ClientUUID`; if the client (APP) is offline, `push_notification_platform` is sent to push the message to the platform, which then pushes the message to the corresponding device according to the second aspect mentioned above.

[0073] Specifically, the client side is equipped with an interface polling function to read and determine whether there is message backlog in the current ClientUUID individual message queue. If message backlog is detected, it is directly returned to the interface.

[0074] Specifically, the client status is determined using the ClientUUID's timestamp as a reference. When a poll request carries an encrypted access token, the private device saves the corresponding ClientUUID and timestamp. If the corresponding timestamp is greater than 1 minute, the client is considered offline by default. If the user actively disconnects, the timestamp will display a preset indicator, which also represents offline. After determining that the client is offline, a scheduled task will check the push_notification_platform queue at preset intervals (e.g., 3 seconds) to avoid the possibility of missed message forwarding.

[0075] The specific steps of the operation of the private device processing module are as follows: Figure 2 :

[0076] 1. The client initiates a message push request to start a thread. The private device service module receives the service request for the message to be pushed from the client. The data storage module records and stores the message push notification or queries the message notification to generate a message queue, and sends the received message push notification to the message push module.

[0077] 2. After receiving the message, the push module determines the client's online status based on the message queue and the client's ClientUUID timestamp. If the client is online, the message is sent to a separate queue corresponding to the client's ClientUUID; if the client is offline, a push_notification_platform message is sent to forward the message to the platform.

[0078] 3. When the client is online, it accesses the poll interface carrying the accessToken. In non-blocking mode, the message push module reads messages from the data storage module and obtains the ClientUUID from the acquired accessToken. Messages read by the message push module are automatically stored in the database as historical records, forming a message body containing symmetric key encryption information, which is then returned to the client. If the message push module does not receive a message, it will use a blocking mode, suspending the current thread. If no message is received within a preset time range, an empty message body is returned after a timeout. If a message is received within the preset time range, the process is the same as above: it is read and directly returned to the client, and also stored in the database.

[0079] 4. When the client is offline, it will check the messages in the push_notification_platform queue for a set time period.

[0080] Although specific embodiments and accompanying drawings of the invention have been disclosed for illustrative purposes to aid in understanding and implementing the invention, those skilled in the art will understand that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the invention and the appended claims. Therefore, the invention should not be limited to the content disclosed in the preferred embodiments and drawings, and the scope of protection claimed by the invention is defined by the claims.

Claims

1. A message push method, applied to a private device that has established a trust relationship with a client, characterized in that, The method includes: Obtain the ClientUUID of the client, and generate the main message queue based on the client's business request containing the message to be pushed; Consume the main message queue to obtain a message push notification containing the message to be pushed and the Message ID and type corresponding to the message to be pushed. Based on the ClientUUID of the client, determine whether the client is online; When the client is online, the message push notification will be sent to the client; When the client is offline, the client's ClientUUID, the Message ID, the type, and the private device ID are sent to the platform so that information can be transmitted between the platform and a third-party platform based on the client's ClientUUID, and the client can obtain the message to be pushed from the private device based on the Message ID, the type, and the private device ID. The step of sending the client's ClientUUID, MessageID, type, and private device ID to the platform when the client is offline includes: Based on the ClientUUID of the client, the Message ID and type of the push notification, and the private device ID, an offline message queue is generated; Set a preset time range; Suspend the thread corresponding to the offline message queue; If the client is determined to be online within the preset time range, a client message queue is generated based on the message push notification, and the client message queue is pushed to the client so that the client can obtain the message to be pushed through the encrypted poll interface; If the client is determined to be offline within the preset time range, the offline message queue is sent to the platform. Wherein, the platform, based on the client's ClientUUID, and after transmitting the Message ID to the client through a third-party platform, allows the client to retrieve the message to be pushed from the private device based on the Message ID, the type, and the private device ID, including: The platform obtains the deviceToken of all clients by calling the SDK interface of the third-party platform through the client. The platform obtains the deviceToken corresponding to the client based on the client's ClientUUID, generates a Push message containing the Message ID, the type, and the private device ID, and then sends the deviceToken and the Push message to the third-party platform. The third-party platform pushes the Push message to the client based on the deviceToken; The client accesses the private device based on the Push message to obtain the message to be pushed.

2. The method as described in claim 1, characterized in that, The determination of whether the client is online based on the client's ClientUUID includes: Establish long polling with the client; When a client requests the poll interface with an encrypted access token, the timestamp of the ClientUUID is saved. If the difference between the current time and the timestamp is greater than a set value, or if a preset identifier is detected, the client is determined to be offline; wherein, the preset identifier indicates that the client actively disconnected. If the difference between the current time and the timestamp is less than a set value, and no preset identifier is found, the client is determined to be online.

3. The method as described in claim 1, characterized in that, The step of pushing the message notification to the client includes: Based on the message push notification, a client message queue is generated; The client message queue is pushed to the client so that the client can obtain the message to be pushed through the encrypted poll interface.

4. The method as described in claim 1, characterized in that, The third-party platform pushes the Push message to the client based on the deviceToken, including: Retrieve all push messages from this client; Establish a push message sequence for all push messages; Based on the Push message timing, Push messages are pushed to the client sequentially.

5. The method as described in claim 1, wherein the third-party platform comprises: Umeng Push Server, Huawei Push Server, Xiaomi Push Server, Huawei OAuth Service, or Xiaomi Account Service.

6. A message push system, characterized in that, The system includes: The client is used to provide the client's ClientUUID and the business request containing the message to be pushed; A private device is used to obtain the ClientUUID of a client and generate a main message queue based on the client's business request containing the message to be pushed; consume the main message queue to obtain a message push notification containing the message to be pushed and the Message ID and type corresponding to the message to be pushed; determine whether the client is online based on the client's ClientUUID; if the client is online, push the message push notification to the client; if the client is offline, send the client's ClientUUID, the Message ID, the type, and the private device ID to the platform; The platform is used to send the client's ClientUUID, the MessageID, the type, and the private device ID to a third-party platform based on the client's ClientUUID; A third-party platform is used to send the Message ID, the type, and the private device ID to the client based on the client's ClientUUID; Specifically, when the client is offline, sending the client's ClientUUID, Message ID, type, and private device ID to the platform includes: Based on the ClientUUID of the client, the Message ID and type of the push notification, and the private device ID, an offline message queue is generated; Set a preset time range; Suspend the thread corresponding to the offline message queue; If the client is determined to be online within the preset time range, a client message queue is generated based on the message push notification, and the client message queue is pushed to the client so that the client can obtain the message to be pushed through the encrypted poll interface; If the client is determined to be offline within the preset time range, the offline message queue is sent to the platform. Wherein, the platform, based on the client's ClientUUID, and after transmitting the Message ID to the client through a third-party platform, allows the client to retrieve the message to be pushed from the private device based on the Message ID, the type, and the private device ID, including: The platform obtains the deviceToken of all clients by calling the SDK interface of the third-party platform through the client. The platform obtains the deviceToken corresponding to the client based on the client's ClientUUID, generates a Push message containing the Message ID, the type, and the private device ID, and then sends the deviceToken and the Push message to the third-party platform. The third-party platform pushes the Push message to the client based on the deviceToken; The client accesses the private device based on the Push message to obtain the message to be pushed.

7. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1-5.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Mobile pushing method and system supporting offline message storage

    CN108055199A

  • Message pushing method and device, computer equipment and storage medium

    CN111385330A

  • Pushing Secure Notifications to Mobile Computing Devices

    US20130084896A1