Message pushing method, device and equipment

Automatically build a message body that adapts to the target channel through the message push platform, solving the complexity of message pushing for mobile banking applications between different channels, reducing development and maintenance costs, and improving user experience.

CN120434296APending Publication Date: 2025-08-05BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510607528.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the prior art, mobile banking applications need to build multiple types of message bodies for message push services from different channels, resulting in large workloads in development and maintenance, and frequent application updates affect the user experience.

Method used

Receive push requests through the message push platform, use the message body template of the pre-stored channel message push service to automatically build a message body that adapts to the target channel, and map the message content to the target message body template, and finally push it to the target channel.

Benefits of technology

It reduces the frequency of application updates on the sending side to adapt to changes in message push services from different channels, reduces development and maintenance costs, and improves message push efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434296A_ABST
    Figure CN120434296A_ABST
Patent Text Reader

Abstract

The invention discloses a message pushing method, device and equipment, the method is applied to a message pushing platform, the method comprises the following steps: receiving a message pushing request from a sending end, the message pushing request comprising message content and pushing configuration information; determining a target channel and a target message body template of the message content based on the pushing configuration information and a pre-stored message body template of each channel message pushing service; mapping the message content to a target message body template to obtain a target message body; and pushing the target message body to the target channel based on pre-stored address information of the target channel. On the basis of the application, the message body adaptive to the target channel can be automatically constructed according to the message push request of the sending end, so that the sending end does not need to pay attention to the specific message body structure requirement of each target channel, the frequency of application updating by the sending end to adapt to the message push service change of different channels is reduced, and the user experience is improved. Therefore, the development and maintenance cost is reduced, the message pushing efficiency is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message push method, device, and equipment. Background Art

[0002] Currently, various vendors offer push messaging services across multiple channels, including those based on operating systems like Android, iOS, and HarmonyOS. Each channel's push messaging service utilizes a unique message body structure tailored to different messaging scenarios. For example, HarmonyOS's push messaging service supports a wide variety of messaging scenarios, including notifications, background messages, and in-app call messages, each with a unique message body structure.

[0003] When an upstream system needs to use a specific channel's message push service to push messages to a downstream system, the upstream system needs to construct a message body of the corresponding type for different message scenarios to adapt to the requirements of the target channel's message push service, and then directly request the target channel's message push service. The target channel's message push service then pushes the message to the downstream system.

[0004] Taking mobile banking as an example, upstream and downstream mobile banking applications within its business ecosystem need to utilize push messaging to flexibly respond to complex and ever-changing business scenarios. Because the message body structure of each channel's push messaging service varies for different messaging scenarios, upstream mobile banking applications must construct multiple message body types to meet the needs of these scenarios. This undoubtedly increases the complexity of message body construction. Furthermore, whenever the message body structure of the target channel's push messaging service changes, upstream mobile banking applications must re-adapt, otherwise they risk functional limitations. This not only increases development and maintenance workload, but also can impact user experience due to frequent application updates. Summary of the Invention

[0005] In response to the above problems, the present application provides a message push method, device and equipment, which can automatically construct a message body adapted to the target channel according to the message push request of the upstream application, reducing the frequency of application updates at the sender to adapt to changes in message push services of different channels, and improving the user experience.

[0006] In a first aspect, the present application provides a message push method, which is applied to a message push platform, and the method includes:

[0007] Receive a message push request from a sender, the message push request including message content and push configuration information;

[0008] Determine the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel;

[0009] Mapping the message content to the target message body template to obtain a target message body;

[0010] Based on the pre-stored address information of the target channel, the target message body is pushed to the target channel.

[0011] In one possible implementation, the push configuration information includes channel information and a message type, and determining a target channel and a target message body template for the message content based on the push configuration information and pre-stored message body templates for each channel message push service includes:

[0012] Determining a target channel for the message content based on the channel information;

[0013] Determine the message body template of the target channel based on the pre-stored message body templates of the message push services of each channel;

[0014] A target message body template for the message content is determined from the message body templates of the target channel based on the message type.

[0015] In a possible implementation, mapping the message content to the target message body template to obtain the target message body includes:

[0016] Traversing the fields in the target message body template until all fields in the target message body template are filled, and then using the target message body template as the target message body; wherein, each time a field is traversed, executing the following process:

[0017] For any field traversed, the content corresponding to the any field is obtained from the message content, and the content corresponding to the any field is mapped to the position of the any field in the target message body template.

[0018] In one possible implementation, the method further includes:

[0019] The message push status of this message push request is recorded, and the message content and message operation log of this message push request are stored in the message queue corresponding to the sending end on the set distributed stream processing platform.

[0020] In one possible implementation, the method further includes:

[0021] Determining whether the target message body is successfully pushed to the target channel;

[0022] If the push is successful, the message push status is updated to pushed and the sending end is notified;

[0023] If the push fails, the target message body is pushed to the target channel again until the preset push stop condition is reached, and the message push status is updated according to the push result and the push result is notified to the sending end.

[0024] In a second aspect, the present application provides a message push method, applied to a sending end, the method comprising:

[0025] Generate a message push request; the message push request includes message content and push configuration information;

[0026] The message push request is sent to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body. Then, based on the pre-stored address information of the target channel, the target message body is pushed to the target channel.

[0027] In one possible implementation, the method further includes:

[0028] If a push failure result is received, the process returns to generate a message push request.

[0029] In a third aspect, the present application provides a message push device, the device comprising:

[0030] A push task receiving module is used to receive a message push request from a sending end, wherein the message push request includes message content and push configuration information;

[0031] A message body template selection module, configured to determine a target channel and a target message body template for the message content based on the push configuration information and pre-stored message body templates for each channel message push service;

[0032] A message body generation module, configured to map the message content to the target message body template to obtain a target message body;

[0033] The message body pushing module is used to push the target message body to the target channel based on the pre-stored address information of the target channel.

[0034] In a fourth aspect, the present application provides a message push device, the device comprising:

[0035] A push task generation module is used to generate a message push request; the message push request includes message content and push configuration information;

[0036] The push task sending module is used to send the message push request to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body, and then pushes the target message body to the target channel based on the pre-stored address information of the target channel.

[0037] In the fifth aspect, an embodiment of the present application provides a device comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the message push method as described in any one of the items provided in the first aspect of the present application, or to execute the message push method as described in any one of the items provided in the second aspect of the present application.

[0038] In the sixth aspect, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the terminal device can execute the message push method as described in any one of the first aspects of the present application, or execute the message push method as described in any one of the second aspects of the present application.

[0039] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:

[0040] The embodiment of the present application receives a message push request from the sender through a message push platform, determines the target channel and the corresponding target message body template based on the message content and push configuration information in the message push request and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to generate a target message body adapted to the target channel, and finally pushes the target message body to the target channel. Based on the present application, a message body adapted to the target channel can be automatically constructed according to the message push request of the sender, so that the sender does not need to pay attention to the specific message body structure requirements of each target channel, reducing the frequency of application updates by the sender to adapt to changes in message push services of different channels, thereby reducing development and maintenance costs, improving message push efficiency, and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 Schematic diagram of a message push scenario provided in an embodiment of the present application;

[0043] Figure 2 A flow chart of a message push method applied to a message push platform provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the system architecture provided in an embodiment of the present application;

[0045] Figure 4 Schematic diagram of the message push interaction process provided in the embodiment of the present application;

[0046] Figure 5 A schematic diagram of a message push device provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of another message push device provided in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of a message push device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] To make the purpose, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0050] The following explains some of the terms used in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0051] (1) Message push services across different channels: These refer to the message push services provided on different operating system platforms or application ecosystems. These message push services are primarily used in application scenarios where information needs to be sent to users in real time or at scheduled intervals, such as reminders of friend updates on social networks, promotional notifications on e-commerce platforms, and the latest information push from banking clients.

[0052] Each channel's message push service typically has its own specific technical specifications, interface standards, and message format requirements. For example:

[0053] Android platform: Google provides Firebase Cloud Messaging (FCM) as the official push messaging service, which supports sending messages to applications running on Android devices. Developers need to follow FCM's interface specifications to construct message request bodies and handle responses.

[0054] iOS: Apple Push Notification service (APNs) is a push notification solution for iOS devices. Similar to FCM, APNs defines its own unique message structure and communication protocol for sending notifications to apps on devices like iPhones and iPads.

[0055] Hongmeng Platform: A message push service provided for the HarmonyOS system, used to send notifications to applications on devices using the HarmonyOS system.

