CN112887420B - Message pushing method and device, computer readable storage medium and electronic equipment - Google Patents

Message pushing method and device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN112887420B
CN112887420B CN202110181986.7A CN202110181986A CN112887420B CN 112887420 B CN112887420 B CN 112887420B CN 202110181986 A CN202110181986 A CN 202110181986A CN 112887420 B CN112887420 B CN 112887420B
Authority
CN
China
Prior art keywords
message
push
target user
pushing
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110181986.7A
Other languages
Chinese (zh)
Other versions
CN112887420A (en
Inventor
武林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chinabank Payments Beijing Technology Co Ltd
Original Assignee
Chinabank Payments Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chinabank Payments Beijing Technology Co Ltd filed Critical Chinabank Payments Beijing Technology Co Ltd
Priority to CN202110181986.7A priority Critical patent/CN112887420B/en
Publication of CN112887420A publication Critical patent/CN112887420A/en
Application granted granted Critical
Publication of CN112887420B publication Critical patent/CN112887420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The disclosure relates to a message pushing method, a message pushing device, a computer readable storage medium and an electronic device, and relates to the technical field of data processing. The method comprises the following steps: receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message, and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message; determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message; and pushing the push content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user can view the push content. The method and the device reduce the coupling between the target user and the notification system and improve the timeliness of message pushing.

Description

Message pushing method and device, computer readable storage medium and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of data processing, and in particular, to a message pushing method, a message pushing device, a computer-readable storage medium, and an electronic device.
Background
In order to manage the merchants, the electronic commerce platform commonly adopts a merchant notification system to notify the resident merchants.
In the prior art, a merchant notification system accesses an encryption and decryption method of an external system where each merchant is located, and when the merchant notification system receives a notification message sent by the external system where the merchant is located, the message included in the notification message is encrypted, and the encrypted message is sent to the merchant.
However, the notification by the above-described merchant notification system has the following problems: the merchant notification system needs to be developed again aiming at different external systems, and different encryption and decryption algorithms need to be accessed, so that the merchant notification system is seriously coupled and is not beneficial to platform construction; important merchants and ordinary merchants are not subjected to classification processing, and when a merchant notification system fails, all merchants are influenced, so that the message pushing timeliness is low.
Therefore, it is necessary to provide a new message pushing method.
It is to be noted that the information invented in the above background section is only for enhancing the understanding of the background of the present invention, and therefore, may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present invention is to provide a message pushing method, a message pushing apparatus, a computer-readable storage medium, and an electronic device, which overcome, at least to some extent, the problems of high system coupling and low message pushing timeliness caused by the limitations and disadvantages of the related art.
According to an aspect of the present disclosure, there is provided a message pushing method, including:
receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message, and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message;
determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message;
and pushing the push content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user views the push content.
In an exemplary embodiment of the present disclosure, determining a message forwarder corresponding to the target user according to a topic of a message queue corresponding to the unified push message includes:
establishing a subscription relationship between the message forwarder and the topic;
determining the target user corresponding to the unified push message and a theme corresponding to the target user according to an access source included in the unified push message;
and acquiring a message forwarding party subscribed to the theme according to the theme corresponding to the target user.
In an exemplary embodiment of the present disclosure, the transport protocol comprises hypertext transport protocol or jeff protocol;
when the transmission protocol is the jeff protocol, pushing the push content to a target user included in an external system according to the transmission protocol and the transmission address includes:
resolving the transmission address to obtain a domain name corresponding to the transmission address;
inquiring a domain name system according to the domain name to obtain an internet protocol address corresponding to the domain name;
and establishing a long connection based on the Internet protocol address, and pushing the push content to a target user included in an external system through the long connection.
In an exemplary embodiment of the present disclosure, after pushing the push content to a target user included in an external system, the message pushing method further includes:
when the push content is successfully pushed, receiving a message of successful push sent by the target user, storing the push content and the message of successful push sent by the target user, and marking the content of successful push;
when the push content fails to be pushed, marking and storing the push content which fails to be pushed, and pushing the push content which fails to be pushed within a preset time interval.
In an exemplary embodiment of the present disclosure, after marking the content that the pushing is successful, the message pushing method further includes:
acquiring a unique identifier when the push content is stored, and acquiring the push content which is successfully pushed and corresponds to the unique identifier based on the unique identifier;
and pushing the push content which is pushed successfully to the target user again based on preset time.
In an exemplary embodiment of the present disclosure, pushing the push content that fails to be pushed within a preset time interval includes:
determining a unified push message corresponding to the push content with failed push;
and acquiring a message forwarding party corresponding to the unified push message, and pushing the push content failed in push to the target user again within a preset time interval by using the message forwarding party.
In an exemplary embodiment of the present disclosure, after pushing the push content with failed push within a preset time interval, the message pushing method further includes:
and stopping pushing the pushing content failed in pushing to the target user within a preset time interval after receiving the message of successful pushing sent by the target user.
According to an aspect of the present disclosure, there is provided a message pushing apparatus including:
the unified push message receiving module is used for receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message and acquiring a push content, a transmission protocol and a transmission address which are included in the unified push message;
the message forwarding party determining module is used for determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message;
and the message pushing module is used for pushing the pushed content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user can view the pushed content.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the message push method of any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any of the message push methods described above via execution of the executable instructions.
On one hand, the method for pushing the message provided by the embodiment of the disclosure receives a unified pushing message sent by an external system where a target user is located, analyzes the unified pushing message, and acquires pushing content, a transmission protocol and a transmission address included in the unified pushing message; determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message; the message forwarding party is utilized to push the push content to the target user according to the transmission protocol and the transmission address, so that the target user can check the push content, and the push content included in the unified push message is pushed to the target user through the message forwarding party, so that the problem that in the prior art, when different external systems are accessed, a notification system needs to be developed again, and the coupling between the target user and the notification system is reduced; on the other hand, different target users correspond to different message forwarding parties, and message pushing is performed on different target users through different message forwarding parties, so that the problem that in the prior art, when a merchant notifies a system that a fault occurs or the flow of some target users suddenly increases, the message pushing timeliness is reduced is solved, and the message pushing timeliness is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 schematically shows a flow chart of a message pushing method according to an exemplary embodiment of the present invention.
Fig. 2 schematically shows a block diagram of a message push system according to an exemplary embodiment of the present invention.
Fig. 3 schematically shows a schematic diagram of a subject of a message queue according to an exemplary embodiment of the present invention.
Fig. 4 schematically shows a flow chart of a method for pushing push content to a target user using the jeff protocol according to an exemplary embodiment of the present invention.
Fig. 5 schematically shows a flow chart of a method of establishing a long connection according to an exemplary embodiment of the invention.
Fig. 6 schematically illustrates a message push method after a target user receives push content according to an exemplary embodiment of the present invention.
Fig. 7 is a schematic diagram illustrating a scenario of a message pushing method according to an exemplary embodiment of the present invention.
Fig. 8 schematically outputs a flowchart of a message pushing method according to an exemplary embodiment of the present invention.
Fig. 9 schematically shows a block diagram of a message pushing apparatus according to an exemplary embodiment of the present invention.
Fig. 10 schematically illustrates an electronic device for implementing the message push method according to an exemplary embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the prior art, a merchant notification system needs system development for each accessed external system, which results in serious system coupling; in addition, classification processing is not carried out on important merchants and ordinary merchants, and when the merchant notification system fails, all merchants are influenced, so that the message pushing timeliness is low; when the message is transmitted, only the hypertext transfer protocol is supported, and when the notification system fails, the notification content of the notification failure cannot be recorded, and when the failure is recovered, the notification content of the notification failure is lost, and the notification cannot be performed again.
Based on one or more of the above problems, the present exemplary embodiment first provides a message pushing method, which may be executed on a server, a server cluster, a cloud server, or the like, and of course, a person skilled in the art may also execute the method of the present invention on other platforms according to needs, which is not specifically limited in this exemplary embodiment. Referring to fig. 1, the message push method may include the steps of:
step S110, receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message, and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message;
s120, determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message;
step S130, the message forwarding party is utilized to push the push content to the target user according to the transmission protocol and the transmission address, so that the target user can check the push content.
On one hand, the message pushing method receives a unified pushing message sent by an external system where a target user is located, analyzes the unified pushing message, and acquires pushing content, a transmission protocol and a transmission address which are included in the unified pushing message; determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message; the message forwarding party is utilized to push the push content to the target user according to the transmission protocol and the transmission address, so that the target user can check the push content, and the push content included in the unified push message is pushed to the target user through the message forwarding party, so that the problem that in the prior art, when different external systems are accessed, a notification system needs to be developed again, and the coupling between the target user and the notification system is reduced; on the other hand, different target users correspond to different message forwarding parties, and message pushing is performed on different target users through different message forwarding parties, so that the problem that in the prior art, when a merchant notifies a system of a fault or the flow of some target users suddenly increases, the message pushing timeliness is reduced is solved, and the message pushing timeliness is improved.
Hereinafter, each step involved in the message push method of the exemplary embodiment of the present disclosure is explained and explained in detail.
First, an application scenario and an object of the exemplary embodiment of the present disclosure are explained and explained.
Specifically, the exemplary embodiment of the present disclosure may be used in a notification system, where a data forwarding party corresponding to a target user is determined, and a push content included in a unified push message is pushed to the target user through the data forwarding party, so that coupling between the target user and the notification system is reduced, and when a traffic of some target users suddenly increases, influences on push timeliness of other target users are reduced through different data forwarding parties.
The embodiment of the disclosure is based on the received unified push message, and after the unified push message is received, the unified push message is analyzed to obtain push content, a transmission protocol and a transmission address included in the unified push message, and a data forwarding party corresponding to a target user is determined through a subject of a message queue corresponding to the unified push message, so that coupling between the target user and a notification system is reduced; secondly, after the data forwarding party is determined, the data forwarding party is utilized to push the push content to the target users according to the transmission protocol and the transmission address obtained through analysis, when the flow of some target users is suddenly increased, the push content is pushed through different data forwarding parties, the push timeliness of all target users cannot be influenced, and the message push efficiency is improved.
Next, the message push system related to the exemplary embodiment of the present disclosure is explained and explained. Referring to fig. 2, the message push system may include: external system 210, notification system 220, notification system front end 230, target user client 240, and task platform 250. The external system 210 may include one or more target user clients 240, configured to send a unified push message, where the unified push message includes push content, a transport protocol, a transport address, and an access source; the notification system 220 is connected to the external system 210 through a network, and is configured to receive the unified push message sent by the external system 210, parse the received unified push message to obtain a push content, a transmission protocol, a transmission address, and an access source, and determine a data sender corresponding to the target user according to the access source of the unified push message; the notification system front-end 230, i.e. the data forwarding party, is in network connection with the notification system 220, and is configured to push the pushed content to the target user according to the transport address and the transport protocol; the target user clients 240 may include common target user clients and important target user (target user with advantages in many aspects such as passenger flow volume and development potential) clients, and are configured to receive the push content sent by the notification system front-end 230; and the task platform 250 is used for storing the push content with successful push, the message with successful push sent by the target user and the push content with failed push.
Hereinafter, steps S110 to S130 will be explained and explained with reference to fig. 2.
In step S110, a unified push message sent by an external system where a target user is located is received, and the unified push message is analyzed, so as to obtain a push content, a transmission protocol, and a transmission address included in the unified push message.
The unified push message may be one or multiple ones, a data format of the unified push message is defined by the notification system, push content included in the unified push message sent by the external system is encrypted, and an encryption and decryption algorithm is determined by a target user included in the external system and the external system together, where the encryption and decryption algorithm may be a symmetric encryption algorithm or an asymmetric encryption algorithm, and is not specifically limited in this embodiment. The transmission protocol may be a hypertext transmission protocol or a jeff protocol, and is not specifically limited in this embodiment.
Specifically, the external system 210 generates a unified push message according to a format of the push message defined by the notification system, and sends the unified push message to the notification system 220, where push content included in the unified push message is encrypted, which ensures security of message transmission, and after the notification platform 220 receives the unified push message sent by the external system, the unified push message is analyzed to obtain the push content, the transmission protocol, the transmission address, and the access source included in the unified push message. The notification system defines the format of the push message, the external system encrypts the notification content, and encapsulates the encrypted push content, the transmission address and the transmission protocol into a uniform push message, so that the coupling between the push system and the target user is reduced.
In step S120, a message forwarding party corresponding to the target user is determined according to a topic of a message queue corresponding to the unified push message.
In the queue model of the message queue, any message can only be received by one of the recipients, but in this exemplary embodiment, the relationship between the external system and the message forwarding party may be one-to-one or one-to-many, and in order to ensure that all target users can receive the push content pushed by the external system through the message forwarding party, another message model may be adopted: a "publish-subscribe" model; the topic of the message queue is the topic included in the 'publish-subscribe' model of the message; referring to fig. 3, an external system (publisher) 301, a topic for storing published messages of the publisher and forwarding the stored messages to all message forwarders subscribing to the topic, and a message forwarder (subscriber) 302 are included in the publish-subscribe model. The subscription between the message forwarder and the topic may be an action of one subscription, or a logical copy of the topic at the time of consumption, and in each subscription, all subscribers may receive all messages of the topic.
In this example embodiment, determining, according to a topic of a message queue corresponding to the unified push message, a message forwarder corresponding to the target user includes:
establishing a subscription relationship between the message forwarder and the topic; wherein, a message forwarding party corresponds to one or more target users;
determining the target user corresponding to the unified push message and a theme corresponding to the target user according to an access source included in the unified push message;
according to the theme corresponding to the target user, acquiring the message forwarding party subscribed to the theme
Specifically, first, a subscription relationship between the message forwarder and the topic is established, that is, after the topic receives the push content sent by the external system, all the received push content can be sent to the message forwarder, that is, the notification system front 230; then, an access source included in the unified push message is acquired, wherein the access source is used for determining a target user corresponding to the unified push message and a theme corresponding to the target user, that is, the target user corresponding to the unified push message and the theme corresponding to the target user can be determined according to the access source; finally, after the topic corresponding to the target user is obtained, all the message forwarding parties subscribing to the topic can be determined according to the subscription relationship between the topic and the message forwarding parties.
In step S130, the message forwarder pushes the push content to the target user according to the transmission protocol and the transmission address, so that the target user views the push content.
The transmission protocol may be a hypertext transmission protocol or a jeff protocol, and is not specifically limited in this embodiment. When the transmission protocol is a hypertext transmission protocol, a corresponding new response is generated whenever a new request is sent. The jeff protocol is a network protocol stack and an asynchronous event communication framework realized by adopting Netty (programming framework of a client and a server based on NIO (New IO, new input and output)), wherein the NIO model of Netty is a Reactor model (a Reactor can be a multiplexer with a distribution function), and each connection corresponds to one channel; specifically, referring to fig. 4, when the transmission protocol is the jeff protocol, pushing the push content to a target user included in the external system according to the transmission protocol and the transmission address may include steps S410 to S430:
s410, analyzing the transmission address to obtain a domain name corresponding to the transmission address;
step S420, inquiring a domain name system according to the domain name to obtain an Internet protocol address corresponding to the domain name;
and S430, establishing a long connection based on the Internet protocol address, and pushing the push content to a target user included in an external system through the long connection.
Hereinafter, steps S410 to S430 will be explained and explained. Firstly, resolving a transmission address included in the unified push message to obtain a domain name corresponding to the transmission address; secondly, obtaining an IP Address (Internet Protocol Address) corresponding to the domain name according to the domain name; and finally, establishing a long connection based on the IP address, and pushing the push content to the target user through the long connection. As shown in fig. 5, establishing the long connection may include steps S510 to S530:
step S510, establishing a channel between an external system and a server;
s520, sending a heartbeat packet to a server by using a channel;
and step S530, sending push content to the server, and closing the connection after the server does not receive the heartbeat packet or the external system is actively closed for a period of time.
Hereinafter, steps S510 to S530 will be explained and explained. Firstly, establishing a connection between an external system and a server, wherein the connection can be a Channel (Channel), the connection can be stored in a Map set, the unique identifier can be a hash value of the Channel, the connection is not immediately disconnected after the connection is successfully established, and multiple message interactions can be performed on the basis of the connection; then, sending a heartbeat packet to the server by using the channel, wherein the heartbeat packet is used for keeping an active (in use) state of the channel; and finally, when the channel is in an active state, sending push content based on the channel, and closing the connection after the server does not receive a heartbeat packet within a period of time or the external system is actively closed. The jeff protocol reduces the time consumed for data transmission and reduces the overhead of establishing and closing connections due to the long connections.
When the transmission protocol is a hypertext transmission protocol, pushing the push content to a target user included in the external system may include the following steps: firstly, resolving a transmission address to obtain a domain name; secondly, obtaining an IP Address (Internet Protocol Address) corresponding to the domain name according to the domain name; and finally, establishing a Transmission Control Protocol (TCP) connection through three-way handshake, and pushing the push content to the target user based on the established TCP connection.
Referring to fig. 6, after the target user included in the external system receives the push content, the message push method may further include steps S610 and S620:
step S610, when the push content is pushed successfully, receiving a message of successful push sent by the target user, storing the push content and the message of successful push sent by the target user, and marking the content of successful push;
and S620, when the push of the push content fails, marking and storing the push content which fails to be pushed, and pushing the push content which fails to be pushed within a preset time interval.
Hereinafter, step S610 and step S620 will be explained and explained. Specifically, after the message forwarding party pushes the pushed content to the target user, it is further required to determine whether the pushed content is successfully pushed to the target user; when the push content is successfully pushed to the target user, the target user sends a message of successful push to the notification system front end 230, the notification system front end 230 sends the message of successful push to the notification system 220, the notification system 220 stores the message of successful push and the push content of successful push to the task platform 250, and marks the content of successful push as successful push; when the push of the push content fails due to a network problem or a target user system problem, the data forwarding party, that is, the notification system front end 230 asynchronously sends a message of the push failure to the notification system 220, the notification system stores the push content of the push failure to the task platform and marks the push content as the push failure, and the task platform 250 pushes the push content marked as the push failure again within a preset time interval, where the preset time interval may be 1s,5s, 1s, 20s,40s,90s, and is not specifically limited in this embodiment; the task platform 250 will push the push content marked as failed again within a preset time interval, including:
determining a unified push message corresponding to the push content with failed push;
and acquiring a message forwarding party corresponding to the unified push message, and pushing the push content failed in push to the target user again within a preset time interval by using the message forwarding party.
Specifically, when the push content fails to be pushed, that is, the push system front-end does not receive a message sent by the target user and indicating that the push is successful within a preset time, the task platform calls back the notification system, and the notification system determines a unified push message corresponding to the push content that fails to be pushed and asynchronously forwards the unified push message to a topic corresponding to the target user, so that the push system front-end obtains the unified push message and forwards the unified push message to the target user.
After the push content with failed push is pushed again, the message pushing method further comprises the following steps: and stopping pushing the pushing content failed in pushing to the target user within a preset time interval after receiving the message of successful pushing sent by the target user. Specifically, in the process of the task platform 250 calling back the notification system, after the notification system receives a message that the push is successful and sent by the target user, the notification system sends the message that the push is successful to the task platform, the state of the push content is modified from the push failure state to the push success, and the task platform stops sending the push content to the target user within a preset time interval.
In this exemplary embodiment, after marking and saving the content whose pushing is successful, the message pushing method further includes:
acquiring a unique identifier when the pushed content is stored, and acquiring the pushed content which is successfully pushed and corresponds to the unique identifier based on the unique identifier;
and pushing the push content which is pushed successfully to the target user again based on preset time.
Specifically, when the push content is successfully pushed and the target user needs the push content at a certain time, the push content corresponding to the unique identifier can be acquired in the task platform according to the unique identifier generated when the push content is stored, and the push content is sent to the target user according to a certain time preset by the user, so that the message pushing efficiency is improved.
Further, the number of data sending parties included in this exemplary embodiment may be multiple, each data sending party may correspond to one or more target users, a target user may be a target merchant, and a target user may also be an important target user or a common target user, and as shown in fig. 7, the target users included in the external system 710 may be a common target user 731 and an important target user 732, where the common target users may include: the system comprises a common target user 1, a common target user 2 and a common target user 3, wherein the data forwarding parties corresponding to the common target user 1, the common target user 2 and the common target user 3 are 721 notification system front 1, the data forwarding party corresponding to an important target user is 722 notification system front 2, when the flow of an important target user 732 suddenly increases at a certain moment, if the data forwarding parties of the common target user and the important target user are the same notification system front, the push timeliness of all target users can be influenced, but when different data forwarding parties are adopted, the push timeliness of the common target user cannot be influenced.
The message pushing method and the message pushing system provided by the disclosed example embodiment have at least the following advantages: the target users are processed in a grading way, merchants with different grades correspond to different data senders, and when a system fails or the flow of some target merchants increases suddenly, the pushing timeliness of all the target users cannot be influenced; on the other hand, when the system fails and the push of the push content fails, the push content which fails to be pushed is stored, so that the push content which fails to be pushed can be pushed again after the failure is recovered, and the push efficiency is improved; on the other hand, the transmission protocol supports the jeff protocol, so that the total time consumption of data transmission and the overhead of connection establishment and closing are reduced, and the efficiency of data transmission is improved.
Hereinafter, the message pushing method according to the exemplary embodiment of the present disclosure is further explained and explained with reference to fig. 8. The message pushing method can comprise the following steps:
s800, an external system sends a unified push message to a notification system;
s802, the notification system asynchronously pushes the push content included in the unified push message to the front of the notification system;
step S804, informing the system front end to push the push content to the target user;
step S806, the target user pushes the message which is pushed successfully to the current notification system front end;
step 808, forwarding the message successfully pushed to a notification system by the notification system front-end;
step S810, the notification system stores the successfully pushed contents and the successfully pushed messages to the task platform;
step S812, when the front end of the notification system does not receive the message of successful push sent by the target user, sending the message of failed push to the notification system;
step S814, informing a system to store the pushing content failed in pushing to a task platform;
step S816, the task platform calls back the notification system to push the push content failed in pushing again;
step S818, when the task platform callback succeeds, the notification system stops sending the unified push message corresponding to the push content with the push failure.
An exemplary embodiment of the present disclosure further provides a message pushing apparatus, which, as shown in fig. 9, may include: a unified push message receiving module 910, a message forwarder determining module 920, and a message push module 930. Wherein:
a unified push message receiving module 910, configured to receive a unified push message sent by an external system where a target user is located, analyze the unified push message, and obtain a push content, a transmission protocol, and a transmission address included in the unified push message;
a message forwarding party determining module 920, configured to determine, according to a topic of a message queue corresponding to the unified push message, a message forwarding party corresponding to the target user;
a message pushing module 930, configured to push the pushed content to the target user according to the transmission protocol and the transmission address by using the message forwarding party, so that the target user views the pushed content.
In an exemplary embodiment of the present disclosure, determining a message forwarder corresponding to the target user according to a topic of a message queue corresponding to the unified push message includes:
establishing a subscription relationship between the message forwarder and the topic;
determining the target user corresponding to the unified push message and a theme corresponding to the target user according to an access source included in the unified push message;
and acquiring a message forwarding party subscribed to the theme according to the theme corresponding to the target user.
In an exemplary embodiment of the present disclosure, the transport protocol comprises hypertext transport protocol or jeff protocol;
when the transmission protocol is the jeff protocol, pushing the push content to a target user included in an external system according to the transmission protocol and the transmission address includes:
analyzing the transmission address to obtain a domain name corresponding to the transmission address;
inquiring a domain name system according to the domain name to obtain an internet protocol address corresponding to the domain name;
and establishing a long connection based on the Internet protocol address, and pushing the push content to a target user included in an external system through the long connection.
In an exemplary embodiment of the present disclosure, after pushing the push content to a target user included in an external system, the message pushing method further includes:
when the push content is successfully pushed, receiving a message of successful push sent by the target user, storing the push content and the message of successful push sent by the target user, and marking the content of successful push;
and when the push of the push content fails, marking and storing the push content which fails to be pushed, and pushing the push content which fails to be pushed within a preset time interval.
In an exemplary embodiment of the present disclosure, after marking the content that is successfully pushed, the message pushing method further includes:
acquiring a unique identifier when the pushed content is stored, and acquiring the pushed content which is successfully pushed and corresponds to the unique identifier based on the unique identifier;
and pushing the push content which is successfully pushed to the target user again based on preset time.
In an exemplary embodiment of the present disclosure, pushing the push content with the failed push in a preset time interval includes:
determining a unified push message corresponding to the push content with failed push;
and acquiring a message forwarding party corresponding to the unified push message, and pushing the push content failed in push to the target user again within a preset time interval by using the message forwarding party.
In an exemplary embodiment of the present disclosure, after pushing the push content that fails to be pushed within a preset time interval, the message pushing method further includes:
and stopping pushing the pushing content failed in pushing to the target user within a preset time interval after receiving the message of successful pushing sent by the target user.
The specific details of each module in the message pushing apparatus have been described in detail in the corresponding message pushing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present invention are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In an exemplary embodiment of the present invention, there is also provided an electronic device capable of implementing the above data conversion method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Accordingly, various aspects of the present invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to this embodiment of the invention is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, a bus 1030 connecting various system components (including the memory unit 1020 and the processing unit 1010), and a display unit 1040.
Wherein the storage unit stores program code that may be executed by the processing unit 1010 to cause the processing unit 1010 to perform the steps according to various exemplary embodiments of the present invention described in the "exemplary methods" section above in this specification. For example, the processing unit 1010 may execute step S110 as shown in fig. 1: receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message, and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message; step S120: determining a message forwarding party corresponding to the target user according to the theme of the message queue corresponding to the unified push message; step S130: and pushing the push content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user views the push content.
The storage unit 1020 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 10201 and/or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203.
The memory unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
Bus 1030 may be any one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and a local bus using any of a variety of bus architectures.
The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 1050. Also, the electronic device 1000 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1060. As shown, the network adapter 1060 communicates with the other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention 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 disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present invention.
In an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
According to the program product for realizing the method, the portable compact disc read only memory (CD-ROM) can be adopted, the program code is included, and the program product can be operated on terminal equipment, such as a personal computer. However, the program product of the present invention is not limited in this respect, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily appreciated that the processes illustrated in the above figures are not intended to indicate or limit the temporal order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (9)

1. A message pushing method, comprising:
receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message, and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message;
establishing a subscription relationship between a message forwarding party and the topic of the message queue corresponding to the unified push message;
determining the target user corresponding to the unified push message and a theme corresponding to the target user according to an access source included in the unified push message;
according to the theme corresponding to the target user, acquiring a message forwarding party subscribing the theme;
and pushing the push content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user views the push content.
2. The message pushing method of claim 1, wherein the transport protocol comprises hypertext transport protocol or jeff protocol;
when the transmission protocol is the jeff protocol, pushing the push content to a target user included in an external system according to the transmission protocol and the transmission address includes:
analyzing the transmission address to obtain a domain name corresponding to the transmission address;
inquiring a domain name system according to the domain name to obtain an internet protocol address corresponding to the domain name;
and establishing a long connection based on the Internet protocol address, and pushing the push content to a target user included in an external system through the long connection.
3. The message pushing method according to claim 2, wherein after pushing the pushed content to a target user included in an external system, the message pushing method further comprises:
when the push content is successfully pushed, receiving a message of successful push sent by the target user, storing the push content and the message of successful push sent by the target user, and marking the content of successful push;
when the push content fails to be pushed, marking and storing the push content which fails to be pushed, and pushing the push content which fails to be pushed within a preset time interval.
4. The message pushing method according to claim 3, wherein after marking the content of which the pushing is successful, the message pushing method further comprises:
acquiring a unique identifier when the pushed content is stored, and acquiring the pushed content which is successfully pushed and corresponds to the unique identifier based on the unique identifier;
and pushing the push content which is successfully pushed to the target user again based on preset time.
5. The message pushing method according to claim 4, wherein pushing the push content with failed push in a preset time interval comprises:
determining a unified push message corresponding to the push content with failed push;
and acquiring a message forwarding party corresponding to the unified push message, and pushing the push content failed in push to the target user again within a preset time interval by using the message forwarding party.
6. The message pushing method according to claim 5, wherein after pushing the push content with failed push within a preset time interval, the message pushing method further comprises:
and stopping pushing the pushing content failed in pushing to the target user within a preset time interval after receiving the message of successful pushing sent by the target user.
7. A message push apparatus, comprising:
the unified push message receiving module is used for receiving a unified push message sent by an external system where a target user is located, analyzing the unified push message and acquiring push content, a transmission protocol and a transmission address which are included in the unified push message;
the message forwarding party determining module is used for establishing a subscription relationship between the message forwarding party and the topic of the message queue corresponding to the unified push message;
determining the target user corresponding to the unified push message and a theme corresponding to the target user according to an access source included in the unified push message;
according to the theme corresponding to the target user, acquiring a message forwarding party subscribing the theme;
and the message pushing module is used for pushing the pushed content to the target user by using the message forwarding party according to the transmission protocol and the transmission address so that the target user can view the pushed content.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the message push method according to any one of claims 1 to 6.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the message push method of any of claims 1-6 via execution of the executable instructions.
CN202110181986.7A 2021-02-09 2021-02-09 Message pushing method and device, computer readable storage medium and electronic equipment Active CN112887420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110181986.7A CN112887420B (en) 2021-02-09 2021-02-09 Message pushing method and device, computer readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110181986.7A CN112887420B (en) 2021-02-09 2021-02-09 Message pushing method and device, computer readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112887420A CN112887420A (en) 2021-06-01
CN112887420B true CN112887420B (en) 2023-04-18

Family

ID=76056397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110181986.7A Active CN112887420B (en) 2021-02-09 2021-02-09 Message pushing method and device, computer readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112887420B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114449029A (en) * 2022-01-27 2022-05-06 中国建设银行股份有限公司 Service data acquisition method, system, device, computer equipment and storage medium
CN114465976A (en) * 2022-01-28 2022-05-10 深圳快银付信息科技有限公司 Message distribution and aggregation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
CN110233883A (en) * 2019-05-24 2019-09-13 中国平安人寿保险股份有限公司 Processing method, device, server and the storage medium of PUSH message

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011131262A1 (en) * 2010-04-19 2011-10-27 International Business Machines Corporation Controlling message delivery in publish/subscribe messaging
US8634810B2 (en) * 2011-09-29 2014-01-21 International Business Machines Corporation Pushing secure notifications to mobile computing devices
CN108897631A (en) * 2018-06-27 2018-11-27 杭州贝店科技有限公司 Information push method, device, equipment and storage medium
CN110300050B (en) * 2019-05-23 2023-02-07 中国平安人寿保险股份有限公司 Message pushing method and device, computer equipment and storage medium
CN112311825B (en) * 2019-07-29 2023-05-19 浙江宇视科技有限公司 Message pushing method and device, pushing server and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
CN110233883A (en) * 2019-05-24 2019-09-13 中国平安人寿保险股份有限公司 Processing method, device, server and the storage medium of PUSH message

Also Published As

Publication number Publication date
CN112887420A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN108173938B (en) Server load distribution method and device
CN111694674B (en) Message distribution processing method, device, equipment and storage medium
CN111371892A (en) High-concurrency distributed message pushing system and method
CN112887420B (en) Message pushing method and device, computer readable storage medium and electronic equipment
US11868707B2 (en) Information interaction method and apparatus, server, system, and storage medium
CN113067882A (en) Message processing method and device, electronic equipment and medium
US20130117432A1 (en) Method and device for desktop sharing processing
US9736088B1 (en) Structured communication framework
CN112532673B (en) Message sending method and device, computer readable storage medium and electronic equipment
CN112769876B (en) Method, device, equipment and medium for acquiring equipment channel information
US11153399B2 (en) Facilitating inter-proxy communication via an existing protocol
CN114449523B (en) Flow filtering method, device, equipment and medium for satellite measurement and control system
CN114090283A (en) Message pushing method and device, electronic equipment and storage medium
CN114500430A (en) Dialogue method, system, device and storage medium
CN113992352A (en) Message pushing method and device, electronic equipment and storage medium
CN113810264A (en) Information transmission method and device, electronic equipment and storage medium
CN111917835A (en) System, method and device for monitoring network data
CN115250276A (en) Distributed system and data processing method and device
CN112769960A (en) Active flow control method and system based on Nginx server
CN110798398A (en) Group message management method, device, equipment and medium
CN115086425B (en) Message transmission method, device, program product, medium and electronic equipment
CN113824625B (en) Information interaction method and device
CN112104733B (en) Method, device, electronic equipment and medium for acquiring preset service information
CN111225044B (en) Client message pushing method, device and system
WO2023130845A1 (en) Communication method and apparatus, and computer-readable storage medium, electronic device and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant