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

By obtaining and prioritizing device tokens to dynamically adjust the message push channel, the message push failure problem caused by network and service differences in a single channel is solved, and the stability and continuity of message push is improved.

CN119766770AActive Publication Date: 2025-04-04ZKTECO CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411633737.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-04-04
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Due to differences in network and service in areas without use, using a single message push channel will lead to message push failure and the stability of message push is reduced.

Method used

By obtaining the device token with execution order, the device token ranked first is preferred as the target device token, and a message push request is generated to send it to the target push service channel. If the initial push fails, select the next device token and repeat the above process until the message push is successful.

Benefits of technology

By dynamically adjusting the message push channel, the failure of message push is avoided and the stability and continuity of the message push service is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766770A_ABST
    Figure CN119766770A_ABST
Patent Text Reader

Abstract

The invention discloses a message pushing method and device, computer equipment and a readable storage medium, relates to the technical field of Internet, and solves the problems that at present, due to network and service differences of different regions, a single message pushing channel is used, so that message pushing fails, and the stability of message pushing is reduced. The method comprises the following steps: selecting a first device token from at least one device token as a first target device token, generating and sending a first message push request to enable a first target push service channel to return first push result information, and if the first push result information indicates that message push fails, sending a second message push request to the first target device token; and if yes, selecting the second device token from the at least one device token as a second target device token, generating and sending a second message push request, so that a second target push service channel returns second push result information, and repeating the operation until the final push result information indicates that the message is successfully pushed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a message push method, apparatus, computer equipment, readable storage medium and computer program product. Background Art

[0002] With the accelerated development of the Internet, the amount of content information generated on the Internet is not only huge, but also increasing at a high speed every day. With the development of instant messaging technology, communication between people has become faster. For example, user A uses instant messaging software a to chat with user B through instant messaging software b. In order to improve the security and privacy of information interaction, it is often necessary to use a message push channel as a bridge for information interaction between user A and user B, and user A uses instant messaging software a to send the message to be sent to user B's instant messaging software b through the message push channel. However, in cross-border usage scenarios, for example, user A is in the United States and user B is in China. Due to differences in networks and services in different regions, using a single message push channel will lead to failure of message push and reduced stability of message push. Summary of the invention

[0003] The embodiments of the present application provide a message push method, apparatus, computer device, readable storage medium and computer program product, the main purpose of which is to solve the current problem that due to differences in networks and services in different regions, the use of a single message push channel will lead to message push failure and reduced stability of message push.

[0004] According to the first aspect of the present application, a message push method is provided, comprising:

[0005] In response to the message sending signal, determining the message to be pushed and specific identification information of the message recipient, and obtaining at least one device token with an execution order;

[0006] Selecting the first device token from the at least one device token having an execution order as the first target device token, and generating a first message push request based on the message to be pushed, the specific identification information and the first target device token, and sending the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving a first response result returned by the message recipient, it generates and returns first push result information based on the first response result;

[0007] If the first push result information indicates that the message push fails, the second device token ranked second is selected from the at least one device token with an execution order as the second target device token, and a second message push request is generated based on the message to be pushed, the specific identification information and the second target device token, and the second message push request is sent to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates the first push result information based on the second response result and returns it, and repeats the above operation until the final push result information indicates that the message push is successful.

[0008] Optionally, before responding to the message sending signal, determining the message to be pushed and the specific identification information of the message recipient, and acquiring at least one device token with an execution order, the method further includes:

[0009] In response to a channel address acquisition signal, acquire multiple push service channel addresses associated with the channel address acquisition signal, generate a corresponding token acquisition request based on each push service channel address, and send the token acquisition request to the push service channel indicated by the corresponding push service channel address, so that the push service channel generates and returns a corresponding device token in response to the token acquisition request;

[0010] Obtain at least one device token, determine the priority of each device token in the at least one device token, mark each device token according to the priority, obtain the at least one device token with an execution order, and store the at least one device token with an execution order.

[0011] Optionally, after obtaining at least one device token, the method further includes:

[0012] An asymmetric encryption algorithm is used to encrypt each of the at least one device token to obtain at least one encrypted device token.