[0056] (2) Sending end and receiving end: The sending end refers to the party responsible for initiating the message push request in the application scenario of the above-mentioned message push service, and the receiving end refers to the entity that ultimately receives and displays the message, usually a user device with a specific application installed. The sending end in the embodiment of the present application can be either an upstream server or an application running on a mobile phone. In a multi-channel environment, each time the sending end of the prior art pushes a message to the receiving end, it needs to construct a message body of the corresponding type to adapt to the requirements of the message push service of the target channel.

[0057] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.

[0058] The terms "first," "second," and similar terms used in the present invention do not indicate any order, quantity, or importance, but are only used to distinguish different components. Terms such as "include" or "comprising" mean that the elements or objects preceding the term include the elements or objects listed after the term and their equivalents, but do not exclude other elements or objects. The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that can perform the functions associated with the component.

[0059] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.

[0060] Currently, various vendors offer push messaging services across multiple channels, including those based on operating systems like Android, iOS, and HarmonyOS. Each channel's push messaging service utilizes a unique message body structure tailored to different messaging scenarios. For example, HarmonyOS's push messaging service supports a wide variety of messaging scenarios, including notifications, background messages, and in-app call messages, each with a unique message body structure.

[0061] When an upstream system needs to use a specific channel's message push service to push messages to a downstream system, the upstream system needs to construct a message body of the corresponding type for different message scenarios to adapt to the requirements of the target channel's message push service, and then directly request the target channel's message push service. The target channel's message push service then pushes the message to the downstream system.

[0062] like Figure 1 The figure shows a schematic diagram of a message push scenario in the prior art provided by an embodiment of the present application. Taking mobile banking as an example, the upstream and downstream mobile banking applications in its business ecosystem need to flexibly respond to complex and changing business scenarios through the message push function. The upstream mobile banking application needs to build a message body that adapts to the target channel, and then directly request the message push service of the target channel. The message push service of the target channel then pushes the message to the downstream mobile banking application. In addition, since the message body structure of the message push service of each channel is different for different message scenarios, the upstream mobile banking application needs to build multiple types of message bodies to meet the needs of the business scenarios, which undoubtedly increases the complexity of building the message body. Moreover, whenever the message body structure of the message push service of the target channel changes, the upstream mobile banking application needs to be re-adapted, otherwise it will face the risk of functional limitations. This not only increases the workload of development and maintenance, but may also affect the user experience due to frequent application updates.

[0063] In view of the above problems, the embodiments of the present application provide a message push method, apparatus and equipment. The embodiments of the present application receive a message push request from a sender through a message push platform, determine the target channel and the corresponding target message body template based on the message content and push configuration information in the message push request and the pre-stored message body templates of the message push services of each channel, and map the message content to the target message body template to generate a target message body adapted to the target channel, and finally push the target message body to the target channel. Based on the present application, a message body adapted to the target channel can be automatically constructed according to the message push request of the sender, so that the sender does not need to pay attention to the specific message body structure requirements of each target channel, reducing the frequency of application updates by the sender to adapt to changes in message push services of different channels, thereby reducing development and maintenance costs, improving message push efficiency and enhancing user experience.

[0064] To further illustrate the technical solution provided by the embodiment of the present application, the message push method provided by the exemplary embodiment of the present application is described below in conjunction with the accompanying drawings. Figure 1 The application scenarios are shown only to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0065] like Figure 2 FIG. 2 is a flow chart of a message push method applied to a message push platform provided by an embodiment of the present application. The method includes the following steps S201 to S204.

[0066] Step S201: receiving a message push request from a sending end, where the message push request includes message content and push configuration information.

[0067] In an embodiment of the present application, a message push platform receives a message push request initiated by a sender. The message push request includes the specific message content to be pushed and push configuration information indicating the sender's push requirements. Exemplarily, the push configuration information in this embodiment of the present application includes, but is not limited to, target channel information, message type information, and push policy information.

[0068] Among them, the target channel information is used to indicate which channels (such as Android, iOS, HarmonyOS, etc.) the message will be pushed to; the message type information is used to indicate the specific type of the message. The specific type of the message in this application is associated with the message body template of the channel, such as notification messages, background messages, in-app call messages, etc. The message body structure in each message scenario is different, so based on the message type information, the message content can be correctly parsed and the corresponding message body template can be selected to construct the message body; the push policy information is used to indicate the message push strategy, such as push time, push frequency, push priority settings, and other personalized push strategies configured according to actual scenarios and needs.

