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 PDFInfo
- 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
- push
- message
- target user
- content
- unified
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
背景技术Background technique
为了便于对商户进行管理,电子商务平台普遍采用商户通知系统对入驻的商户进行通知。In order to facilitate the management of merchants, e-commerce platforms generally use a merchant notification system to notify settled merchants.
现有技术中,商户通知系统接入每个商户所在的外部系统的加解密方法,当商户通知系统接收到商户所在的外部系统发送的通知消息时,对通知消息中包括的消息进行加密,并且将加密后的消息发送给商户。In the prior art, the merchant notification system accesses the encryption and decryption method of the external system where each merchant is located. When the merchant notification system receives the notification message sent by the external system where the merchant is located, it encrypts the message included in the notification message, and Send the encrypted message to the merchant.
但是,通过上述商户通知系统进行通知存在以下问题:针对不同的外部系统都需要对商户通知系统进行再次开发,需要接入不同的加解密算法,导致商户通知系统耦合严重,不利于平台化建设;未对重要商户和普通商户进行分级处理,当商户通知系统出现故障时,影响所有商户,导致消息推送时效较低。However, there are the following problems in the notification through the above-mentioned merchant notification system: the merchant notification system needs to be redeveloped for different external systems, and different encryption and decryption algorithms need to be connected, which leads to serious coupling of the merchant notification system, which is not conducive to platform construction; Important merchants and ordinary merchants are not graded. When the merchant notification system fails, it will affect all merchants, resulting in low message push timeliness.
因此,需要提供一种新的消息推送方法。Therefore, a new message push method needs to be provided.
需要说明的是,在上述背景技术部分发明的信息仅用于加强对本发明的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above background technology section is only used to enhance 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.
发明内容Contents of the invention
本发明的目的在于提供一种消息推送方法、消息推送装置、计算机可读存储介质以及电子设备,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的系统耦合程度高以及消息推送时效低的问题。The purpose of the present invention is to provide a message push method, a message push device, a computer-readable storage medium, and an electronic device, so as to overcome the high degree of system coupling and the timeliness of message push caused by the limitations and defects of related technologies at least to a certain extent. low problem.
根据本公开的一个方面,提供一种消息推送方法,包括:According to an aspect of the present disclosure, a message push method is provided, including:
接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;receiving the unified push message sent by the external system where the target user is located, and analyzing the unified push message, and obtaining the push content, transmission protocol and transmission address included in the unified push message;
根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;determining a message forwarder corresponding to the target user according to the subject of the message queue corresponding to the unified push message;
利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。Using the message forwarding party to push the pushed content to the target user according to the transmission protocol and the transmission address, so that the target user can view the pushed content.
在本公开的一种示例性实施例中,根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方,包括:In an exemplary embodiment of the present disclosure, determining the message forwarder corresponding to the target user according to the topic of the message queue corresponding to the unified push message includes:
建立所述消息转发方与所述主题的订阅关系;Establish a subscription relationship between the message forwarder and the topic;
根据所述统一推送消息包括的接入来源,确定与所述统一推送消息对应的所述目标用户以及与所述目标用户对应的主题;determining the target user corresponding to the unified push message and the topic corresponding to the target user according to the access source included in the unified push message;
根据与所述目标用户对应的主题,获取订阅所述主题的消息转发方。According to the topic corresponding to the target user, the message forwarders subscribing to the topic are acquired.
在本公开的一种示例性实施例中,所述传输协议包括超文本传输协议或者杰夫协议;In an exemplary embodiment of the present disclosure, the transmission protocol includes hypertext transfer protocol or Jeff protocol;
其中,当所述传输协议为杰夫协议时,根据所述传输协议以及所述传输地址,将所述推送内容推送至外部系统所包括的目标用户,包括:Wherein, when the transmission protocol is the Jeff protocol, according to the transmission protocol and the transmission address, pushing the push content to the target users included in the external system includes:
对所述传输地址进行解析,得到与所述传输地址对应的域名;Analyzing the transfer address to obtain a domain name corresponding to the transfer address;
根据所述域名查询域名系统,得到与所述域名对应的互联网协议地址;Querying the Domain Name System according to the domain name to obtain an Internet Protocol address corresponding to the domain name;
基于所述互联网协议地址建立长连接,并通过所述长连接,将所述推送内容推送至外部系统所包括的目标用户。A persistent connection is established based on the Internet protocol address, and the push content is pushed to target users included in the external system through the persistent connection.
在本公开的一种示例性实施例中,在将所述推送内容推送至外部系统所包括的目标用户之后,所述消息推送方法还包括:In an exemplary embodiment of the present disclosure, after pushing the push content to target users included in the external system, the message push method further includes:
当所述推送内容推送成功时,接收所述目标用户发送的推送成功的消息,将所述推送内容以及所述目标用户发送的推送成功的消息进行存储,并且对所述推送成功的内容进行标记;When the push content is successfully pushed, receive the push success message sent by the target user, store the push content and the push success message sent by the target user, and mark the push success content ;
当所述推送内容推送失败时,对所述推送失败的推送内容进行标记以及保存,并在预设的时间间隔内对所述推送失败的推送内容进行推送。When the pushing of the push content fails, mark and save the push content that fails to be pushed, and push the push content that fails to be pushed within a preset time interval.
在本公开的一种示例性实施例中,在对所述推送成功的内容进行标记之后,所述消息推送方法还包括:In an exemplary embodiment of the present disclosure, after marking the successfully pushed content, the message pushing method further includes:
获取所述推送内容保存时的唯一标识,基于所述唯一标识获取与所述唯一标识对应的推送成功的推送内容;Obtaining the unique identifier when the push content is saved, and obtaining the successfully pushed push content corresponding to the unique identifier based on the unique identifier;
基于预设的时间,将所述推送成功的所述推送内容再次推送至所述目标用户。Based on the preset time, the pushed content that is successfully pushed is pushed to the target user again.
在本公开的一种示例性实施例中,在预设的时间间隔内对所述推送失败的推送内容进行推送,包括:In an exemplary embodiment of the present disclosure, pushing the push content that failed to push within a preset time interval includes:
确定与推送失败的推送内容对应的统一推送消息;Determining a unified push message corresponding to the push content that failed to push;
获取与所述统一推送消息对应的消息转发方,利用所述消息转发方,在预设的时间间隔内将所述推送失败的推送内容再次推送至所述目标用户。Obtain a message forwarder corresponding to the unified push message, and use the message forwarder to push the push content that failed to be pushed to the target user again within a preset time interval.
在本公开的一种示例性实施例中,在预设的时间间隔内对所述推送失败的推送内容进行推送之后,所述消息推送方法还包括: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 push method further includes:
当接收到所述目标用户发送的推送成功的消息后,停止在预设的时间间隔内对所述目标用户推送所述推送失败的推送内容。After receiving the push success message sent by the target user, stop pushing the push content that failed to be pushed to the target user within a preset time interval.
根据本公开的一个方面,提供一种消息推送装置,包括:According to an aspect of the present disclosure, a message push device is provided, including:
统一推送消息接收模块,用于接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;The unified push message receiving module is used to receive the unified push message sent by the external system where the target user is located, and analyze the unified push message to obtain the push content, transmission protocol and transmission address included in the unified push message;
消息转发方确定模块,用于根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;A message forwarder determination module, configured to determine the message forwarder corresponding to the target user according to the topic of the message queue corresponding to the unified push message;
消息推送模块,用于利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。A message push module, configured to use the message forwarder to push the push content to the target user according to the transmission protocol and the transmission address, so that the target user can view the push content.
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的消息推送方法。According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the message pushing method described in any one of the foregoing is implemented.
根据本公开的一个方面,提供一种电子设备,包括:According to one aspect of the present disclosure, an electronic device is provided, comprising:
处理器;以及processor; and
存储器,用于存储所述处理器的可执行指令;a memory for storing executable instructions of the processor;
其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述的消息推送方法。Wherein, the processor is configured to execute the message pushing method described in any one of the above by executing the executable instructions.
本公开实施例提供的一种消息推送方法,一方面,接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看,由于是通过消息转发方将统一推送消息中包括的推送内容推送至目标用户,解决了现有技术中,当接入不同的外部系统时,需要对通知系统再次进行开发,降低了目标用户与通知系统之间的耦合;另一方面,由于不同的目标用户对应不同的消息转发方,并且通过不同的消息转发方对不同的目标用户进行消息推送,解决了现有技术中,当商户通知系统出现故障或者某些目标用户的流量暴增时,导致的消息推送时效降低的问题,提高了消息推送的时效。A message push method provided by an embodiment of the present disclosure, on the one hand, receives a unified push message sent by an external system where the target user is located, and analyzes the unified push message to obtain push content included in the unified push message, transmission protocol and transmission address; according to the topic of the message queue corresponding to the unified push message, determine the message forwarder corresponding to the target user; use the message forwarder to send the message according to the transmission protocol and the transmission address The push content is pushed to the target user, so that the target user can view the push content. Since the push content included in the unified push message is pushed to the target user through the message forwarding party, it solves the problem of the prior art. Among them, when accessing different external systems, the notification system needs to be developed again, which reduces the coupling between the target user and the notification system; on the other hand, since different target users correspond to different message forwarders, and through different The message forwarding party pushes messages to different target users, which solves the problem in the prior art that when the merchant notification system fails or the traffic of some target users increases sharply, the timeliness of message push is reduced, and the message push time is improved. time limit.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。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.
附图说明Description of 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. Apparently, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings according to these drawings without creative efforts.
图1示意性示出根据本发明示例实施例的一种消息推送方法的流程图。Fig. 1 schematically shows a flowchart of a message pushing method according to an exemplary embodiment of the present invention.
图2示意性示出根据本发明示例实施例的一种消息推送系统的框图。Fig. 2 schematically shows a block diagram of a message push system according to an exemplary embodiment of the present invention.
图3示意性示出根据本发明示例实施例的一种消息队列的主题的示意图。Fig. 3 schematically shows a schematic diagram of a topic of a message queue according to an exemplary embodiment of the present invention.
图4示意性示出根据本发明示例实施例的一种利用杰夫协议将推送内容推送到目标用户的方法流程图。Fig. 4 schematically shows a flow chart of a method for pushing push content to target users using the Jeff protocol according to an exemplary embodiment of the present invention.
图5示意性示出根据本发明示例实施例的一种建立长连接的方法流程图。Fig. 5 schematically shows a flowchart of a method for establishing a persistent connection according to an exemplary embodiment of the present invention.
图6示意性示出根据本发明示例实施例的一种目标用户接收到推送内容后的一种消息推送方法。Fig. 6 schematically shows a message push method after a target user receives push content according to an exemplary embodiment of the present invention.
图7示意性示出根据本发明示例实施例的一种消息推送方法的场景示意图。Fig. 7 schematically shows a schematic diagram of a scenario of a message pushing method according to an exemplary embodiment of the present invention.
图8示意性输出根据本发明示例实施例的一种消息推送方法的流程图。Fig. 8 schematically outputs a flowchart of a message pushing method according to an exemplary embodiment of the present invention.
图9示意性示出根据本发明示例实施例的一种消息推送装置的框图。Fig. 9 schematically shows a block diagram of a message push device according to an exemplary embodiment of the present invention.
图10示意性示出根据本发明示例实施例的一种用于实现上述消息推送方法的电子设备。Fig. 10 schematically shows an electronic device for implementing the above message pushing method according to an exemplary embodiment of the present invention.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本发明将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本发明的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本发明的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本发明的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many 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 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 in order to give a thorough understanding of embodiments of the invention. However, those skilled in the art will appreciate that the technical solution of the present invention may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. 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 repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and/or processor means and/or microcontroller means.
现有技术中的商户通知系统针对每个接入的外部系统都需要进行系统开发,导致系统耦合严重;且未对重要商户以及普通商户进行分级处理,当商户通知系统出现故障时,影响所有商户,导致消息推送时效较低;在进行消息传输时,只支持超文本传输协议,并且当通知系统出现故障时,不能对通知失败的通知内容进行记录,当故障恢复后,通知失败的通知内容丢失,无法再次进行通知。The merchant notification system in the prior art requires system development for each connected external system, resulting in serious system coupling; and it does not classify important merchants and ordinary merchants. When the merchant notification system fails, all merchants will be affected. , resulting in low message push timeliness; when transmitting messages, only 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 restored, the notification content of the notification failure is lost , the notification cannot be made again.
基于上述一个或者多个问题,本示例实施方式首先提供了一种消息推送方法,该方法可以运行于服务器、服务器集群或云服务器等,当然,本领域技术人员也可以根据需求在其他平台运行本发明的方法,本示例实施例对此不做具体限定。参考图1所示,该消息推送方法可以包括以下步骤:Based on one or more of the above problems, this exemplary embodiment firstly provides a message push method, which can run on a server, server cluster, or cloud server, etc. Of course, those skilled in the art can also run this message on other platforms according to requirements. The inventive method is not specifically limited in this exemplary embodiment. Referring to Fig. 1, the message push method may include the following steps:
步骤S110.接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;Step S110. Receive the unified push message sent by the external system where the target user is located, and analyze the unified push message to obtain the push content, transmission protocol and transmission address included in the unified push message;
步骤S120.根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;Step S120. Determine the message forwarder corresponding to the target user according to the subject of the message queue corresponding to the unified push message;
步骤S130.利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。Step S130. Using the message forwarder to push the push content to the target user according to the transmission protocol and the transmission address, so that the target user can view the push content.
上述消息推送方法,一方面,接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看,由于是通过消息转发方将统一推送消息中包括的推送内容推送至目标用户,解决了现有技术中,当接入不同的外部系统时,需要对通知系统再次进行开发,降低了目标用户与通知系统之间的耦合;另一方面,由于不同的目标用户对应不同的消息转发方,并且通过不同的消息转发方对不同的目标用户进行消息推送,解决了现有技术中,当商户通知系统出现故障或者某些目标用户的流量暴增时,导致的消息推送时效降低的问题,提高了消息推送的时效。The above message push method, on the one hand, receives a unified push message sent by an external system where the target user is located, and analyzes the unified push message to obtain the push content, transmission protocol, and transmission address included in the unified push message; The subject of the message queue corresponding to the unified push message, determine the message forwarder corresponding to the target user; use the message forwarder to push the push content to the target user according to the transmission protocol and the transmission address The target user is described so that the target user can view the push content. Since the push content included in the unified push message is pushed to the target user through the message forwarder, it solves the problem in the prior art when accessing different When using an external system, the notification system needs to be redeveloped to reduce the coupling between the target user and the notification system; on the other hand, since different target users correspond to different message forwarders, and different message Target users push messages, which solves the problem in the prior art that the timeliness of message pushes decreases when the merchant notification system fails or the traffic of some target users increases sharply, and improves the timeliness of message pushes.
以下,对本公开示例实施例的消息推送方法中涉及的各步骤进行详细的解释以及说明。In the following, each step involved in the message push method of the exemplary embodiment of the present disclosure will be explained and described in detail.
首先,对本公开示例实施例的应用场景以及发明目的进行解释以及说明。First, the application scenarios and the purpose of the invention of the exemplary embodiments of the present disclosure are explained and described.
具体的,本公开示例实施例可以用于通知系统中,确定与目标用户对应的数据转发方,通过数据转发方将统一推送消息中包括的推送内容推送至目标用户,降低了目标用户与通知系统之间的耦合,并且当一些目标用户的流量突然暴增时,通过不同的数据转发方,减少了对其他目标用户的推送时效的影响。Specifically, the exemplary embodiments of the present disclosure can be used in a notification system to determine the data forwarder corresponding to the target user, and push the push content included in the unified push message to the target user through the data forwarder, reducing the number of problems between the target user and the notification system. and when the traffic of some target users suddenly increases sharply, through different data forwarders, the impact on the push timeliness of other target users is reduced.
本公开示例实施例以接收到的统一推送消息为基础,当接收到统一推送消息之后,对该统一推送消息进行解析,得到统一推送消息中包括的推送内容、传输协议以及传输地址,并通过统一推送消息对应的消息队列的主题,确定与目标用户对应的数据转发方,降低了目标用户与通知系统之间的耦合;其次,当确定数据转发方之后,利用数据转发方,根据解析得到的传输协议以及传输地址将推送内容推送至目标用户,当其中一些目标用户的流量突然增大时,通过不同的数据转发方进行推送,不会影响所有目标用户的推送时效,提高了消息推送的效率。The exemplary embodiments of the present disclosure are based on the received unified push message. After receiving the unified push message, the unified push message is analyzed to obtain the push content, transmission protocol and transmission address included in the unified push message, and pass the unified The topic of the message queue corresponding to the push message determines the data forwarder corresponding to the target user, which reduces the coupling between the target user and the notification system; secondly, after the data forwarder is determined, the data forwarder is used to transfer data according to the analysis. The protocol and transmission address will push the push content to the target users. When the traffic of some target users suddenly increases, the push will be done through different data forwarders, which will not affect the push timeliness of all target users and improve the efficiency of message push.
其次,对本公开示例实施例中涉及的消息推送系统进行解释以及说明。参考图2所示,该消息推送系统可以包括:外部系统210、通知系统220、通知系统前置230、目标用户客户端240以及任务平台250。其中,外部系统210,可以包括一个或者多个目标用户客户端240,用于发送统一推送消息,其中,统一推送消息中包括推送内容、传输协议、传输地址以及接入来源;通知系统220,与外部系统210网络连接,用于接收外部系统210发送的统一推送消息,对接收到的统一推送消息进行解析,得到推送内容、传输协议、传输地址以及接入来源,并根据统一推送消息的接入来源确定与目标用户对应的数据发送方;通知系统前置230,即,数据转发方,与通知系统220网络连接,用于根据传输地址以及传输协议,将推送内容推送至目标用户;目标用户客户端240,可以包括普通目标用户客户端以及重要目标用户(客流量、发展潜力等多方面都处于优势的目标用户)客户端,用于接收通知系统前置230发送的推送内容;任务平台250,用于存储推送成功的推送内容、目标用户发送的推送成功的消息以及推送失败的推送内容。Secondly, the message push system involved in the exemplary embodiment of the present disclosure is explained and illustrated. Referring to FIG. 2 , the message push system may include: an
以下,将结合图2对步骤S110-步骤S130进行解释以及说明。Hereinafter, step S110-step S130 will be explained and described in conjunction with FIG. 2 .
在步骤S110中,接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址。In step S110, the unified push message sent by the external system where the target user is located is received, and the unified push message is analyzed to obtain the push content, transmission protocol and transmission address included in the unified push message.
其中,统一推送消息可以为一个也可以为多个,统一推送消息的数据格式是由通知系统定义的,外部系统发送的统一推送消息中包括的推送内容是经过加密的,加解密的算法由该外部系统包括的目标用户与该外部系统共同决定,其中,加解密算法可以为对称加密算法,也可以为非对称加密算法,在本实施例中不做具体限定。其中,传输协议可以为超文本传输协议,也可以为杰夫协议,在本实施例中不做具体限定。Among them, the unified push message can be one or multiple. The data format of the unified push message is defined by the notification system. The push content included in the unified push message sent by the external system is encrypted, and the encryption and decryption algorithm is determined by the The target users included in the external system are determined jointly with the external system, where the encryption and decryption algorithm may be a symmetric encryption algorithm or an asymmetric encryption algorithm, which is not specifically limited in this embodiment. Wherein, the transmission protocol may be hypertext transfer protocol or Jeff protocol, which is not specifically limited in this embodiment.
具体的,外部系统210根据通知系统定义的推送消息的格式生成统一推送消息,并将该统一推送消息发送至通知系统220,其中,统一推送消息中包括的推送内容是经过加密的,保证了消息传输的安全性,当通知平台220接收到外部系统发送的统一推送消息后,对该统一推送消息进行解析,得到该统一推送消息所包括的推送内容、传输协议、传输地址以及接入来源。通过通知系统定义推送消息的格式以及外部系统对通知内容进行加密,并把加密过的推送内容、传输地址以及传输协议封装成统一推送消息,降低了推送系统与目标用户之间的耦合。Specifically, the
在步骤S120中,根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方。In step S120, a message forwarder corresponding to the target user is determined according to the topic of the message queue corresponding to the unified push message.
其中,在消息队列的队列模型中,任何一条消息只能被其中的一个接收者收到,但是在本示例实施例中,外部系统与消息转发方之间的关系可以为一对一,也可以为一对多,为了保证所有的目标用户都能通过消息转发方接收到外部系统推送的推送内容,因此,可以采用另一种消息模型:“发布-订阅”模型;消息队列的主题即为消息的“发布-订阅”模型中包括的主题;参考图3所示,在发布订阅模型中包括外部系统(发布者)301、主题以及消息转发方(订阅者)302,其中,主题用于存放发布者发布的消息,并将存放的消息转发给订阅该主题的所有消息转发方。消息转发方与主题之间的订阅,既可以是一个订阅的动作,也可以是主题在消费时的一个逻辑副本,在每一份订阅中,所有的订阅者都可以接收到主题的所有消息。Among them, in the queue model of the message queue, any message can only be received by one of the receivers, but in this example embodiment, the relationship between the external system and the message forwarder can be one-to-one, or For one-to-many, in order to ensure that all target users can receive the push content pushed by the external system through the message forwarder, another message model can be adopted: "publish-subscribe" model; the topic of the message queue is the message The topics included in the "publish-subscribe" model; as shown in Figure 3, the publish-subscribe model includes an external system (publisher) 301, a topic, and a message forwarder (subscriber) 302, wherein the topic is used to store the published The message published by the author, and forward the stored message to all message forwarders who subscribe to the topic. The subscription between the message forwarder and the topic can be either a subscription action or a logical copy of the topic during consumption. In each subscription, all subscribers can receive all the messages of the topic.
在本示例实施例中,根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方,包括:In this example embodiment, according to the subject of the message queue corresponding to the unified push message, determining the message forwarder corresponding to the target user includes:
建立所述消息转发方与所述主题的订阅关系;其中,一个消息转发方对应一个或者多个所述目标用户;Establish a subscription relationship between the message forwarder and the topic; wherein, one message forwarder corresponds to one or more of the target users;
根据所述统一推送消息包括的接入来源,确定与所述统一推送消息对应的所述目标用户以及与所述目标用户对应的主题;determining the target user corresponding to the unified push message and the topic corresponding to the target user according to the access source included in the unified push message;
根据与所述目标用户对应的主题,获取订阅所述主题的消息转发方According to the topic corresponding to the target user, obtain the message forwarder who subscribes to the topic
具体的,首先,建立消息转发方和主题之间的订阅关系,即,当主题接收到外部系统发送的推送内容后,可以将接收到的推送内容全部发送至消息转发方,即通知系统前置230;然后,获取统一推送消息中包括的接入来源,其中,接入来源用于确定与统一推送消息对应的目标用户以及与该目标用户对应的主题,即,根据该接入来源可以确定与统一推送消息对应的目标用户以及与该目标用户对应的主题;最后,当得到与目标用户对应的主题之后,可以根据主题与消息转发方之间的订阅关系,确定订阅该主题的所有消息转发方。Specifically, first, establish a subscription relationship between the message forwarder and the topic, that is, when the topic receives the push content sent by the external system, it can send all the received push content to the message forwarder, that is, the
在步骤S130中,利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。In step S130, the message forwarding party is used to push the pushed content to the target user according to the transmission protocol and the transmission address, so that the target user can view the pushed content.
其中,传输协议可以为超文本传输协议,也可以为杰夫协议,在本实施例中不做具体限定。当传输协议为超文本传输协议时,每当有新的请求发送时,都会有对应的新的响应生成。杰夫协议,采用Netty(基于NIO(New IO,新的输入输出)的客户、服务器端的编程框架)来实现网络协议栈,异步事件通讯框架,Netty的NIO模型是Reactor发应堆模型(Reactor可以为有分发功能的多路复用器),每一个连接对应一个通道;具体的,参照图4所示,当所述传输协议为杰夫协议时,根据所述传输协议以及所述传输地址,将所述推送内容推送至所述外部系统包括的目标用户,可以包括步骤S410-步骤S430:Wherein, the transmission protocol may be hypertext transfer protocol or Jeff protocol, which is not specifically limited in this embodiment. When the transmission protocol is the hypertext transfer protocol, whenever a new request is sent, a corresponding new response will be generated. The Jeff protocol uses Netty (a client-side and server-side programming framework based on NIO (New IO, new input and output)) to implement the network protocol stack and asynchronous event communication framework. Netty's NIO model is the Reactor response heap model (Reactor can For a multiplexer with a distribution function), each connection corresponds to a channel; specifically, as shown in Figure 4, when the transmission protocol is the Jeff protocol, according to the transmission protocol and the transmission address, Pushing the push content to the target users included in the external system may include step S410-step S430:
步骤S410.对所述传输地址进行解析,得到与所述传输地址对应的域名;Step S410. Analyzing the transfer address to obtain a domain name corresponding to the transfer address;
步骤S420.根据所述域名查询域名系统,得到与所述域名对应的互联网协议地址;Step S420. Query the domain name system according to the domain name, and obtain the IP address corresponding to the domain name;
步骤S430.基于所述互联网协议地址建立长连接,并通过所述长连接,将所述推送内容推送至外部系统所包括的目标用户。Step S430. Establish a persistent connection based on the Internet protocol address, and push the pushing content to target users included in the external system through the persistent connection.
以下,将对步骤S410-步骤S430进行解释以及说明。首先,对统一推送消息中包括的传输地址进行解析,得到与该传输地址对应的域名;其次,根据该域名获得与该域名对应的IP地址(Internet Protocol Address,互联网协议);最后,基于该IP地址建立长连接,并通过该长连接将推送内容推送至目标用户。其中,参考图5所示,建立长连接可以包括步骤S510-步骤S530:Hereinafter, step S410-step S430 will be explained and illustrated. First, analyze the transmission address included in the unified push message to obtain the domain name corresponding to the transmission address; secondly, obtain the IP address (Internet Protocol Address, Internet Protocol) corresponding to the domain name according to the domain name; finally, based on the IP The address establishes a long connection, and pushes the push content to the target user through the long connection. Wherein, as shown in FIG. 5, establishing a persistent connection may include steps S510-step S530:
步骤S510.建立外部系统与服务器之间的通道;Step S510. Establishing a channel between the external system and the server;
步骤S520.利用通道向服务器发送心跳包;Step S520. Using the channel to send a heartbeat packet to the server;
步骤S530.向服务器发送推送内容,当服务器一段时间没收到心跳包或者外部系统主动关闭之后关闭连接。Step S530. Send push content to the server, and close the connection when the server does not receive a heartbeat packet for a period of time or the external system actively closes.
以下,将对步骤S510-步骤S530进行解释以及说明。首先,建立外部系统与服务器之间的连接,该连接可以为Channel(通道),且该连接可以保存在Map集合中,唯一标识可以为该通道的哈希值,在连接建立成功后不立即断开,并在连接的基础上可以进行多次消息交互;然后,利用通道向服务器发送心跳包,其中心跳包用来保持通道的active(正在使用)状态;最后,当通道处于active状态时,基于该通道发送推送内容,当服务器在一段时间内没有收到心跳包或者外部系统主动关闭之后,连接关闭。杰夫协议由于采用长连接,降低了数据传输耗时并且减少了建立以及关闭连接的开销。Hereinafter, step S510-step S530 will be explained and described. First, establish a connection between the external system and the server. The connection can be a Channel (channel), and the connection can be saved in a Map collection. The unique identifier can be the hash value of the channel, and it will not be disconnected immediately after the connection is successfully established. Open, and multiple message interactions can be performed on the basis of the connection; then, use the channel to send a heartbeat packet to the server, and the heartbeat packet is used to keep the active (in use) state of the channel; finally, when the channel is in the active state, based on This channel sends push content. When the server does not receive a heartbeat packet within a period of time or the external system actively shuts down, the connection is closed. Due to the use of long connections, the Jeff protocol reduces the time-consuming data transmission and reduces the overhead of establishing and closing connections.
当传输协议为超文本传输协议时,将推送内容推送至外部系统包括的目标用户,可以包括以下步骤:首先,对传输地址进行解析,获得域名;其次,根据域名获得与该域名对应的IP地址(Internet Protocol Address,互联网协议);最后,通过三次握手建立TCP(Transmission Control Protocol,传输控制协议)连接,基于建立的TCP连接将推送内容推送至目标用户。When the transmission protocol is the hypertext transfer protocol, pushing the push content to the target users included in the external system may include the following steps: firstly, analyzing the transmission address to obtain the domain name; secondly, obtaining the IP address corresponding to the domain name according to the domain name (Internet Protocol Address, Internet Protocol); Finally, establish a TCP (Transmission Control Protocol, Transmission Control Protocol) connection through a three-way handshake, and push the push content to the target user based on the established TCP connection.
参考图6所示,当外部系统中包括的目标用户接收到推送内容之后,消息推送方法还可以包括步骤S610以及步骤S620:Referring to FIG. 6 , after the target user included in the external system receives the push content, the message push method may further include step S610 and step S620:
步骤S610.当所述推送内容推送成功时,接收所述目标用户发送的推送成功的消息,将所述推送内容以及所述目标用户发送的推送成功的消息进行存储,并且对所述推送成功的内容进行标记;Step S610. When the push content is successfully pushed, receive the push success message sent by the target user, store the push content and the push success message sent by the target user, and store the push success message sent by the target user. mark the content;
步骤S620.当所述推送内容推送失败时,对所述推送失败的推送内容进行标记以及保存,并在预设的时间间隔内对所述推送失败的推送内容进行推送。Step S620. When the push content fails to be pushed, mark and save the push content that fails to be pushed, and push the push content that fails to be pushed within a preset time interval.
以下,将对步骤S610以及步骤S620进行解释以及说明。具体的,当消息转发方将推送内容推送至目标用户后,还需要判断该推送内容是否成功推送至目标用户;当该推送内容成功推送至目标用户时,目标用户会发送推送成功的消息至通知系统前置230,通知系统前置230再将推送成功的消息发送至通知系统220,通知系统220将该推送成功的消息以及成功推送的推送内容保存至任务平台250,并且将该推送成功的内容标记为推送成功;当由于网络问题或者目标用户系统问题等原因导致推送内容推送失败后,数据转发方,即,通知系统前置230将推送失败的消息异步发送到通知系统220,通知系统将推送失败的推送内容保存至任务平台,并且将该推送内容标记为推送失败,并且任务平台250会在预设时间间隔内对标记为失败的推送内容进行再次推送,其中,预设的时间间隔可以为1s,5s,10s,20s,40s,90s,在本实施例中不做具体限定;任务平台250会在预设时间间隔内对标记为失败的推送内容进行再次推送,包括:Hereinafter, step S610 and step S620 will be explained and described. Specifically, after the message forwarder pushes the push content to the target user, it needs to judge whether the push content is successfully pushed to the target user; when the push content is successfully pushed to the target user, the target user will send a push success message to the notification The
确定与推送失败的推送内容对应的统一推送消息;Determining a unified push message corresponding to the push content that failed to push;
获取与所述统一推送消息对应的消息转发方,利用所述消息转发方,在预设的时间间隔内将所述推送失败的推送内容再次推送至所述目标用户。Obtain a message forwarder corresponding to the unified push message, and use the message forwarder to push the push content that failed to be pushed to the target user again within a preset time interval.
具体的,当推送内容推送失败时,即,推送系统前置在预设时间内没有接收到目标用户发送的推送成功的消息时,任务平台回调通知系统,通知系统确定与该推送失败的推送内容对应的统一推送消息,并将该统一推送消息异步转发到与目标用户对应的主题,使得推送系统前置获取该统一推送消息,并将该统一推送消息转发至目标用户。Specifically, when the push of the push content fails, that is, when the push system does not receive the push success message sent by the target user within the preset time, the task platform calls back the notification system, and the notification system determines the push content related to the push failure The corresponding unified push message is forwarded asynchronously to the topic corresponding to the target user, so that the push system obtains the unified push message in advance and forwards the unified push message to the target user.
在推送失败的推送内容再次推送之后,该消息推送方法还包括:当接收到所述目标用户发送的推送成功的消息后,停止在预设的时间间隔内对所述目标用户推送所述推送失败的推送内容。具体的,在任务平台250回调通知系统的过程中,当通知系统接收到目标用户发送的推送成功的消息之后,通知系统向任务平台发送推送成功的消息,将该推送内容的状态由推送失败状态修改为推送成功,并且任务平台停止在预设的时间间隔内向目标用户发送推送内容。After the failed push content is pushed again, the message push method further includes: after receiving the push success message sent by the target user, stop pushing the push failure to the target user within a preset time interval push content. Specifically, in the process of the
在本示例实施例中,在对推送成功的内容标记并保存之后,该消息推送方法还包括:In this example embodiment, after marking and saving the successfully pushed content, the message pushing method further includes:
获取所述推送内容保存时的唯一标识,基于所述唯一标识获取与所述唯一标识对应的推送成功的推送内容;Obtaining the unique identifier when the push content is saved, and obtaining the successfully pushed push content corresponding to the unique identifier based on the unique identifier;
基于预设的时间,将所述推送成功的所述推送内容再次推送至所述目标用户。Based on the preset time, the pushed content that is successfully pushed is pushed to the target user again.
具体的,当推送内容推送成功且目标用户在某一时间需要该推送内容时,可以根据该推送内容保存时产生的唯一标识,在任务平台中获取与该唯一标识对应的推送内容,并且根据用户预设的某一时间,将该推送内容发送至目标用户,提高了消息推送的效率。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 obtained in the task platform according to the unique identifier generated when the push content is saved, and according to the user The push content is sent to the target user at a preset time, which improves the efficiency of message push.
进一步的,本示例实施例中包括的数据发送方可以为多个,每个数据发送方可以对应一个或者多个目标用户,目标用户可以为目标商户,目标用户还可以为重要目标用户或者普通目标用户,参考图7所示,外部系统710包括的目标用户可以为普通目标用户731以及重要目标用户732,其中,普通目标用户可以包括:普通目标用户1、普通目标用户2、普通目标用户3,其中,普通目标用户1、普通目标用户2、普通目标用户3对应的数据转发方为721通知系统前置1,重要目标用户对应的数据转发方为722通知系统前置2,当某一时刻重要目标用户732的流量暴增时,若普通目标用户与重要目标用户的数据转发方为同一个通知系统前置时,会影响所有目标用户的推送时效,但是当采用不同的数据转发方时,不会对普通目标用户的推送时效产生影响。Further, there may be multiple data senders included in this example embodiment, each data sender may correspond to one or more target users, the target users may be target merchants, and target users may also be important target users or common targets Users, as shown in FIG. 7 , the target users included in the
本公开示例实施例提供的消息推送方法以及消息推送系统至少具有以下优点:对目标用户进行分级处理,且不同等级的商户对应不同的数据发送方,当系统出现故障或者一些目标商户的流量暴增时,不会影响所有目标用户的推送时效;另一方面,当系统故障,推送内容推送失败后,对推送失败的推送内容进行保存,以使得故障恢复后,可以对推送失败的推送内容再次进行推送,提高了推送效率;再一方面,传输协议支持杰夫协议,降低了数据传输的总耗时以及连接建立以及关闭的开销,提高了数据传输的效率。The message push method and the message push system provided by the exemplary embodiments of the present disclosure have at least the following advantages: target users are classified and processed, and merchants of different levels correspond to different data senders. When the system fails or the traffic of some target merchants increases sharply , it will not affect the push timeliness of all target users; on the other hand, when the system fails and the push content fails to be pushed, the failed push content will be saved, so that after the fault is recovered, the failed push content can be pushed again. Pushing improves the push efficiency; on the other hand, the transmission protocol supports the Jeff protocol, which reduces the total time-consuming data transmission and the overhead of connection establishment and closing, and improves the efficiency of data transmission.
以下,结合图8对本公开示例实施例的消息推送方法进行进一步的解释以及说明。其中,消息推送方法可以包括以下步骤:Hereinafter, the message pushing method of the exemplary embodiment of the present disclosure will be further explained and illustrated with reference to FIG. 8 . Wherein, the message push method may include the following steps:
步骤S800.外部系统向通知系统发送统一推送消息;Step S800. The external system sends a unified push message to the notification system;
步骤S802.通知系统将统一推送消息中包括的推送内容异步推送至通知系统前置;Step S802. The notification system asynchronously pushes the push content included in the unified push message to the front of the notification system;
步骤S804.通知系统前置将推送内容推送至目标用户;Step S804. Notify the system to push the pushed content to the target user;
步骤S806.目标用户将推送成功的消息推送至当通知系统前置;Step S806. The target user pushes the successful push message to the current notification system;
步骤S808.通知系统前置将推送成功的消息转发至通知系统;Step S808. The notification system pre-forwards the push success message to the notification system;
步骤S810.通知系统将推送成功的推送内容以及推送成功消息保存至任务平台;Step S810. The notification system saves the successfully pushed content and the successfully pushed message to the task platform;
步骤S812.当通知系统前置没有接收到目标用户发送的推送成功的消息时,将推送失败的消息发送给通知系统;Step S812. When the notification system does not receive the push success message sent by the target user, send the push failure message to the notification system;
步骤S814.通知系统将推送失败的推送内容保存至任务平台;Step S814. Notify the system to save the push content that failed to push to the task platform;
步骤S816.任务平台对通知系统进行回调,以对推送失败的推送内容再次进行推送;Step S816. The task platform calls back the notification system to push the push content that failed to push again;
步骤S818.当任务平台回调成功,通知系统停止发送与推送失败的推送内容对应的统一推送消息。Step S818. When the callback of the task platform is successful, the notification system stops sending the unified push message corresponding to the push content that failed to push.
本公开示例实施例还提供了一种消息推送装置,参考图9所示,该消息推送装置可以包括:统一推送消息接收模块910、消息转发方确定模块920、消息推送模块930。其中:The exemplary embodiment of the present disclosure also provides a message push device, as shown in FIG. in:
统一推送消息接收模块910,用于接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;The unified push
消息转发方确定模块920,用于根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;A message
消息推送模块930,用于利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。The
在在本公开的一种示例性实施例中,根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方,包括:In an exemplary embodiment of the present disclosure, determining the message forwarder corresponding to the target user according to the topic of the message queue corresponding to the unified push message includes:
建立所述消息转发方与所述主题的订阅关系;Establish a subscription relationship between the message forwarder and the topic;
根据所述统一推送消息包括的接入来源,确定与所述统一推送消息对应的所述目标用户以及与所述目标用户对应的主题;determining the target user corresponding to the unified push message and the topic corresponding to the target user according to the access source included in the unified push message;
根据与所述目标用户对应的主题,获取订阅所述主题的消息转发方。According to the topic corresponding to the target user, the message forwarders subscribing to the topic are obtained.
在本公开的一种示例性实施例中,所述传输协议包括超文本传输协议或者杰夫协议;In an exemplary embodiment of the present disclosure, the transmission protocol includes hypertext transfer protocol or Jeff protocol;
其中,当所述传输协议为杰夫协议时,根据所述传输协议以及所述传输地址,将所述推送内容推送至外部系统所包括的目标用户,包括:Wherein, when the transmission protocol is the Jeff protocol, according to the transmission protocol and the transmission address, pushing the push content to the target users included in the external system includes:
对所述传输地址进行解析,得到与所述传输地址对应的域名;Analyzing the transfer address to obtain a domain name corresponding to the transfer address;
根据所述域名查询域名系统,得到与所述域名对应的互联网协议地址;Querying the Domain Name System according to the domain name to obtain an Internet Protocol address corresponding to the domain name;
基于所述互联网协议地址建立长连接,并通过所述长连接,将所述推送内容推送至外部系统所包括的目标用户。A persistent connection is established based on the Internet protocol address, and the push content is pushed to target users included in the external system through the persistent connection.
在本公开的一种示例性实施例中,在将所述推送内容推送至外部系统所包括的目标用户之后,所述消息推送方法还包括:In an exemplary embodiment of the present disclosure, after pushing the push content to target users included in the external system, the message push method further includes:
当所述推送内容推送成功时,接收所述目标用户发送的推送成功的消息,将所述推送内容以及所述目标用户发送的推送成功的消息进行存储,并且对所述推送成功的内容进行标记;When the push content is successfully pushed, receive the push success message sent by the target user, store the push content and the push success message sent by the target user, and mark the push success content ;
当所述推送内容推送失败时,对所述推送失败的推送内容进行标记以及保存,并在预设的时间间隔内对所述推送失败的推送内容进行推送。When the pushing of the push content fails, mark and save the push content that fails to be pushed, and push the push content that fails to be pushed within a preset time interval.
在本公开的一种示例性实施例中,在对所述推送成功的内容进行标记之后,所述消息推送方法还包括:In an exemplary embodiment of the present disclosure, after marking the successfully pushed content, the message pushing method further includes:
获取所述推送内容保存时的唯一标识,基于所述唯一标识获取与所述唯一标识对应的推送成功的推送内容;Obtaining the unique identifier when the push content is saved, and obtaining the successfully pushed push content corresponding to the unique identifier based on the unique identifier;
基于预设的时间,将所述推送成功的所述推送内容再次推送至所述目标用户。Based on the preset time, the pushed content that is successfully pushed is pushed to the target user again.
在本公开的一种示例性实施例中,在预设的时间间隔内对所述推送失败的推送内容进行推送,包括:In an exemplary embodiment of the present disclosure, pushing the push content that failed to push within a preset time interval includes:
确定与推送失败的推送内容对应的统一推送消息;Determining a unified push message corresponding to the push content that failed to push;
获取与所述统一推送消息对应的消息转发方,利用所述消息转发方,在预设的时间间隔内将所述推送失败的推送内容再次推送至所述目标用户。Obtain a message forwarder corresponding to the unified push message, and use the message forwarder to push the push content that failed to be pushed to the target user again within a preset time interval.
在本公开的一种示例性实施例中,在预设的时间间隔内对所述推送失败的推送内容进行推送之后,所述消息推送方法还包括: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 push method further includes:
当接收到所述目标用户发送的推送成功的消息后,停止在预设的时间间隔内对所述目标用户推送所述推送失败的推送内容。After receiving the push success message sent by the target user, stop pushing the push content that failed to be pushed to the target user within a preset time interval.
上述消息推送装置中各模块的具体细节已经在对应的消息推送方法中进行了详细的描述,因此此处不再赘述。The specific details of each module in the above message push device have been described in detail in the corresponding message push method, so details will not be repeated here.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. Actually, according to the embodiment of the present invention, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided to be embodied by a plurality of modules or units.
此外,尽管在附图中以特定顺序描述了本发明中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the steps of the methods of the present invention are described in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
在本发明的示例性实施例中,还提供了一种能够实现上述数据转换方法的电子设备。In an exemplary embodiment of the present invention, an electronic device capable of implementing the above data conversion method is also provided.
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present invention can be implemented as systems, methods or program products. Therefore, various aspects of the present invention can be embodied in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "circuit", "module" or "system".
下面参考图10来描述根据本发明的这种实施方式的电子设备1000。图10显示的电子设备1000仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。An
如图10所示,电子设备以通用计算设备的形式表现。电子设备的组件可以包括但不限于:上述至少一个处理单元1010、上述至少一个存储单元1020、连接不同系统组件(包括存储单元1020和处理单元1010)的总线1030以及显示单元1040。As shown in Figure 10, the electronic device takes the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元1010执行,使得所述处理单元1010执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。例如,所述处理单元1010可以执行如图1中所示的步骤S110:接收目标用户所在的外部系统发送的统一推送消息,并对所述统一推送消息进行解析,获取所述统一推送消息中包括的推送内容、传输协议以及传输地址;步骤S120:根据与所述统一推送消息对应的消息队列的主题,确定与所述目标用户对应的消息转发方;步骤S130:利用所述消息转发方根据所述传输协议以及所述传输地址,将所述推送内容推送至所述目标用户,以使得所述目标用户对所述推送内容进行查看。Wherein, the storage unit stores program codes, and the program codes can be executed by the
存储单元1020可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)10201和/或高速缓存存储单元10202,还可以进一步包括只读存储单元(ROM)10203。The
存储单元1020还可以包括具有一组(至少一个)程序模块10205的程序/实用工具10204,这样的程序模块10205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The
总线1030可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备1000也可以与一个或多个外部设备1100(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备1000交互的设备通信,和/或与使得该电子设备1000能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1050进行。并且,电子设备1000还可以通过网络适配器1060与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器1060通过总线1030与电子设备1000的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备1000使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本发明实施方式的方法。Through the description of the above implementations, those skilled in the art can easily understand that the example implementations described here can be implemented by software, or by combining software 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, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on a network , including several instructions to make a computing device (which may be a personal computer, server, terminal device, or network device, etc.) execute the method according to the embodiment of the present invention.
在本发明的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。In an exemplary embodiment of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the above-mentioned method in this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above in this specification.
根据本发明的实施方式的用于实现上述方法的程序产品,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。According to the program product for implementing the above method according to the embodiment of the present invention, it may adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and may run on a terminal device such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product may reside on any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。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.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language. 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 to execute. In cases involving a remote computing device, the remote computing device 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 an external computing device (e.g., using an Internet service provider). business to connect via the Internet).
此外,上述附图仅是根据本发明示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not imply or limit the chronological order of these processes. In addition, it is also easy to understand that these processes may be executed synchronously or asynchronously in multiple modules, for example.
本领域技术人员在考虑说明书及实践这里发明的发明后,将容易想到本发明的其他实施例。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未发明的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由权利要求指出。Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention invented herein. This application is intended to cover any modification, use or adaptation of the present invention, these modifications, uses or adaptations follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not invented by the present invention . The specification and examples are to be considered exemplary only, with the true scope and spirit of the invention indicated by the appended claims.
Claims (9)
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 (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113569146B (en) * | 2021-07-27 | 2025-06-13 | 网易传媒科技(北京)有限公司 | Message push method and device, storage medium, and electronic device |
| CN114449029A (en) * | 2022-01-27 | 2022-05-06 | 中国建设银行股份有限公司 | Business data acquisition method, system, device, computer equipment and storage medium |
| CN114465976B (en) * | 2022-01-28 | 2024-06-14 | 深圳快银付科技集团有限公司 | Method and device for distributing and aggregating messages |
Citations (2)
| 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)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102859541A (en) * | 2010-04-19 | 2013-01-02 | 国际商业机器公司 | 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 push method, device, push server and readable storage medium |
-
2021
- 2021-02-09 CN CN202110181986.7A patent/CN112887420B/en active Active
Patent Citations (2)
| 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 |
|---|---|---|
| US11438291B2 (en) | Message history display system and method | |
| US9794365B2 (en) | Re-establishing push notification channels via user identifiers | |
| US8914493B2 (en) | Presence-based event driven architecture | |
| CN112887420B (en) | Message pushing method and device, computer readable storage medium and electronic equipment | |
| WO2020258912A1 (en) | Blockchain consensus method, device and system | |
| US11868707B2 (en) | Information interaction method and apparatus, server, system, and storage medium | |
| US20240214472A1 (en) | Communication protocol conversion method, and device, system, and gateway device | |
| US10447620B2 (en) | Structured communication framework | |
| CN112019596B (en) | Message push method, device and electronic device based on message routing configuration | |
| CN113810264B (en) | Information transmission method, device, electronic equipment and storage medium | |
| WO2021155683A1 (en) | Log printing method and apparatus, electronic device, and storage medium | |
| CN111988386A (en) | A cloud management platform real-time message push method, device and computer readable medium | |
| CN115361455A (en) | Data transmission and storage method and device and computer equipment | |
| CN100421431C (en) | A method for realizing instant message communication | |
| CN114866533A (en) | File uploading method and device and electronic equipment | |
| CN111242776A (en) | Blockchain-based accounting method, device, storage medium and electronic device | |
| CN116887420A (en) | Data transmission method, device, electronic equipment and computer-readable storage medium | |
| CN115086425B (en) | Message transmission method, device, program product, medium and electronic equipment | |
| WO2023130845A1 (en) | Communication method and apparatus, and computer-readable storage medium, electronic device and program product | |
| US11463549B2 (en) | Facilitating inter-proxy communication via an existing protocol | |
| CN113079055B (en) | AGV operation data dynamic acquisition method and device | |
| CN115866048A (en) | Data processing method and device, storage medium, electronic device | |
| CN113726827B (en) | Data packet processing method and device based on distributed cluster | |
| CN115914210A (en) | File transmission method, device and system based on virtual network | |
| CN115914422A (en) | A design method and system for TCP message communication architecture |
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 | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: 100086 Room 719, Building A, Zhongding Building, No. 18 Jia, North Third Ring West Road, Haidian District, Beijing Patentee after: Online Banking (Beijing) Payment Technology Co.,Ltd. Country or region after: China Address before: 100086 Room 719, Building A, Zhongding Building, No. 18 Jia, North Third Ring West Road, Haidian District, Beijing Patentee before: CHINABANK PAYMENTS (BEIJING) TECHNOLOGY CO.,LTD. Country or region before: China |