[0013] Optionally, after encrypting each of the at least one device token using an asymmetric encryption algorithm to obtain at least one encrypted device token, the method further includes:

[0014] Determine the applicable region information of the push service channel indicated by each encrypted device token, and mark the corresponding encrypted device token with the applicable region information to obtain at least one marked device token;

[0015] Storing the at least one marked device token;

[0016] In response to a message push request, obtaining the message to be pushed and specific identification information of the message recipient carried in the message push request, and obtaining at least one device token after the annotation;

[0017] Acquire the current location information of the message sender, and select a device token whose current location information matches the applicable area information from the at least one marked device token as a target device token;

[0018] A message push request is generated based on the message to be pushed, the specific identification information and the target device token, and the message push request is sent to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the message to be pushed and the specific identification information from the message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information.

[0019] Optionally, before responding to the message sending signal, determining the message to be pushed and the specific identification information of the message recipient, and acquiring at least one device token with an execution order, the method further includes:

[0020] Obtain a device token list, the device token list including multiple detection push service channel addresses and a device token corresponding to each detection push service channel address;

[0021] Extracting multiple detection push service channel addresses from the device token list, and generating multiple detection requests based on the multiple detection push service channel addresses, wherein each detection request corresponds to a detection push service channel address;

[0022] Sending a corresponding detection request to the detection push service channel indicated by each detection push service channel address, so that each detection push service channel generates and returns a corresponding detection result in response to the detection request;

[0023] If a detection result returned by a detection push service channel is not received within a preset time interval, it is determined that the device token corresponding to the detection push service channel has changed, and a token acquisition request is resent to the detection push service channel, so that the detection push service channel generates and returns an updated device token in response to the token acquisition request;

[0024] The updated device token corresponding to the detection push service channel is used to replace the corresponding device token in the device token list to obtain an updated device token list, and the updated device token list is stored.

[0025] Optionally, the method further comprises:

[0026] In response to a message sending signal, determining the message to be pushed, the region information of the message sender and the specific identification information of the message receiver, and selecting a device token from the at least one device token having an execution order as a target device token;

[0027] Acquire a sensitive information blacklist associated with the area information, and determine that the sensitive information blacklist includes multiple sensitive information;

[0028] Using a semantic matching algorithm to match the message to be pushed with each of the multiple sensitive information to obtain a matching result, and when it is determined that the matching result indicates that the message to be pushed has target content that matches one of the multiple sensitive information, covering the target content with a preset color or replacing the target content with a preset symbol to obtain the processed information to be pushed;

[0029] A message push request is generated based on the processed message to be pushed, the specific identification information and the target device token, and the message push request is sent to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the processed message to be pushed and the specific identification information from the message push request, and pushes the processed message to be pushed to the message recipient indicated by the specific identification information.

[0030] According to the second aspect of the present application, a message push device is provided, including:

[0031] A determination module, configured to determine, in response to a message sending signal, the message to be pushed and the specific identification information of the message recipient carried in the message sending request, and to obtain at least one device token with an execution order;

[0032] A first push module, configured to select a first device token from the at least one device token having an execution order as a first target device token, generate a first message push request based on the message to be pushed, the specific identification information and the first target device token, and send the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to a message recipient indicated by the specific identification information, and when receiving a first response result returned by the message recipient, generates and returns first push result information based on the first response result;

[0033] A second push module is used to select the second device token from at least one device token with an execution order as the second target device token if the first push result information indicates that the message push fails, and generate a second message push request based on the message to be pushed, the specific identification information and the second target device token, and send the second message push request to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates and returns the first push result information based on the second response result, and repeats the above operation until the final push result information indicates that the message push is successful.