[0069] Step S202 : determining a target channel and a target message body template for the message content based on the push configuration information and the pre-stored message body templates for the message push services of each channel.

[0070] Step S203: Map the message content to the target message body template to obtain the target message body.

[0071] Step S204: Push the target message body to the target channel based on the pre-stored address information of the target channel.

[0072] In an embodiment of the present application, the message push service configuration information for each channel, such as the message body template and address information for each channel, is integrated and dynamically updated on the message push platform. This allows the platform to efficiently determine the target channel upon receiving a message push request containing message content and push configuration information, construct a message body that meets the requirements of the target channel, and push the message body to the target channel. Specifically, the address information may include information such as the API address, request method, protocol, and media type for each channel.

[0073] As a feasible implementation, the above-mentioned determination of the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel includes the following steps S202a-S202c:

[0074] S202a, determining a target channel for the message content based on the channel information;

[0075] S202b, determining a message body template for a target channel based on pre-stored message body templates for message push services of various channels;

[0076] S202c: Determine a target message body template of the message content from the message body templates of the target channel based on the message type.

[0077] Optionally, in the embodiment of the present application, there may be one or more sending ends communicating with the message push platform. When each sending end needs to push a message, it uses a unified format to send a message push request containing message content and push configuration information to the message push platform.

[0078] For example, let's assume an upstream mobile banking app needs to send a "low balance" notification message to a user using HarmonyOS. The user's device runs HarmonyOS. The upstream mobile banking app simply writes the message content in a simple format: "User A, your balance is low, please top up." It also configures the push configuration: target channel: "HarmonyOS" and message type: "Notification message." Then, it sends the push request to the messaging platform. Upon receiving the push request, the messaging platform automatically maps the message content into a message body structure that meets the requirements of the HarmonyOS messaging service.

[0079] It is understandable that in the embodiments of the present application, when all senders send messages to the message push platform, a unified data format is used to process all types of messages. Whether notification messages, background messages, or in-app call messages, the same basic data structure can be used for transmission. The sender only needs to focus on the content, type, and target channel of the message, without having to worry about the specific message body construction process. The message push platform automatically generates a message body adapted to the target channel based on the message push request, thereby simplifying the process of constructing the message body.

[0080] As a feasible implementation, the above step S203 "mapping the message content to the target message body template to obtain the target message body" includes the following steps S203a-S203b:

[0081] S203a, traverse the fields in the target message body template;

[0082] S203b, until all fields in the target message body template are filled, the target message body template is used as the target message body; wherein, each time a field is traversed, the following process is executed: for any field traversed, the content corresponding to any field is obtained from the message content, and the content corresponding to any field is mapped to the position of any field in the target message body template.

[0083] Optionally, in step S203, the embodiment of the present application uses a recursive algorithm to map the message content to the target message body template to obtain a target message body adapted to the target channel. Exemplarily, when the message content sent by the sender is JSON data, the core goal of the algorithm is to map the JSON data to the target message body template to generate standardized JSON data that conforms to the template format. By recursively parsing and processing the nested structure of JSON data layer by layer, it can be ensured that the field content mapped to each level of the target message body template is consistent with the definition of the target message body template.

[0084] The following example illustrates how to map message content to a target message body template based on a recursive algorithm.

[0085] 1. Object Type

[0086] When a template defines an "object" (a set of key-value pairs), the algorithm iterates over each key (i.e., field) in the object and attempts to find a corresponding value in the input JSON data. If a matching value is found, it is mapped or converted according to the template's requirements. If not, the algorithm determines whether to use a default value or take other actions based on the information provided by the template.

[0087] 2. Array Type

[0088] When the template defines an "array" (such as one containing nested objects or arrays), the algorithm will parse these nested structures and recursively process each element in the array one by one. This means that if the elements in the array are themselves complex structures, the algorithm will continue to go deeper until the template requirements are met.

[0089] 3. Value Types

