CN114531481A - Message pushing method and system - Google Patents
Message pushing method and system Download PDFInfo
- Publication number
- CN114531481A CN114531481A CN202011210174.2A CN202011210174A CN114531481A CN 114531481 A CN114531481 A CN 114531481A CN 202011210174 A CN202011210174 A CN 202011210174A CN 114531481 A CN114531481 A CN 114531481A
- Authority
- CN
- China
- Prior art keywords
- message
- server
- user terminal
- region
- determining
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请公开了一种消息推送方法和系统,该方法包括:应用服务器确定待推送的多条消息内容;应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息;应用服务器将每个分组消息发送至与分组消息对应的地域服务器;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。可以解决消息推送过程中网络开销大,推送效率低下的问题。
The present application discloses a message pushing method and system. The method includes: an application server determining the contents of multiple messages to be pushed; the application server determining at least one grouped message corresponding to at least one regional server based on the multiple message contents; Each grouping message is sent to the region server corresponding to the grouping message; for each region server, after receiving the calling request sent by the user terminal, it is determined whether to send the message content in the grouping message to the user terminal based on the calling request. It can solve the problems of high network overhead and low push efficiency during the message push process.
Description
技术领域technical field
本申请一般涉及数据推送技术领域,具体涉及一种消息推送方法和系统。The present application generally relates to the technical field of data push, and specifically relates to a message push method and system.
背景技术Background technique
消息推送技术在提高应用程序(英文:Application;简称:APP)的用户粘度和活跃用户数量等方面都起到了重要作用,用户终端和应用程序的应用服务器之间通过建立网络连接,实现应用服务器向用户终端的消息推送。The message push technology has played an important role in improving the user viscosity and the number of active users of the application (English: Application; Abbreviation: APP). Push messages from the user terminal.
相关技术中,消息推送的实现过程一般是:在用户终端连接到应用服务器后,应用服务器为用户终端开启一个线程,并将待推送的消息内容存放至消息队列,用户终端通过连接该线程消费该消息队列中的消息内容,实现消息推送。In the related art, the implementation process of message push is generally as follows: after the user terminal is connected to the application server, the application server opens a thread for the user terminal, and stores the content of the message to be pushed in the message queue, and the user terminal consumes the message by connecting to the thread. The message content in the message queue implements message push.
但是,在该消息推送的过程中,由于应用服务器在完成一个用户终端的消息推送后,才能进行下一个终端的消息推送,当应用服务器面对大量的跨地域用户终端需要进行消息推送的场景时,需要不断的切换线程,会导致网络开销大,消息推送效率低下,会出现消息推送延迟现象,用户无法获得良好的APP使用体验。However, in the process of message push, since the application server can push the message of the next terminal after completing the message push of one user terminal, when the application server faces a large number of cross-region user terminals that need to push the message , which requires constant switching of threads, which will result in high network overhead, low message push efficiency, delay in message push, and users cannot get a good APP experience.
发明内容SUMMARY OF THE INVENTION
鉴于现有技术中的上述缺陷或不足,期望提供一种可以降低网络开销,提高消息推送效率的消息推送方法和系统。In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a message push method and system that can reduce network overhead and improve message push efficiency.
第一方面,本申请实施例提供一种消息推送方法,包括:In a first aspect, an embodiment of the present application provides a message push method, including:
应用服务器确定待推送的多条消息内容;The application server determines the content of multiple messages to be pushed;
应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息;The application server determines at least one grouped message corresponding to the at least one regional server based on the contents of the plurality of messages;
应用服务器将每个分组消息发送至与分组消息对应的地域服务器;The application server sends each grouped message to the region server corresponding to the grouped message;
对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。For each regional server, after receiving the call request sent by the user terminal, it is determined whether to send the message content in the packet message to the user terminal based on the call request.
第二方面,本申请实施例提供一种消息推送系统,应用服务器、至少一个地域服务器和至少一个用户终端,In a second aspect, an embodiment of the present application provides a message push system, including an application server, at least one regional server, and at least one user terminal,
应用服务器,用于确定待推送的多条消息内容,基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息,将每个分组消息发送至与分组消息对应的地域服务器;an application server, configured to determine the contents of a plurality of messages to be pushed, determine at least one grouped message corresponding to at least one regional server based on the contents of the plurality of messages, and send each grouped message to the regional server corresponding to the grouped message;
地域服务器,用于接收应用服务器发送的分组消息,对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。The regional server is used for receiving the grouping message sent by the application server. For each region server, after receiving the calling request sent by the user terminal, it determines whether to send the message content in the grouping message to the user terminal based on the calling request.
本申请的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
本申请实施例提供的消息推送方法和系统,应用服务器确定待推送的多条消息内容;应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息;应用服务器将每个分组消息发送至与分组消息对应的地域服务器;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。实现针对不同地域的用户终端的消息内容的批量推送,降低了网络开销,提高消息推送的效率,解决消息推送的延迟现象。In the message pushing method and system provided by the embodiments of the present application, the application server determines the content of multiple messages to be pushed; the application server determines at least one grouped message corresponding to at least one regional server based on the content of the multiple messages; the application server sends each grouped message Send to the regional server corresponding to the grouped message; for each regional server, after receiving the invocation request sent by the user terminal, determine whether to send the message content in the grouped message to the user terminal based on the invocation request. Realize the batch push of message content for user terminals in different regions, reduce network overhead, improve the efficiency of message push, and solve the delay phenomenon of message push.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1为申请实施例提供的一种消息推送系统的结构示意图;1 is a schematic structural diagram of a message push system provided by an embodiment of the application;
图2为申请实施例提供的一种消息推送方法的流程图;FIG. 2 is a flowchart of a message pushing method provided by an embodiment of the application;
图3为申请实施例提供的一种应用服务器的结构示意图;3 is a schematic structural diagram of an application server provided by an embodiment of the application;
图4为申请实施例提供的另一种应用服务器的结构示意图;4 is a schematic structural diagram of another application server provided by an embodiment of the application;
图5为申请实施例提供的一种地域服务器的结构示意图。FIG. 5 is a schematic structural diagram of a regional server provided by an embodiment of the application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
图1为本申请实施例提供的消息推送方法涉及的消息推送系统的结构示意图,如图1所示,该消息推送系统100包括:应用服务器110、至少一个地域服务器120和与每个地域服务器对应的至少一个用户终端130,该每个地域服务器120部署于一个推送地域,用于为该推送地域中使用APP的用户终端130提供消息推送服务。FIG. 1 is a schematic structural diagram of a message push system involved in a message push method provided by an embodiment of the present application. As shown in FIG. 1 , the message push system 100 includes: an
其中,该应用服务器110,用于确定待推送的多条消息内容,基于多条消息内容确定与至少一个地域服务器120对应的至少一个分组消息,将每个分组消息发送至与分组消息对应的地域服务器120,其中,该消息内容为应用服务器120获取的第三方服务器中的消息内容。示例的,若该APP为炒股APP,该第三方服务器为银行系统的服务器,交易所系统的服务器或/和证券公司系统的服务器。The
地域服务器120,用于接收应用服务器120发送的分组消息,对于每个地域服务器,接收到用户终端130发送的调用请求后,基于该调用请求确定是否将分组消息中的消息内容发送至该用户终端130。The
可选的,该应用服务器110和每个地域服务器120之间通过地域专线建立有线或无线网络通信连接,地域服务器120与用户终端130之间通过有线或无线网络建立通信连接。其中,上述的无线网络或有线网络使用标准通信技术和/或协议。网络通常为因特网、但也可以是任何网络,包括但不限于局域网(Local Area Network,LAN)、城域网(MetropolitanArea Network,MAN)、广域网(Wide Area Network,WAN)、移动、有线或者无线网络、专用网络或者虚拟专用网络的任何组合。该应用服务器110和地域服务器120可以是一台服务器,也可以是由若干台服务器构成的服务器集群,或者应用服务器110和地域服务器120可以包含一个或多个虚拟化平台,或者应用服务器110和地域服务器120可以是一个云计算服务中心。该用户终端130可以是智能手机、平板电脑、台式电脑或者电子阅读器等设备。Optionally, a wired or wireless network communication connection is established between the
本申请实施例提供一种消息推送方法,该方法可以应用于如图1所示的消息推送系统中,如图2所示,该方法包括:An embodiment of the present application provides a message push method, which can be applied to the message push system shown in FIG. 1 . As shown in FIG. 2 , the method includes:
步骤201、应用服务器确定待推送的多条消息内容。Step 201: The application server determines the contents of multiple messages to be pushed.
在本步骤中,应用服务器可以从与该应用服务器连接的至少一个第三方服务器中获取消息内容,将该消息内容存储至消息数据库,将数据库中存储的多条消息内容确定为待推送的多条消息内容。其中,该应用服务器可以通过接口服务器与该第三方服务器建立连接,以通过该接口服务器从第三方服务器中获取第三方服务器中的消息内容。可选的,该应用服务器可以从第三方服务器中实时获取消息内容,将实时获取的消息内容存储至消息数据库;或者,该应用服务器按照预设周期从第三方服务器中获取消息内容,将在每个周期内获取的消息内容存储至消息数据库,其中,该预设周期可以基于实际需要确定,本申请实施例对此不做限定。In this step, the application server may obtain the message content from at least one third-party server connected to the application server, store the message content in the message database, and determine the multiple message contents stored in the database as the multiple messages to be pushed. Message content. The application server may establish a connection with the third-party server through the interface server, so as to obtain the message content in the third-party server from the third-party server through the interface server. Optionally, the application server may acquire the message content in real time from the third-party server, and store the real-time acquired message content in the message database; or, the application server may acquire the message content from the third-party server according to a preset period, and will The content of the messages acquired within each cycle is stored in the message database, where the preset cycle may be determined based on actual needs, which is not limited in this embodiment of the present application.
可选的,在应用服务器获取消息内容的过程中,可能会获取到同一消息属性的消息内容,为了便于消息的存储,提高存储空间的利用率和消息内容的查询效率,在应用服务器获取多条消息内容的过程中,可以确定预设时长内是否获取到同一消息属性的至少两条消息内容,若是,将至少两条消息内容组合为批量消息,将批量消息确定为消息内容存储于消息数据库中,将多个批量消息确定为待推送的多条消息内容。其中,该消息属性可以为消息内容的类型、消息内容的来源或者消息内容的功能等。Optionally, in the process of obtaining the message content by the application server, the message content of the same message attribute may be obtained. In the process of message content, it can be determined whether at least two message contents of the same message attribute are obtained within a preset time period, and if so, the at least two message contents are combined into batch messages, and the batch messages are determined as message contents and stored in the message database , and multiple batch messages are determined as the contents of multiple messages to be pushed. The message attribute may be the type of the message content, the source of the message content, or the function of the message content, and the like.
步骤202、应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息。Step 202: The application server determines at least one grouping message corresponding to at least one regional server based on the contents of the multiple messages.
在本申请实施例中,应用服务器可以对至少一个推送地域的地域服务器进行分组消息分发服务,每个地域服务器在接收到应用服务器发送的分组消息后,可以基于该分组消息为接入该地域服务器的用户终端提供消息推送服务。其中,该分组消息是应用服务器基于预设时期内接入每个地域服务器的至少一个用户终端中,与每个用户账号对应的订阅消息中的消息属性确定的。由于接入每个地域服务器的至少一个用户终端中,每个用户账号的订阅消息不同,应用服务器为每个地域服务器可以生成的分组消息不同。其中,该用户账号可以为用户终端中搭载的APP中登录的用户账号,应用服务器可以为该APP提供消息推送服务,该订阅消息为与用户账号对应用户订阅的消息内容的消息属性集合,该预设时期可以基于实际需要确定,本申请实施例对此不做限定。In this embodiment of the present application, the application server may perform grouping message distribution services for at least one regional server that pushes the region. After receiving the grouping message sent by the application server, each region server may access the region server based on the grouping message. The user terminal provides message push service. The grouping message is determined by the application server based on a message attribute in a subscription message corresponding to each user account in at least one user terminal that accesses each regional server within a preset period. Since the subscription messages of each user account are different in at least one user terminal accessing each regional server, the application server can generate different grouping messages for each regional server. The user account may be a user account logged in an APP carried in the user terminal, the application server may provide a message push service for the APP, and the subscription message is a set of message attributes corresponding to the user account of the message content subscribed by the user. The set period may be determined based on actual needs, which is not limited in this embodiment of the present application.
在本步骤中,对于每个地域服务器,应用服务器可以从多条消息内容中筛选与地域服务器匹配的至少一条消息内容,生成与地域服务器对应的分组消息,该过程可以是:应用服务器可以间隔第一预设时长,读取推送地域的地域服务器发送的用户信息表中提供的,预设时期内接入该地域服务器的至少一个用户终端中与每个用户账号对应的订阅信息;从获取的消息数据库中存储的多条消息内容中,筛选出与每个订阅消息中的消息属性对应的至少一条消息内容;将至少一条消息内容打包并分配与地域服务器对应的地域编号生成与地域服务器对应的分组消息。其中,该第一预设时长可以基于实际需要确定,本申请实施例对此不做限定。其中,该用户信息表用于存储用户终端的终端标识和用户账号的对应关系,和/或存储用户终端的终端标识、用户账号和订阅消息的对应关系。可以理解的是,若与用户信息表中存储了一条终端标识和用户账号的对应关系,表明与该用户账户对应用户没有订阅任何消息。In this step, for each regional server, the application server may select at least one message content matching the regional server from multiple message contents, and generate a grouped message corresponding to the regional server. The process may be: the application server may For a preset duration, read the subscription information corresponding to each user account in at least one user terminal that accesses the regional server provided in the user information table sent by the regional server of the push region; From the multiple message contents stored in the database, filter out at least one message content corresponding to the message attribute in each subscription message; package the at least one message content and assign a region number corresponding to the regional server to generate a group corresponding to the regional server information. The first preset duration may be determined based on actual needs, which is not limited in this embodiment of the present application. Wherein, the user information table is used to store the corresponding relationship between the terminal identifier of the user terminal and the user account, and/or store the corresponding relationship between the terminal identifier of the user terminal, the user account and the subscription message. It can be understood that if a corresponding relationship between a terminal identifier and a user account is stored in the user information table, it indicates that the user corresponding to the user account has not subscribed to any messages.
需要说明的是,在本申请实施例中,每个地域服务器可以在预设时期内,将与该地域服务器对应的用户信息表进行更新,该用户信息比表的更新可以是:删除预设时期内注销用户账号的用户信息、增加新注册用户账号的用户信息和保存未进行信息变更的用户账号的用户信息,将更新后的用户信息表发送至应用服务器进行存储,以使应用服务器基于更新后的用户信息表为该地域服务器匹配分组消息,由于该用户信息是不断更新的,应用服务器可以为该地域服务器匹配更精确的分组消息。It should be noted that, in this embodiment of the present application, each regional server may update the user information table corresponding to the regional server within a preset period, and the update of the user information ratio table may be: deleting the preset period The user information of the user account for internal cancellation, the addition of the user information of the newly registered user account, and the user information of the user account whose information has not been changed are saved, and the updated user information table is sent to the application server for storage, so that the application server can be based on the updated user information. The user information table of the user information table matches the grouping message for the region server. Since the user information is constantly updated, the application server can match the region server with more accurate grouping messages.
其中,地域服务器在用户信息表中增加新注册用户账号的用户信息的过程可以是:对于任一用户终端,用户终端响应于用户的用户账号注册操作,向与该用户终端最接近的地域服务器发送用户账号注册请求,地域服务器可以响应于该用户账号注册请求完成用户账号注册,并获取用户终端的终端标识、用户账号,将二者的对应关系确定为用户信息,或获取用户终端的终端标识、用户账号和订阅消息,三者的对应关系确定为用户信息,将用户信息存储于该地域服务器的用户信息表中。由于可以按照就近原则将用户终端接入服务器进行用户账号注册和消息推送,可以提高用户账号的注册效率和消息推送的效率,优化用户的使用体验。The process of adding the user information of the newly registered user account by the regional server in the user information table may be: for any user terminal, the user terminal responds to the user's user account registration operation, and sends a message to the regional server closest to the user terminal. User account registration request, the regional server can complete the user account registration in response to the user account registration request, and obtain the terminal identification and user account of the user terminal, determine the corresponding relationship between the two as user information, or obtain the terminal identification of the user terminal, The corresponding relationship between the user account and the subscription message is determined as user information, and the user information is stored in the user information table of the regional server. Since the user terminal can be connected to the server to perform user account registration and message push according to the principle of proximity, the efficiency of user account registration and message push can be improved, and the user experience can be optimized.
步骤203、应用服务器将每个分组消息发送至与分组消息对应的地域服务器。
在本申请实施例中,应用服务器与每个地域服务器之间通过地域专线连接,在本步骤中,应用服务器可以通过与每个地域服务器对应的地域专线,将每个分组消息发送至与分组消息对应的地域服务器。可以提高分组消息的分发效率,解决消息推送延迟现象。In this embodiment of the present application, the application server and each regional server are connected through a regional dedicated line. In this step, the application server may send each grouped message to the corresponding grouped message through the regional dedicated line corresponding to each regional server. The corresponding regional server. The distribution efficiency of grouped messages can be improved, and the phenomenon of message push delay can be solved.
可选的,应用服务器将每个分组消息发送至与分组消息对应的地域服务器的过程可以是:对于每个分组消息,读取每个分组消息中的地域编号,确定与地域编号对应的地域服务器,将分组消息发送至该地域服务器。Optionally, the process for the application server to send each grouping message to the region server corresponding to the grouping message may be: for each grouping message, reading the region number in each grouping message, and determining the region server corresponding to the region number. , and send the packet message to the regional server.
需要说明的是,在本申请实施例中,当地域服务器接收到应用服务器发送的分组消息后,可以向应用服务器反馈分组消息成功接收信息;或者,当任一地域服务器在间隔第一预设时长后未接收到应用服务器发送的分组消息,可以向应用服务器发送提示信息,以提示应用服务器向该地域服务器发送分组消息。It should be noted that, in this embodiment of the present application, after receiving the grouping message sent by the application server, the local area server may feed back information on the successful reception of the grouping message to the application server; If the grouping message sent by the application server is not received, prompt information may be sent to the application server to prompt the application server to send the grouping message to the region server.
步骤204、对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。Step 204: For each regional server, after receiving the invocation request sent by the user terminal, determine whether to send the message content in the grouped message to the user terminal based on the invocation request.
在本步骤中,对于每个地域服务器,该地域服务器可以接收应用服务器发送的分组消息,将该分组消息中的至少一条消息内容存入下发队列;当用户在用户终端中启用该APP后,该用户终端可以接入地域服务器,向地域服务器发送调用请求,地域服务器接收到用户终端发送的调用请求后,可以基于该调用请求确定是否将分组消息中的消息内容发送至用户终端。In this step, for each regional server, the regional server can receive the grouping message sent by the application server, and store at least one message content in the grouping message into the delivery queue; after the user enables the APP in the user terminal, The user terminal can access the regional server and send a calling request to the regional server. After receiving the calling request sent by the user terminal, the regional server can determine whether to send the message content in the packet message to the user terminal based on the calling request.
可选的,地域服务器基于调用请求确定是否将分组消息中的消息内容发送至用户终端的过程可以是:基于调用请求判断用户终端是否为有权终端;若是,确定分组消息中与用户终端对应的消息内容;将与用户终端对应的消息内容发送至用户终端,以使用户终端显示消息内容;当地域服务器确定该用户终端为无权终端时,向用户终端发送提示消息,以提示用户进行消息订阅。其中,有权终端为具备分组消息接收权利的用户终端,用户终端接入的地域服务器可以为:利用用户终端上搭载的APP进行用户账号注册时接入的地域服务。Optionally, the process of the regional server determining whether to send the message content in the grouping message to the user terminal based on the calling request may be: based on the calling request, judging whether the user terminal is an authorized terminal; message content; send the message content corresponding to the user terminal to the user terminal, so that the user terminal can display the message content; when the domain server determines that the user terminal is an unauthorized terminal, send a prompt message to the user terminal to prompt the user to subscribe to the message . The authorized terminal is a user terminal with the right to receive packet messages, and the regional server accessed by the user terminal may be: a regional service accessed when the user account is registered by using an APP mounted on the user terminal.
其中,用户终端发送的调用请求可以包括用户终端的终端标识和用户账号,则该地域服务器基于调用请求判断用户终端是否为有权终端的过程可是:将终端标识和用户账号与预先存储的用户信息表中的至少一组终端标识和用户账号进行比对;若比对成功,确定与用户账号对应的订阅消息中的消息属性;若分组消息中存在与消息属性对应的消息内容,确定用户终端为有权终端;若比对不成功,或者,分组消息中不存在与该消息属性对应的消息内容,确定用户终端为无权终端。Wherein, the calling request sent by the user terminal may include the terminal identification and user account of the user terminal, and the process of determining whether the user terminal is an authorized terminal based on the calling request by the regional server may be: combining the terminal identification and user account with the pre-stored user information At least one group of terminal identifiers in the table is compared with the user account; if the comparison is successful, the message attribute in the subscription message corresponding to the user account is determined; if there is a message content corresponding to the message attribute in the grouped message, the user terminal is determined as Authorized terminal; if the comparison is unsuccessful, or the message content corresponding to the message attribute does not exist in the grouped message, it is determined that the user terminal is an unauthorized terminal.
可以理解的是,在本申请实施例中,确定分组消息中与用户终端对应的消息内容的过程可以是:确定分组消息中与消息属性对应的消息内容;将消息内容确定为与用户终端对应的消息内容。It can be understood that, in this embodiment of the present application, the process of determining the message content corresponding to the user terminal in the grouping message may be: determining the message content corresponding to the message attribute in the grouping message; determining the message content as corresponding to the user terminal. Message content.
需要说明的是,在本申请实施例中,地域服务器是利用协程技术将与用户终端对应的消息内容发送至用户终端的,即使地域服务器确定多个接入该地域服务器中的用户终端为有权终端,需要同时向该多个用户终端发送消息内容,也可以以最低的网络开销实现消息内容的发送,降低地域服务器的数据处理压力,提高消息推送效率。It should be noted that, in this embodiment of the present application, the regional server sends the content of the message corresponding to the user terminal to the user terminal by using the coroutine technology, even if the regional server determines that multiple user terminals accessing the regional server are available The right terminal needs to send message content to the multiple user terminals at the same time, and the message content can also be sent with the lowest network overhead, which reduces the data processing pressure of the regional server and improves the message push efficiency.
可选的,在本申请实施例中,对于有权终端,当地域服务器向该用户终端发送消息内容后,可以获取该用户终端的终端标识、用户账号和向用户终端发送的消息内容,生成消息推送表,将该消息推送表发送至应用服务器,该应用服务器可以基于该消息推送表分析消息推送结果。Optionally, in this embodiment of the present application, for an authorized terminal, after the local domain server sends the content of the message to the user terminal, it can obtain the terminal identifier of the user terminal, the user account, and the content of the message sent to the user terminal, and generate a message. A push table is sent, and the message push table is sent to the application server, and the application server can analyze the message push result based on the message push table.
示例的,对于某一炒股APP,假设该炒股APP的应用服务器S与A地域的地域服务器A1、B地域的地域服务器B1和C地域的地域服务器C1通过三条通信专线建立连接,该应用服务器S与交易所系统的服务器、银行系统的服务器和证券公司系统的服务器通过接口服务器建立连接,其中,该应用服务器S可以实时从交易所服务器获取多个股票交易行情变化信息、从证券公司服务器获取多个交易市场资产分布数据,从银行服务器获取用户资产数据,将其存储于消息数据库中,并确定为待推送的多条消息内容。For example, for a stock trading APP, it is assumed that the application server S of the stock trading APP establishes connections with the regional server A1 in the A region, the regional server B1 in the B region, and the regional server C1 in the C region through three dedicated communication lines. The server of the exchange system, the server of the bank system, and the server of the securities company system are connected through the interface server, wherein the application server S can obtain a plurality of stock trading market change information from the exchange server in real time, and obtain a plurality of information from the securities company server. For asset distribution data in the trading market, user asset data is obtained from the bank server, stored in the message database, and determined as the content of multiple messages to be pushed.
进一步的,假设应用服务器S确定地域服务器A1提供的7天内的用户信息表中存储了20个用户信息,假设与12个用户账号对应有订阅消息,与该订阅消息中的消息属性对应的消息内容为股票交易行情变化信息和交易市场资产分布数据。则可以每隔5分钟从消息数据库中读取股票交易行情变化信息和交易市场资产分布数据,组成地域服务器A1的分组消息M1,将该分组消息M1发送至地域服务器A1。Further, it is assumed that the application server S determines that 20 user information are stored in the user information table provided by the regional server A1 within 7 days, and it is assumed that there are subscription messages corresponding to 12 user accounts, and the message content corresponding to the message attribute in the subscription message. It provides information on changes in stock trading conditions and asset distribution data in the trading market. Then, the stock trading market change information and the trading market asset distribution data can be read from the message database every 5 minutes to form a grouped message M1 of the regional server A1, and the grouped message M1 can be sent to the regional server A1.
地域服务器A1接收该分组消息M1,将其中的股票交易行情变化信息和交易市场资产分布数据存入下发队列。当接收到用户终端发送的调用请求后,获取调用请求中的终端标识a1和用户账号c1,将终端标识a1、用户账号c1和该地域服务器A1中存储的用户信息表中的20组终端标识和用户账号进行比对,假设比对成功,确定与用户账号c1对应的订阅消息中的消息属性,确定消息队列中的股票交易行情变化信息和交易市场资产分布数据中,与该消息属性对应的消息内容为股票交易行情变化信息,将股票交易行情变化信息确定为与终端标识为a1的用户终端对应的消息内容,将该股票交易行情变化信息发送至终端标识为a1的用户终端。The regional server A1 receives the grouped message M1, and stores the stock trading market change information and the trading market asset distribution data in the delivery queue. After receiving the call request sent by the user terminal, obtain the terminal identifier a1 and the user account c1 in the call request, and compare the terminal identifier a1, the user account c1 and the 20 groups of terminal identifiers and the user information table stored in the regional server A1. The user accounts are compared. Assuming that the comparison is successful, the message attributes in the subscription messages corresponding to the user account c1 are determined, and the information corresponding to the message attributes in the stock trading market change information in the message queue and the asset distribution data in the trading market is determined. The content is stock transaction quotation change information, and the stock transaction quotation change information is determined as the message content corresponding to the user terminal whose terminal identifier is a1, and the stock transaction quotation change information is sent to the user terminal whose terminal identifier is a1.
综上所述,本申请实施例提供的消息推送方法,应用服务器确定待推送的多条消息内容;应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息;应用服务器将每个分组消息发送至与分组消息对应的地域服务器;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。实现针对不同地域的用户终端的消息内容的批量推送,降低了网络开销,提高消息推送的效率,解决消息推送的延迟现象。To sum up, in the message push method provided by the embodiments of the present application, the application server determines the contents of multiple messages to be pushed; the application server determines at least one grouped message corresponding to at least one regional server based on the contents of the multiple messages; Each grouping message is sent to the region server corresponding to the grouping message; for each region server, after receiving the invocation request sent by the user terminal, it determines whether to send the message content in the grouping message to the user terminal based on the invocation request; for each region After receiving the calling request sent by the user terminal, the server determines whether to send the message content in the packet message to the user terminal based on the calling request. Realize the batch push of message content for user terminals in different regions, reduce network overhead, improve the efficiency of message push, and solve the delay phenomenon of message push.
本申请实施例一种消息推送系统,该消息推送系统的结构示意图如图1所示,该消息推送系统100包括:应用服务器110、至少一个地域服务器120和至少一个用户终端130,An embodiment of the present application is a message push system. A schematic structural diagram of the message push system is shown in FIG. 1 . The message push system 100 includes: an
其中,如图3所示,该应用服务器110包括:Wherein, as shown in FIG. 3, the
业务接入模块111,被配置为确定待推送的多条消息内容,并调用推送引擎模块112向推送引擎模块112发送待推送的多条消息内容;The
推送引擎模块112,被配置为接收待推送的多条消息内容,基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息,并将每个分组消息发送至与分组消息对应的地域服务器。The
可选的,推送引擎模块112,被配置为对于每个地域服务器,从多条消息内容中筛选与地域服务器匹配的至少一条消息内容,生成与地域服务器对应的分组消息。Optionally, the
可选的,推送引擎模块112,被配置为:Optionally, the
确定预设时期内接入地域服务器的至少一个用户终端中,与每个用户账号对应的订阅消息;Determine the subscription message corresponding to each user account in at least one user terminal accessing the regional server within the preset period;
从多条消息内容中筛选出与每个订阅消息中的消息属性对应的至少一条消息内容;Filter out at least one message content corresponding to the message attribute in each subscription message from multiple message contents;
将至少一个消息内容打包并分配与地域服务器对应的地域编号,生成与地域服务器对应的分组消息。Packing at least one message content and assigning an area number corresponding to the area server to generate a grouping message corresponding to the area server.
可选的,推送引擎模块112,被配置为:Optionally, the
对于每个分组消息,读取每个分组消息中的地域编号;For each grouping message, read the region number in each grouping message;
确定与地域编号对应的地域服务器;Determine the region server corresponding to the region number;
将分组消息发送至地域服务器。Send grouped messages to the geoserver.
可选的,业务接入模块111,被配置为确定预设时长内是否获取到同一消息属性的至少两条消息内容;Optionally, the
若是,将至少两条消息内容组合为批量消息,将批量消息确定为待推送的消息内容。If so, combine at least two message contents into a batch message, and determine the batch message as the message contents to be pushed.
可选的,如图4所示,该应用服务器110还包括:Optionally, as shown in FIG. 4 , the
业务接入管理模块113,被配置为调用业务接入模块确定待推送的多条消息内容;The service
推送链路管理模块114,被配置为监测每个地域专线的连接状况和各地域专线的负载信息;The push
推送统计报表模块115,被配置为接收个地域服务器发送的消息推送表,基于该消息推送表分析消息推送结果。The push statistics report
其中,对于每个地域服务器,如图5所示,该地域服务器40包括:Wherein, for each regional server, as shown in FIG. 5 , the regional server 40 includes:
地域接入点模块121,被配置为接收应用服务器发送的分组消息;The regional
鉴权模块122,被配置为接收到用户终端发送的调用请求后,基于调用请求判断用户终端是否为有权终端,若是,调用地域接入点模块121,并将判断结果发送至地域接入点模块121;The
地域接入点模块121,被配置为确定分组消息中与用户终端对应的消息内容,将与用户终端对应的消息内容发送至用户终端,以使用户终端显示消息内容。The regional
可选的,鉴权模块122,被配置为:Optionally, the
将终端标识和用户账号与预先存储的用户信息表中的至少一组终端标识和用户账号进行比对;Compare the terminal identification and user account with at least one group of terminal identification and user account in the pre-stored user information table;
若比对成功,确定与用户账号对应的订阅消息中的消息属性;If the comparison is successful, determine the message attribute in the subscription message corresponding to the user account;
若分组消息中存在与消息属性对应的消息内容,确定用户终端为有权终端。If the message content corresponding to the message attribute exists in the grouped message, it is determined that the user terminal is an authorized terminal.
可选的,地域接入点模块121,被配置为:Optionally, the regional
确定分组消息中与消息属性对应的消息内容;Determine the message content corresponding to the message attribute in the packet message;
将消息内容确定为与用户终端对应的消息内容。The message content is determined as the message content corresponding to the user terminal.
需要说明的是,在本申请实施例中,各个模块之间通过流式传输技术实现模块调用与数据交互,可以提高模块之间的数据传输效率,提高消息推送的时效性。It should be noted that, in the embodiments of the present application, module invocation and data interaction are implemented between modules through streaming transmission technology, which can improve data transmission efficiency between modules and improve the timeliness of message push.
综上所述,本申请实施例提供的消息推送系统,应用服务器确定待推送的多条消息内容;应用服务器基于多条消息内容确定与至少一个地域服务器对应的至少一个分组消息;应用服务器将每个分组消息发送至与分组消息对应的地域服务器;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端;对于每个地域服务器,接收到用户终端发送的调用请求后,基于调用请求确定是否将分组消息中的消息内容发送至用户终端。实现针对不同地域的用户终端的消息内容的批量推送,降低了网络开销,提高消息推送的效率,解决消息推送的延迟现象。To sum up, in the message push system provided by the embodiments of the present application, the application server determines the contents of multiple messages to be pushed; the application server determines at least one grouped message corresponding to at least one regional server based on the contents of the multiple messages; Each grouping message is sent to the region server corresponding to the grouping message; for each region server, after receiving the invocation request sent by the user terminal, it determines whether to send the message content in the grouping message to the user terminal based on the invocation request; for each region After receiving the calling request sent by the user terminal, the server determines whether to send the message content in the packet message to the user terminal based on the calling request. Realize the batch push of message content for user terminals in different regions, reduce network overhead, improve the efficiency of message push, and solve the delay phenomenon of message push.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above-mentioned features with the technical features disclosed in this application (but not limited to) with similar functions.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011210174.2A CN114531481A (en) | 2020-11-03 | 2020-11-03 | Message pushing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011210174.2A CN114531481A (en) | 2020-11-03 | 2020-11-03 | Message pushing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114531481A true CN114531481A (en) | 2022-05-24 |
Family
ID=81618565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011210174.2A Pending CN114531481A (en) | 2020-11-03 | 2020-11-03 | Message pushing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114531481A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104468649A (en) * | 2013-09-16 | 2015-03-25 | 北大方正集团有限公司 | Server, terminal, data pushing system and data pushing method |
KR20150143202A (en) * | 2014-06-13 | 2015-12-23 | 에스케이텔레콤 주식회사 | Method for processing packet of local domain, apparatus for the same |
CN106549857A (en) * | 2016-11-30 | 2017-03-29 | 济南中维世纪科技有限公司 | A kind of method and system of trans-regional PUSH message |
CN109246220A (en) * | 2018-09-19 | 2019-01-18 | 南方科技大学 | Message pushing system and method |
CN110401840A (en) * | 2018-07-26 | 2019-11-01 | 腾讯科技(深圳)有限公司 | Information push method, device, system, electronic equipment and computer-readable medium |
-
2020
- 2020-11-03 CN CN202011210174.2A patent/CN114531481A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104468649A (en) * | 2013-09-16 | 2015-03-25 | 北大方正集团有限公司 | Server, terminal, data pushing system and data pushing method |
KR20150143202A (en) * | 2014-06-13 | 2015-12-23 | 에스케이텔레콤 주식회사 | Method for processing packet of local domain, apparatus for the same |
CN106549857A (en) * | 2016-11-30 | 2017-03-29 | 济南中维世纪科技有限公司 | A kind of method and system of trans-regional PUSH message |
CN110401840A (en) * | 2018-07-26 | 2019-11-01 | 腾讯科技(深圳)有限公司 | Information push method, device, system, electronic equipment and computer-readable medium |
CN109246220A (en) * | 2018-09-19 | 2019-01-18 | 南方科技大学 | Message pushing system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113972986B (en) | Block chain-based industrial internet identification information analysis method and related device | |
CN112866421B (en) | Intelligent contract operation method and device based on distributed cache and NSQ | |
CN112398845B (en) | Data transmission method, data transmission device, data transmission system and electronic equipment | |
CN104796561A (en) | Agent distribution method, CTI (Computer Telephony Integration) equipment, terminal and agent distribution system | |
CN113688158A (en) | Processing method, device, equipment, system and medium for business rule verification | |
CN111988387B (en) | Interface request processing method, device, equipment and storage medium | |
US12231382B2 (en) | Data processing method and apparatus based on instant messaging, device, and storage medium | |
CN114490826B (en) | Request response method, data storage method, device, server and storage medium | |
CN103546528A (en) | Distributed message push method and system | |
CN116991936A (en) | Block chain-based rights and interests credential management method, apparatus, electronic device and medium | |
CN110995890B (en) | Domain name request scheduling method and device | |
CN116996421B (en) | Network quality detection method and related equipment | |
CN114531481A (en) | Message pushing method and system | |
CN103856557B (en) | The processing method of a kind of business object based on third-party platform and system | |
CN112861004B (en) | A method and device for determining rich media | |
CN108536854A (en) | The method, apparatus and computer readable storage medium of data interaction | |
CN114615315A (en) | Communication method, device, equipment and storage medium for online conversation | |
CN111383003B (en) | Method, device, computer equipment and storage medium for fast platform access | |
CN111953794A (en) | Group cheating and lending early warning method and device | |
CN112035760A (en) | Task allocation method and computer equipment | |
CN115633082B (en) | Identification processing method, device, equipment and storage medium for calling middle service | |
CN114827175B (en) | Registration method, electronic device, and readable storage medium | |
CN111654527B (en) | Message receiving and transmitting method and device | |
US20240372859A1 (en) | Processing method for secure access and electronic equipment | |
CN115202894A (en) | Interface service calling method and device, computer equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220524 |
|
RJ01 | Rejection of invention patent application after publication |