[0034] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0035] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0036] According to a fifth aspect of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0037] By means of the above technical scheme, the present application provides a message push method, apparatus, computer equipment, readable storage medium and computer program product. When receiving a message sending signal, the present application can obtain at least one device token with an execution order, and preferentially select the device token ranked first from at least one device token as the target device token, and preferentially send the message push request to the target push service channel indicated by the target device token. The target push service channel will send the push message carried by the message push request to the corresponding message recipient. At the same time, it will also receive a response result returned by the message recipient. The response result is used to indicate whether the message is pushed successfully. The target push service channel will generate push result information based on the response result, and push the push result information to the consumer sender. The message sender determines whether the message push is successful based on the push result information. If not, other target device tokens will be selected in sequence, and the above operation will be repeated until the final push result information indicates that the message push is successful. Through the above process, the message push channel can be dynamically adjusted to avoid the failure of message push, thereby improving the stability and continuity of the message push service. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A flow chart of a message push method provided by an embodiment of the present application is shown;

[0039] Figure 2 A flowchart of another message push method provided by an embodiment of the present application is shown;

[0040] Figure 3A A schematic diagram of the structure of a message push device provided in an embodiment of the present application is shown;

[0041] Figure 3B A schematic diagram of the structure of a message push device provided in an embodiment of the present application is shown;

[0042] Figure 3C A schematic diagram of the structure of a message push device provided in an embodiment of the present application is shown;

[0043] Figure 3D A schematic diagram of the structure of a message push device provided in an embodiment of the present application is shown;

[0044] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0045] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0046] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0048] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0049] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0050] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0051] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0052] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0053] The present application embodiment provides a message push method, such as Figure 1 As shown, including:

[0054] 101. In response to a message sending signal, determine specific identification information of a message to be pushed and a message recipient, and obtain at least one device token having an execution order;

[0055] In the embodiment of the present application, the execution subject may be the message sender, and the message sender may be an application for sending messages, such as instant messaging software, etc., and the message sender may also be a client. For example, when user A and user B chat through WeChat, user A sends the relevant message to user B's WeChat through WeChat. This message interaction process requires a push service channel to push the message. In a specific application scenario, user A inputs the relevant message into the WeChat chat interface through the input method, and then user A triggers the send button. At this time, for the message sender, it is equivalent to receiving a message sending signal. After determining the message to be sent and the specific identification information of user B's WeChat (for example, appID), a pre-stored device token list can be obtained from a database or locally, and at least one device token with an execution order can be extracted from the device token list.

[0056] 102. Select the first device token from at least one device token having an execution order as the first target device token, and generate a first message push request based on the message to be pushed, specific identification information and the first target device token, and send the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the first response result returned by the message recipient, it generates and returns the first push result information based on the first response result.

[0057] 103. If the first push result information indicates that the message push fails, select the second device token from at least one device token with an execution order as the second target device token, and generate a second message push request based on the message to be pushed, the specific identification information and the second target device token, and send the second message push request to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, generates the first push result information based on the second response result and returns it, and repeats the above operation until the final push result information indicates that the message push is successful.

[0058] In the embodiment of the present application, in order to ensure the continuity and stability of the push service, the present application can realize message push through multiple channels, that is, when one channel fails to push, other channels can be selected for message push, and push failure will not occur. For example, two channels can be pre-configured to realize message push, Firebase Cloud Messaging (FCM) and Umeng Push. Firebase Cloud Messaging is applicable to the global scope, but it depends on the application of Google services, while Umeng Push focuses on the Chinese region and is particularly suitable for applications that need to work in the domestic network environment. For user A from China, the preferred push service channel is Umeng Push, and Firebase Cloud Messaging can be used as a backup for user A. When user A goes abroad, the priority of its push service channel has not changed, that is, Umeng Push is also preferred in other countries. At this time, due to the large difference between the network environment abroad and the network environment in China, the use of Umeng Push may cause the problem of message push failure, and user B who communicates online with user A cannot receive the message sent by user A. In this case, the backup Firebase Cloud Messaging Service can be selected for message push. In actual applications, many kinds of push service channels can be configured, such as universal a message push channel for country a, universal b message push channel for country b, universal c message push channel for country c, and so on. In this way, no matter which country user A goes to, he will choose the appropriate message push channel.