[0090] When a template defines a simple "value type" (such as a string, number, or Boolean value), the algorithm directly compares the value at the corresponding position in the message content to see if it matches the template. If so, the value is used directly. If it does not match or no value is provided in the input, the algorithm uses the default value preset in the template to fill in the position, ensuring the integrity of the output message body.

[0091] In some embodiments, when mapping the message content to the target message body template in step S203, the present application also verifies the content to be mapped based on the actual scenario and needs, and sets a processing mechanism after verification fails, thereby reducing potential problems caused by data errors.

[0092] Exemplarily, the specific validation logic may include field type validation and rule validation. Field type validation refers to the validation of the data type of each field content to be mapped to ensure that it meets the requirements of the target message body template. If the field type is a date and time type, it is necessary to verify whether the field conforms to the specified date and time format (such as ISO 8601 format). Rule validation is a higher-level logical validation of the field content to ensure that it conforms to business rules or the requirements of specific scenarios. For example, the fields in the template are divided into required fields and optional fields. For required fields, if they are missing in the message content data, a default value is provided according to the template or an error prompt is returned; for another example, regular expression validation is performed on string fields to ensure that they conform to a specific format.

[0093] In some embodiments, the message push platform verifies the legitimacy of the message source to prevent unauthorized message push requests.

[0094] As a feasible implementation method, the above-mentioned message push method also includes: receiving identity authentication information from the sender, and after the verification is passed, generating and sending an identity token to the sender; the identity token can be used to identify the sender and verify the identity of the sender.

[0095] In some embodiments, the message push request also carries an identity token of the sender. The message push method further includes the following steps 205-206:

[0096] Step 205: After receiving the message push request from the sender, verify whether the sender's identity is legitimate based on the sender's identity token;

[0097] In step 206, if the identity of the sender is determined to be legitimate, then execute step S202 of "determining the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel".

[0098] In some embodiments, the message push method further includes the following step 207:

[0099] Step 207 : Record the message push status of this message push request, and store the message content and message operation log of this message push request into the message queue corresponding to the sending end on the set distributed stream processing platform.

[0100] Exemplarily, the above-mentioned distributed stream processing platform can be Kafka. Kafka can realize distributed storage of the message content and message operation log of each message push request of each sender, which can ensure that data will not be lost even in the event of network failure or server downtime, which is helpful for subsequent problem troubleshooting.

[0101] In some embodiments, Redis is used to store association information between the sender and the identity token to maintain the session state of each sender.

[0102] As a feasible implementation, step 207 uses the following steps to record the message push status of this message push request:

[0103] Step 207a, determining whether the target message body is successfully pushed to the target channel;

[0104] Step 207b1: If the push is successful, update the message push status to "pushed" and notify the sender;

[0105] Step 207b2: If the push fails, the target message body is pushed to the target channel again until the preset push stop condition is reached, and the message push status is updated according to the push result and the push result is notified to the sender.

[0106] In an embodiment of the present application, the message push platform stores and updates the message push status of each message push request from each sender in a database. For example, if the message push is successful, the message push status in the database is updated to "pushed" and the status is returned to the upstream sender. If the message fails to send due to network issues, the platform attempts to re-push the message until it succeeds or reaches the retry limit. Otherwise, the failure information is returned to the upstream sender for parameter adjustment.

[0107] In some embodiments, the present application also provides a message push method applied to a sending end, which includes the following steps S301 to S302.

[0108] Step S301: Generate a message push request; the message push request includes message content and push configuration information.

[0109] Step S302: Send the message push request to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body. Then, based on the pre-stored address information of the target channel, the target message body is pushed to the target channel.

[0110] In some embodiments, the message push method applied to the sending end further includes: if a push result indicating a push failure is received, returning to step S301.

[0111] In some embodiments, the message push method applied to the sending end further includes:

[0112] Send authentication information to the messaging platform and receive an identity token from the messaging platform;

[0113] When sending a message push request to the message push platform, the identity token is carried in the message push request.

[0114] The specific implementation methods can be referred to the aforementioned embodiments, which will not be described in detail here.

[0115] like Figure 3 , which is a schematic diagram of the system architecture provided in an embodiment of the present application.

[0116] In some embodiments, this system is built based on the SpringBoot architecture, with Nacos as the registration center to implement registration and discovery of the message push service (Push-Server). Figure 3 As shown in the figure, it includes the sending end and the message push platform. The functions of each part are introduced below.

[0117] Sending end: including clients based on Android, iOS and Hongmeng operating system platforms, which interact with the message push platform through HTTP / HTTPS requests.

[0118] Nginx cluster: Responsible for load balancing, ensuring that message push requests can be evenly distributed to different gateway servers, helping to improve the stability and response speed of the message push platform.

[0119] Gateway: As a core component, it is responsible for the routing and forwarding of the sender's authentication information and message push requests.

[0120] Specifically, the message push platform performs authentication after receiving the authentication information submitted by the sender through an HTTP request. After successful authentication, it generates and returns an identity token to the sender, and stores the association information of this identity token and the sender in Redis to maintain the session state.

[0121] Push-Server (message push service): Receives message push requests from Gateway, automatically determines the target channel and the corresponding target message body template based on the pre-stored message body templates of each channel's message push service, maps the message content to the target message body template, obtains the target message body, and pushes the target message body to the target channel based on the pre-stored target channel address information.

[0122] The persistence layer includes the database (DB), file system (OSS / file service), and cache (Redis). The functions of each part are as follows.

[0123] Database (DB): Stores key business data such as message push status, ensures that messages that fail to be pushed due to network reasons can be re-pushed, and records the status of each message push for subsequent analysis and management.

[0124] File system (OSS / File Service): used to store unstructured data such as images, ensuring data security and accessibility.

[0125] Cache (Redis): used to store session status and temporary data to improve system response speed and performance.

[0126] Kafka: Used for distributed storage of specific message content and operation link logs, facilitating subsequent troubleshooting and log analysis.

[0127] Redisson lock: refers to a distributed lock implemented using the Redisson library. It is mainly used to ensure secure access and operation of shared resources in a distributed system environment.

[0128] Monitoring services: Real-time monitoring of SQL execution efficiency and the health of the message push service ensures system stability and reliability. Specific monitoring services include, but are not limited to, Druid SQL monitoring (for real-time monitoring of SQL execution efficiency), Sentinel flow control (for providing flow control and circuit breaking functions to ensure system stability), and Spring Boot Admin monitoring (for comprehensive system monitoring and management capabilities).

[0129] Managed Services: By integrating automated deployment processes such as build pipelines, the messaging push platform is packaged and seamlessly deployed to the cloud environment, enabling rapid iteration and efficient operations and maintenance.

[0130] Through the above architectural design, this application realizes efficient and stable message push service, supports multi-channel access, and has powerful monitoring and management capabilities to ensure the accuracy and reliability of message push.

[0131] Reference below Figure 4 The message push interaction process diagram shown further illustrates the message push method of the present application.

[0132] like Figure 4 As shown, an embodiment of the present application provides a schematic diagram of a message push interaction process, and the message push interaction process includes the following steps S401 to S408.

[0133] S401: The sending end sends identity authentication information to the message push platform.

[0134] S402: After the identity verification of the sender is passed, the message push platform generates and sends an identity token to the sender.

[0135] S403: The sending end generates and sends a message push request to the message push platform.

[0136] The message push request includes message content, push configuration information and identity token.

[0137] S404: The message push platform verifies whether the identity of the sender is legitimate based on the sender's identity token.

[0138] S405: After the message push platform determines that the identity of the sender is legitimate, it determines the target channel and target message body template of the message content based on the push configuration information.

[0139] S406: The message push platform maps the message content to the target message body template to obtain the target message body.

[0140] S407: The message push platform pushes the target message body to the target channel based on the pre-stored address information of the target channel.

[0141] S408: Record the message push status of this message push request, and store the message content and message operation log of this message push request in the message queue corresponding to the sending end on the set distributed stream processing platform.

[0142] The specific implementation methods can be referred to the aforementioned embodiments, which will not be described in detail here.

[0143] Based on the same inventive concept, the embodiment of the present application also provides a message push device, such as Figure 5 As shown, the device includes:

[0144] The push task receiving module 501 is used to receive a message push request from a sending end, wherein the message push request includes message content and push configuration information;

[0145] A message body template selection module 502 is configured to determine a target channel and a target message body template for the message content based on the push configuration information and pre-stored message body templates for each channel message push service;

[0146] A message body generating module 503 is configured to map the message content to the target message body template to obtain a target message body;