[0059] The method provided in the embodiment of the present application can obtain at least one device token with an execution order when receiving a message sending signal, and preferentially select the device token ranked first from the at least one device token as the target device token, and preferentially send the message push request to the target push service channel indicated by the target device token. The target push service channel will send the push message carried by the message push request to the corresponding message recipient. At the same time, it will also receive a response result returned by the message recipient. The response result is used to indicate whether the message is pushed successfully. The target push service channel will generate push result information based on the response result, and push the push result information to the consumer sender. The message sender determines whether the message push is successful based on the push result information. If not, other target device tokens will be selected in sequence, and the above operations will be repeated until the final push result information indicates that the message push is successful. Through the above process, the message push channel can be dynamically adjusted to avoid the failure of message push, thereby improving the stability and continuity of the message push service.

[0060] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation of this embodiment, the embodiment of the present application provides another message push method, such as Figure 2 As shown, including:

[0061] 201. Obtain at least one device token having an execution order, and store the at least one device token having an execution order.

[0062] In an embodiment of the present application, the message sender responds to the channel address acquisition signal, acquires multiple push service channel addresses associated with the channel address acquisition signal, and generates a corresponding token acquisition request based on each push service channel address, and sends the token acquisition request to the push service channel indicated by the corresponding push service channel address, so that the push service channel responds to the token acquisition request to generate and return the corresponding device token; in this way, at least one device token can be obtained, and at the same time, the priority of each device token in at least one device token is determined, and each device token is marked according to the priority to obtain at least one device token with an execution order, and the at least one device token with an execution order is stored. It should be noted that the developer has integrated the SDK (software development kit) of push services such as Firebase or Umeng in the application (which can be understood as the message sender). The startup of the application can be understood as a channel address acquisition signal, and then the application will automatically acquire multiple push service channel addresses.

[0063] It should be noted that if the push service channel is the Firebase Cloud Messaging Service, when the message sender attempts to obtain the Firebase device token, the Firebase Cloud Messaging Service will provide a callback interface. If the Firebase device token can be obtained, the callback function will return the Firebase device token. If the token acquisition fails, the callback function will return an error message. Common reasons for failure are: Service unavailable: The Firebase server fails or is inaccessible in a specific area (such as some areas prohibiting Google services). Permission problem: The user has not granted notification permission, resulting in the inability to generate a device token. Device environment problem: For example, the device does not support Google Play services (common in some areas of China). At the same time, when the message sender receives the error message, it will record the time when the error occurred, and repeat the operation of obtaining the Firebase device token within a preset time period after the error occurred. If the Firebase device token is still not successfully obtained within the preset time period, a fault message is generated based on the Firebase Cloud Messaging Service address and sent to the operation and maintenance personnel, so that the operation and maintenance personnel can determine the Firebase Cloud Messaging Service that has failed based on the Firebase Cloud Messaging Service address when receiving the fault message, and perform troubleshooting. At the same time, a troubleshooting log can be generated based on the time, location, and error information of the error so that developers or operation and maintenance personnel can analyze the problem later.

[0064] 202. Obtain at least one encrypted device token.

[0065] In an embodiment of the present application, after obtaining at least one device token, an asymmetric encryption algorithm may be used to encrypt each of the at least one device token to obtain at least one encrypted device token. In another optional implementation of an embodiment of the present application, an encryption algorithm may be used to encrypt each of the at least one device token. It should be noted that whether to use an asymmetric encryption algorithm or a symmetric encryption algorithm for encryption can be flexibly selected according to actual conditions. Encryption processing can ensure that the device token will not be stolen or modified by a third party during transmission.

[0066] It should be noted that after obtaining at least one encrypted device token, the push service channel can be selected according to priority, see step 203, or the push service channel can be dynamically selected according to the specific application scenario, see step 204.

[0067] 203. Select a target message push channel according to priority.

[0068] In an embodiment of the present application, a device token ranked first can be selected from at least one device token having an execution order as a first target device token, and a first message push request can be generated based on the message to be pushed, specific identification information and the first target device token, and the first message push request can be sent to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it can extract the message to be pushed and the specific identification information from the first message push request, and push the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the first response result returned by the message recipient, it can generate and return first push result information based on the first response result; if the first push result information indicates that the message push fails , then select the second device token from at least one device token with an execution order as the second target device token, and generate a second message push request based on the message to be pushed, the specific identification information and the second target device token, and send the second message push request to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates and returns the first push result information based on the second response result, and repeats the above operation until the final push result information indicates that the message push is successful.