[0147] The message body pushing module 504 is configured to push the target message body to the target channel based on the pre-stored address information of the target channel.

[0148] The specific implementation of each module can refer to the above embodiments and will not be repeated here.

[0149] Based on the same inventive concept, the embodiment of the present application also provides a message push device, such as Figure 6 As shown, the device includes:

[0150] The push task generation module 601 is used to generate a message push request; the message push request includes message content and push configuration information;

[0151] The push task sending module 602 is used to send the message push request to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body, and then pushes the target message body to the target channel based on the pre-stored address information of the target channel.

[0152] The specific implementation of each module can refer to the above embodiments and will not be repeated here.

[0153] Based on the same inventive concept, the present application also provides a message push device 700, such as Figure 7 As shown, it includes at least one processor 702; and a memory 701 that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned message push method.

[0154] Memory 701 is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. Memory 701 may be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of any one or more of the above volatile and non-volatile memories.

[0155] Processor 702 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Alternatively, it may be a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0156] An embodiment of the present invention further provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the message pushing method provided in the above embodiment.

[0157] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0158] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0159] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.

[0160] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer-readable storage medium.

[0161] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0162] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a server, or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0163] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used in the present application to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0164] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0166] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0168] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A message push method, characterized in that: Applied to message push platforms, including: Receive a message push request from a sender, the message push request including message content and push configuration information; Determine the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel; Mapping the message content to the target message body template to obtain a target message body; Based on the pre-stored address information of the target channel, the target message body is pushed to the target channel.

2. The method according to claim 1, characterized in that The push configuration information includes channel information and message type. The determining of the target channel and target message body template of the message content based on the push configuration information and pre-stored message body templates of each channel message push service includes: Determining a target channel for the message content based on the channel information; Determine the message body template of the target channel based on the pre-stored message body templates of the message push services of each channel; A target message body template for the message content is determined from the message body templates of the target channel based on the message type.

3. The method according to claim 1, characterized in that Mapping the message content to the target message body template to obtain the target message body includes: Traversing the fields in the target message body template until all fields in the target message body template are filled, and then using the target message body template as the target message body; wherein, each time a field is traversed, executing the following process: For any field traversed, the content corresponding to the any field is obtained from the message content, and the content corresponding to the any field is mapped to the position of the any field in the target message body template.

4. The method according to claim 1, wherein The method further comprises: The message push status of this message push request is recorded, and the message content and message operation log of this message push request are stored in the message queue corresponding to the sending end on the set distributed stream processing platform.

5. The method according to claim 4, characterized in that The method further comprises: Determining whether the target message body is successfully pushed to the target channel; If the push is successful, the message push status is updated to pushed and the sending end is notified; If the push fails, the target message body is pushed to the target channel again until the preset push stop condition is reached, and the message push status is updated according to the push result and the push result is notified to the sending end.

6. A message push method, characterized in that: Applied to the sending end, including: Generate a message push request; the message push request includes message content and push configuration information; The message push request is sent to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body. Then, based on the pre-stored address information of the target channel, the target message body is pushed to the target channel.

7. The method according to claim 6, characterized in that The method further comprises: If a push failure result is received, the process returns to generate a message push request.

8. A message push device, characterized in that: include: A push task receiving module is used to receive a message push request from a sending end, wherein the message push request includes message content and push configuration information; A message body template selection module, configured to determine a target channel and a target message body template for the message content based on the push configuration information and pre-stored message body templates for each channel message push service; A message body generation module, configured to map the message content to the target message body template to obtain a target message body; The message body pushing module is used to push the target message body to the target channel based on the pre-stored address information of the target channel.

9. A message push device, characterized in that: include: Push task generation module, used to generate message push requests; The message push request includes message content and push configuration information; The push task sending module is used to send the message push request to the message push platform, so that the message push platform determines the target channel and target message body template of the message content based on the push configuration information and the pre-stored message body templates of the message push services of each channel, and maps the message content to the target message body template to obtain the target message body, and then pushes the target message body to the target channel based on the pre-stored address information of the target channel.

10. A message push device, characterized in that: The invention comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1 to 5, or to execute the method according to any one of claims 6 to 7.

Citation Information

Cited By

  • Message pushing method, device and equipment based on swan ecology and medium

    CN121334236A