[0069] 204. Select a target message push channel according to the current location information.

[0070] In an embodiment of the present application, in addition to selecting a push service channel according to priority, a push service channel can also be dynamically selected according to a specific application scenario, that is, after obtaining at least one encrypted device token, determine the applicable area information of the push service channel indicated by each encrypted device token, use the applicable area information to mark the corresponding encrypted device token to obtain at least one marked device token; store the at least one marked device token; in response to a message push request, obtain the message to be pushed and the specific identification information of the message recipient carried by the message push request, and obtain at least one marked device token; obtain the current location information of the message sender, and select a device token whose current location information matches the applicable area information from the at least one marked device token as the target device token; generate a message push request based on the message to be pushed, the specific identification information and the target device token, and send the message push request to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the message to be pushed and the specific identification information from the message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information. In other words, the channel can be adjusted dynamically based on the current location information of the message sender. For example, if the location is abroad, the Firebase channel will be used first, and if the location is in China, the Umeng channel will be used first. The channel can also be adjusted dynamically based on the message sender's historical push results. For example, if the Firebase push fails twice in a row, the Umeng push will be used first in the next push.

[0071] 205. Update the device token.

[0072] In the embodiment of the present application, the device token is not permanently valid, and the Firebase cloud messaging service will update the device token from time to time. This means that the message sender needs to monitor the change event of the device token, and re-acquire and upload it to the message sender when the device token is updated, that is, first obtain the device token list, the device token list includes multiple detection push service channel addresses and the device token corresponding to each detection push service channel address; then extract multiple detection push service channel addresses from the device token list, and generate multiple detection requests based on the multiple detection push service channel addresses, wherein each detection request corresponds to a detection push service channel address; then send the corresponding detection request to the detection push service channel indicated by each detection push service channel address, so that each detection push service channel generates and returns the corresponding detection result in response to the detection request; if the detection result returned by a detection push service channel is not received within the preset time interval, it is determined that the device token corresponding to the detection push service channel has changed, and re-send the token acquisition request to the detection push service channel, so that the detection push service channel generates and returns the updated device token in response to the token acquisition request; finally, the updated device token corresponding to the detection push service channel is used to replace the corresponding device token in the device token list, obtain the updated device token list, and store the updated device token list.

[0073] In addition to the above-mentioned message push method, the embodiment of the present application also provides another message push method, that is, the message sender determines the message to be pushed, the area information of the message sender and the specific identification information of the message receiver in response to the message sending signal, and selects a device token as the target device token from at least one device token with an execution order; obtains a sensitive information blacklist associated with the area information, and determines that the sensitive information blacklist includes multiple sensitive information; uses a semantic matching algorithm to match the message to be pushed with each sensitive information in the multiple sensitive information to obtain a matching result, and when it is determined that the matching result indicates that the message to be pushed has target content that matches one of the multiple sensitive information, uses a preset color to color the target content. Overwrite the message to be pushed, or replace the target content with a preset symbol to obtain the processed information to be pushed; generate a message push request based on the processed message to be pushed, specific identification information (appID, an appID is usually bound to a specific application service, which can help the push service system identify different applications and ensure that the push message can be correctly sent to the specified application) and the target device token, and send the message push request to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the processed message to be pushed and the specific identification information from the message push request, and pushes the processed message to be pushed to the message recipient indicated by the specific identification information. Sensitive information can be understood as drug trafficking, pornography, and gun information. For example, these contents are not sensitive information in the United States, but they are sensitive information in China. Through the above process, sensitive information can be localized, cross-border data transmission can be avoided, and the secure transmission of data can be ensured in accordance with local laws, regulations and cultural practices.

[0074] The method provided in the embodiment of the present application can obtain at least one device token with an execution order when receiving a message sending signal, and preferentially select the device token ranked first from the at least one device token as the target device token, and preferentially send the message push request to the target push service channel indicated by the target device token. The target push service channel will send the push message carried by the message push request to the corresponding message recipient. At the same time, it will receive a response result returned by the message recipient, and the response result is used to indicate whether the message is pushed successfully. The target push service channel will generate push result information based on the response result, and push the push result information to the consumer sender. The message sender determines whether the message push is successful based on the push result information. If not, other target device tokens will be selected in sequence, and the above operations will be repeated until the final push result information indicates that the message push is successful. Through the above process, the message push channel can be dynamically adjusted to avoid the failure of message push, thereby improving the stability and continuity of the message push service.

[0075] Further, as Figure 1 The specific implementation of the method is as follows: Figure 3A As shown, an embodiment of the present invention provides a message pushing device, including: a determination module 301 , a first pushing module 302 and a second pushing module 303 .

[0076] The determination module 301 is used to determine the message to be pushed and the specific identification information of the message recipient carried by the message sending request in response to the message sending signal, and to obtain at least one device token with an execution order;

[0077] The first push module 302 is used to select the first device token from the at least one device token having an execution order as the first target device token, and generate a first message push request based on the message to be pushed, the specific identification information and the first target device token, and send the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the first response result returned by the message recipient, it generates and returns first push result information based on the first response result;

[0078] The second push module 303 is used to select the second device token from the at least one device token with an execution order as the second target device token if the first push result information indicates that the message push fails, and generate a second message push request based on the message to be pushed, the specific identification information and the second target device token, and send the second message push request to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates and returns the first push result information based on the second response result, and repeats the above operation until the final push result information indicates that the message push is successful.

[0079] In specific application scenarios, such as Figure 3B As shown, the device also includes: an acquisition module 304.

[0080] The acquisition module 304 is used to respond to a channel address acquisition signal, acquire multiple push service channel addresses associated with the channel address acquisition signal, and generate a corresponding token acquisition request based on each push service channel address, and send the token acquisition request to the push service channel indicated by the corresponding push service channel address, so that the push service channel responds to the token acquisition request to generate and return a corresponding device token; obtain at least one device token, determine the priority of each device token in the at least one device token, mark each device token according to the priority, obtain the at least one device token with an execution order, and store the at least one device token with an execution order.

[0081] In specific application scenarios, such as Figure 3B As shown, the device also includes: an encryption module 305.

[0082] The encryption module 305 is used to encrypt each device token in the at least one device token using an asymmetric encryption algorithm to obtain at least one encrypted device token.

[0083] In specific application scenarios, such as Figure 3B As shown, the device further includes: a marking module 306 and a third pushing module 307 .

[0084] The marking module 306 is used to determine the applicable area information of the push service channel indicated by each encrypted device token, mark the corresponding encrypted device token with the applicable area information, and obtain at least one marked device token; and store the at least one marked device token;

[0085] The third push module 307 is used to respond to a message push request, obtain the message to be pushed and the specific identification information of the message recipient carried by the message push request, and obtain at least one device token after the annotation; obtain the current location information of the message sender, and select a device token whose current location information matches the applicable area information from the at least one device token after the annotation as the target device token; generate a message push request based on the message to be pushed, the specific identification information and the target device token, and send the message push request to the target push service channel indicated by the target device token, so that the target push service channel extracts the message to be pushed and the specific identification information from the message push request when receiving the message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information.

[0086] In specific application scenarios, such as Figure 3C As shown, the device also includes: a detection module 308.

[0087] The detection module 308 is used to obtain a device token list, which includes multiple detection push service channel addresses and a device token corresponding to each detection push service channel address; extract multiple detection push service channel addresses from the device token list, and generate multiple detection requests based on the multiple detection push service channel addresses, wherein each detection request corresponds to a detection push service channel address; send a corresponding detection request to the detection push service channel indicated by each detection push service channel address, so that each detection push service channel generates and returns a corresponding detection result in response to the detection request; if a detection result returned by a detection push service channel is not received within a preset time interval, it is determined that the device token corresponding to the detection push service channel has changed, and a token acquisition request is re-sent to the detection push service channel, so that the detection push service channel generates and returns an updated device token in response to the token acquisition request; the corresponding device token in the device token list is replaced with the updated device token corresponding to the detection push service channel to obtain an updated device token list, and the updated device token list is stored.

[0088] In specific application scenarios, such as Figure 3D As shown, the device further includes: a selection module 309 , a matching module 310 and a fourth pushing module 311 .

[0089] The determination module 309 is used to determine the message to be pushed, the region information of the message sender and the specific identification information of the message receiver in response to the message sending signal, and select a device token from the at least one device token having the execution order as the target device token;

[0090] The matching module 310 is used to obtain a sensitive information blacklist associated with the area information, determine that the sensitive information blacklist includes multiple sensitive information; use a semantic matching algorithm to match the message to be pushed with each sensitive information in the multiple sensitive information to obtain a matching result, and when it is determined that the matching result indicates that the message to be pushed has target content that matches one of the multiple sensitive information, cover the target content with a preset color, or replace the target content with a preset symbol to obtain the processed information to be pushed;

[0091] The fourth push module 311 is used to generate a message push request based on the processed message to be pushed, the specific identification information and the target device token, and send the message push request to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the processed message to be pushed and the specific identification information from the message push request, and pushes the processed message to be pushed to the message recipient indicated by the specific identification information.

[0092] The device provided in the embodiment of the present application can obtain at least one device token with an execution order when receiving a message sending signal, and preferentially select the device token ranked first from the at least one device token as the target device token, and preferentially send the message push request to the target push service channel indicated by the target device token. The target push service channel will send the push message carried by the message push request to the corresponding message recipient. At the same time, it will receive a response result returned by the message recipient, and the response result is used to indicate whether the message is pushed successfully. The target push service channel will generate push result information based on the response result, and push the push result information to the consumer sender. The message sender determines whether the message push is successful based on the push result information. If not, other target device tokens will be selected in sequence, and the above operations will be repeated until the final push result information indicates that the message push is successful. Through the above process, the message push channel can be dynamically adjusted to avoid the failure of message push, thereby improving the stability and continuity of the message push service.

[0093] It should be noted that for other corresponding descriptions of the functional units involved in the message push device provided in the embodiment of the present invention, reference can be made to Figure 1 and FIG. 3A to FIG. 3D The corresponding description in will not be repeated here.

[0094] In an exemplary embodiment, see Figure 4 , and also provides a computer device, which includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the message push method in the above embodiment.

[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0096] The present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the electronic message push method are implemented.

[0097] The present application also provides a computer program product, including a computer program, which implements the steps of the message push method described above when executed by a processor.

[0098] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.

[0099] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0100] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.

[0101] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A message push method, characterized in that: include: In response to the message sending signal, determining the message to be pushed and specific identification information of the message recipient, and obtaining at least one device token with an execution order; Selecting the first device token from the at least one device token having an execution order as the first target device token, and generating a first message push request based on the message to be pushed, the specific identification information and the first target device token, and sending the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving a first response result returned by the message recipient, it generates and returns first push result information based on the first response result; If the first push result information indicates that the message push fails, the second device token ranked second is selected from the at least one device token with an execution order as the second target device token, and a second message push request is generated based on the message to be pushed, the specific identification information and the second target device token, and the second message push request is sent to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates the first push result information based on the second response result and returns it, and repeats the above operation until the final push result information indicates that the message push is successful.

2. The message push method according to claim 1, characterized in that: Before the method of determining the message to be pushed and the specific identification information of the message recipient in response to the message sending signal, and obtaining at least one device token with an execution order, further includes: In response to a channel address acquisition signal, acquire multiple push service channel addresses associated with the channel address acquisition signal, generate a corresponding token acquisition request based on each push service channel address, and send the token acquisition request to the push service channel indicated by the corresponding push service channel address, so that the push service channel generates and returns a corresponding device token in response to the token acquisition request; Obtain at least one device token, determine the priority of each device token in the at least one device token, mark each device token according to the priority, obtain the at least one device token with an execution order, and store the at least one device token with an execution order.

3. The message push method according to claim 2, characterized in that: After obtaining at least one device token, the method further includes: An asymmetric encryption algorithm is used to encrypt each of the at least one device token to obtain at least one encrypted device token.

4. The message push method according to claim 3, characterized in that: After the asymmetric encryption algorithm is used to encrypt each of the at least one device token to obtain at least one encrypted device token, the method further includes: Determine the applicable region information of the push service channel indicated by each encrypted device token, and mark the corresponding encrypted device token with the applicable region information to obtain at least one marked device token; Storing the at least one marked device token; In response to a message push request, obtaining the message to be pushed and specific identification information of the message recipient carried in the message push request, and obtaining at least one device token after the annotation; Acquire the current location information of the message sender, and select a device token whose current location information matches the applicable area information from the at least one marked device token as a target device token; A message push request is generated based on the message to be pushed, the specific identification information and the target device token, and the message push request is sent to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the message to be pushed and the specific identification information from the message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information.

5. The message push method according to claim 1, characterized in that: Before the method of determining the message to be pushed and the specific identification information of the message recipient in response to the message sending signal, and obtaining at least one device token with an execution order, further includes: Obtain a device token list, the device token list including multiple detection push service channel addresses and a device token corresponding to each detection push service channel address; Extracting multiple detection push service channel addresses from the device token list, and generating multiple detection requests based on the multiple detection push service channel addresses, wherein each detection request corresponds to a detection push service channel address; Sending a corresponding detection request to the detection push service channel indicated by each detection push service channel address, so that each detection push service channel generates and returns a corresponding detection result in response to the detection request; If a detection result returned by a detection push service channel is not received within a preset time interval, it is determined that the device token corresponding to the detection push service channel has changed, and a token acquisition request is resent to the detection push service channel, so that the detection push service channel generates and returns an updated device token in response to the token acquisition request; The updated device token corresponding to the detection push service channel is used to replace the corresponding device token in the device token list to obtain an updated device token list, and the updated device token list is stored.

6. The message push method according to claim 1, characterized in that: Also includes: In response to a message sending signal, determining the message to be pushed, the region information of the message sender and the specific identification information of the message receiver, and selecting a device token from the at least one device token having an execution order as a target device token; Acquire a sensitive information blacklist associated with the area information, and determine that the sensitive information blacklist includes multiple sensitive information; Using a semantic matching algorithm to match the message to be pushed with each of the multiple sensitive information to obtain a matching result, and when it is determined that the matching result indicates that the message to be pushed has target content that matches one of the multiple sensitive information, covering the target content with a preset color or replacing the target content with a preset symbol to obtain the processed information to be pushed; A message push request is generated based on the processed message to be pushed, the specific identification information and the target device token, and the message push request is sent to the target push service channel indicated by the target device token, so that when the target push service channel receives the message push request, it extracts the processed message to be pushed and the specific identification information from the message push request, and pushes the processed message to be pushed to the message recipient indicated by the specific identification information.

7. A message push device, characterized in that: include: A determination module, configured to determine, in response to a message sending signal, specific identification information of a message to be pushed and a message recipient, and to obtain at least one device token having an execution order; A first push module, configured to select a first device token from the at least one device token having an execution order as a first target device token, generate a first message push request based on the message to be pushed, the specific identification information and the first target device token, and send the first message push request to the first target push service channel indicated by the first target device token, so that when the first target push service channel receives the first message push request, it extracts the message to be pushed and the specific identification information from the first message push request, and pushes the message to be pushed to a message recipient indicated by the specific identification information, and when receiving a first response result returned by the message recipient, generates and returns first push result information based on the first response result; A second push module is used to select the second device token from at least one device token with an execution order as the second target device token if the first push result information indicates that the message push fails, and generate a second message push request based on the message to be pushed, the specific identification information and the second target device token, and send the second message push request to the second target push service channel indicated by the second target device token, so that when the second target push service channel receives the second message push request, it extracts the message to be pushed and the specific identification information from the second message push request, and pushes the message to be pushed to the message recipient indicated by the specific identification information, and when receiving the second response result returned by the message recipient, it generates and returns the first push result information based on the second response result, and repeats the above operation until the final push result information indicates that the message push is successful.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data processing method, server equipment and computer readable storage medium

    CN112367345A

  • Efficient routing between a mobile node and a correspondent node in a proxy mobile IP network

    US20100067446A1