Movatterモバイル変換


[0]ホーム

URL:


CN116567066A - A message forwarding method, message pushing method and system - Google Patents

A message forwarding method, message pushing method and system
Download PDF

Info

Publication number
CN116567066A
CN116567066ACN202310360568.3ACN202310360568ACN116567066ACN 116567066 ACN116567066 ACN 116567066ACN 202310360568 ACN202310360568 ACN 202310360568ACN 116567066 ACN116567066 ACN 116567066A
Authority
CN
China
Prior art keywords
target user
area
information
push message
message
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
Application number
CN202310360568.3A
Other languages
Chinese (zh)
Inventor
秦倩围
方堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huacheng Software Technology Co LtdfiledCriticalHangzhou Huacheng Software Technology Co Ltd
Priority to CN202310360568.3ApriorityCriticalpatent/CN116567066A/en
Publication of CN116567066ApublicationCriticalpatent/CN116567066A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The application relates to a message forwarding method, a message pushing method, a system and a storage medium, wherein the message forwarding method comprises the following steps: acquiring the area information of the target user based on the configuration information of the push message; determining whether the push message needs to be forwarded or not based on the area information of the target user; forwarding the push message to a second area server of the corresponding area under the condition that forwarding is required; the second area server is used for pushing the push message to the corresponding terminal according to the terminal information of the target user. According to the method and the device, the problem of user cross-region is considered in the message pushing process, the pushing message is forwarded according to the region where the user is located, and then pushing is carried out, so that the user terminal can accurately receive the pushing message.

Description

Translated fromChinese
一种消息转发方法、消息推送方法及系统A message forwarding method, message pushing method and system

技术领域technical field

本申请涉及互联网技术领域,特别是涉及一种消息转发方法、消息推送方法及系统。The present application relates to the technical field of the Internet, in particular to a message forwarding method, a message pushing method and a system.

背景技术Background technique

消息推送在如今有较多的应用,例如在应用程序中给相关用户推送系统消息。消息推送在移动互联网时代扮演了重要角色,在提高消息实时性,提高用户粘性,提高应用活跃用户数量等都起到了推动作用。Message push has many applications nowadays, such as pushing system messages to relevant users in the application. Message push has played an important role in the era of mobile Internet. It has played a driving role in improving the real-time performance of messages, improving user stickiness, and increasing the number of active application users.

在消息推送中,最为重要的是保证用户能准确地接收到推送消息。然而随着用户的多样性,比如用户在不同区域,不同国家等,或者用户在不同的时刻位于不同的区域,不同国家。因此,所以针对跨区域用户的情况,在进行消息推送时就需要推送到用户所在的区域。若用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题。In message push, the most important thing is to ensure that the user can receive the push message accurately. However, with the diversity of users, for example, users are in different regions and countries, or users are located in different regions and countries at different times. Therefore, in the case of cross-regional users, it is necessary to push messages to the region where the user is located when pushing messages. If the area where the user terminal is located is not in the same area as the area where the push message is released, it will cause the problem that the user terminal fails to receive the push message.

针对相关技术中,用户终端接收推送消息失败的问题,目前尚未提出有效的解决方案。Aiming at the problem in the related art that the user terminal fails to receive the push message, no effective solution has been proposed yet.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种消息转发方法、消息推送方法、系统及存储介质。Based on this, it is necessary to provide a method for forwarding a message, a method for pushing a message, a system, and a storage medium for the above technical problems.

第一方面,本申请实施例提供了一种消息转发方法,所述方法包括:In the first aspect, the embodiment of the present application provides a message forwarding method, the method including:

基于推送消息的配置信息,获取目标用户的区域信息;Obtain the area information of the target user based on the configuration information of the push message;

基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;Based on the area information of the target user, determine whether the push message needs to be forwarded;

在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。If forwarding is required, the push message is forwarded to a second area server in a corresponding area; the second area server is configured to push the push message to a corresponding terminal according to the terminal information of the target user.

在其中一个实施例中,所述基于推送消息的配置信息,获取目标用户的区域信息之前包括:In one of the embodiments, the configuration information based on the push message, before obtaining the area information of the target user includes:

根据目标用户的注册地址,初始化所述目标用户的区域信息;According to the registered address of the target user, initialize the area information of the target user;

根据所述目标用户登录的IP地址,更新所述目标用户的区域信息。The area information of the target user is updated according to the IP address logged in by the target user.

在其中一个实施例中,所述基于推送消息的配置信息,获取目标用户的区域信息包括:In one of the embodiments, the acquiring area information of the target user based on the configuration information of the push message includes:

基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;Based on the pushing range in the configuration information and the registration address of the target user, determine whether the registration address of the target user is within the pushing range;

在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;When the registered address of the target user is within the pushing range, determine the target user;

基于所述目标用户,获取所述目标用户的区域信息。Based on the target user, area information of the target user is acquired.

在其中一个实施例中,所述基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发包括:In one of the embodiments, the determining whether to forward the push message based on the area information of the target user includes:

获取所述推送消息发布的区域;Obtain the area where the push message is released;

判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;judging whether the area where the push message is released is consistent with the area information of the target user;

若是,则不对所述推送消息进行转发;If so, the push message is not forwarded;

若否,则对所述推送消息进行转发。If not, the push message is forwarded.

在其中一个实施例中,所述根据所述目标用户的终端信息,将所述推送消息推送至对应的终端包括:In one of the embodiments, the pushing the push message to the corresponding terminal according to the terminal information of the target user includes:

基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;Acquiring at least one terminal information of the target user in the corresponding area based on the area information of the target user and the ID of the target user;

基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;determining online terminal information of the target user in the corresponding area based on at least one terminal information of the target user in the corresponding area;

根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。Pushing the push message to the corresponding terminal according to the online terminal information of the target user in the corresponding area.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。Based on the area information of the target user, the terminal information of the target user is stored in an area database of the corresponding area.

第二方面,本申请实施例还提供了消息转发系统,所述系统包括:In the second aspect, the embodiment of the present application also provides a message forwarding system, and the system includes:

获取模块,用于基于推送消息的配置信息,获取目标用户的区域信息;An acquisition module, configured to acquire the area information of the target user based on the configuration information of the push message;

确定模块,用于基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;A determining module, configured to determine whether the push message needs to be forwarded based on the area information of the target user;

转发模块,用于在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。A forwarding module, configured to forward the push message to a second area server in the corresponding area when forwarding is required; the second area server is configured to push the push message according to the terminal information of the target user to the corresponding terminal.

第三方面,本申请实施例提供了一种消息推送方法,所述方法包括:In a third aspect, the embodiment of the present application provides a message push method, the method comprising:

接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;receiving the push message forwarded by the first area server, the first area server being used to obtain the area information of the target user based on the configuration information of the push message; and determining whether to update the push message based on the area information of the target user to forward;

根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。Pushing the push message to a corresponding terminal according to the terminal information of the target user.

第四方面,本申请实施例还提供了一种消息推送系统,所述系统包括:In the fourth aspect, the embodiment of the present application also provides a message push system, the system includes:

接收模块,用于接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;The receiving module is configured to receive the push message forwarded by the first area server, the first area server is used to obtain the area information of the target user based on the configuration information of the push message; based on the area information of the target user, determine whether to Forwarding the push message;

推送模块,用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。A push module, configured to push the push message to a corresponding terminal according to the terminal information of the target user.

第五方面,本申请实施例还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现如上述第一方面或上述第三方面所述方法。In the fifth aspect, the embodiment of the present application also provides a storage medium, in which a computer program is stored, wherein, when the computer program is executed by a processor, the above-mentioned first aspect or the above-mentioned third aspect can be implemented. method.

上述消息转发方法、消息推送方法、系统及存储介质,通过基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。解决了相关技术中当用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题,实现了用户终端能够准确地接收到推送消息。The above message forwarding method, message push method, system, and storage medium obtain the area information of the target user based on the configuration information of the push message; determine whether the push message needs to be forwarded based on the area information of the target user; If it needs to be forwarded, the push message is forwarded to the second area server in the corresponding area; the second area server is used to push the push message to the corresponding terminal according to the terminal information of the target user. It solves the problem in the related art that when the area where the user terminal is located is not in the same area as the area where the push message is released, the user terminal will fail to receive the push message, and the user terminal can accurately receive the push message.

本申请的一个或多个实施例的细节在以下附图和描述中提出,以使本申请的其他特征、目的和优点更加简明易懂。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below, so as to make other features, objects, and advantages of the application more comprehensible.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1是根据本申请实施例的消息转发方法的应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a message forwarding method according to an embodiment of the present application;

图2是根据本申请实施例的消息转发方法的流程示意图;FIG. 2 is a schematic flowchart of a message forwarding method according to an embodiment of the present application;

图3是根据本申请实施例的获取目标用户的区域信息的流程示意图;FIG. 3 is a schematic flow chart of acquiring area information of a target user according to an embodiment of the present application;

图4是根据本申请实施例的确定是否需要对所述推送消息进行转发的流程示意图;Fig. 4 is a schematic flow diagram of determining whether the push message needs to be forwarded according to an embodiment of the present application;

图5是根据本申请实施例的将推送消息推送至对应的终端的流程示意图;FIG. 5 is a schematic flow diagram of pushing a push message to a corresponding terminal according to an embodiment of the present application;

图6是根据本申请实施例的消息转发系统的结构框图;FIG. 6 is a structural block diagram of a message forwarding system according to an embodiment of the present application;

图7是根据本申请实施例的消息转发系统的结构框图;FIG. 7 is a structural block diagram of a message forwarding system according to an embodiment of the present application;

图8是根据本申请实施例的消息推送方法的流程示意图;FIG. 8 is a schematic flowchart of a method for pushing messages according to an embodiment of the present application;

图9是根据本申请实施例的消息推送系统的结构框图。Fig. 9 is a structural block diagram of a message push system according to an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行描述和说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。基于本申请提供的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

显而易见的,下面描述中的附图仅仅是本申请的一些示例或实施例,对于本领域的普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图将本申请应用于其他类似情景。此外,还可以理解的是,虽然这种开发过程中所作出的努力可能是复杂并且冗长的,然而对于与本申请公开的内容相关的本领域的普通技术人员而言,在本申请揭露的技术内容的基础上进行的一些设计,制造或者生产等变更只是常规的技术手段,不应当理解为本申请公开的内容不充分。Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application, and those skilled in the art can also apply the present application to other similar scenarios. In addition, it can also be understood that although such development efforts may be complex and lengthy, for those of ordinary skill in the art relevant to the content disclosed in this application, the technology disclosed in this application Some design, manufacturing or production changes based on the content are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

在本申请中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域普通技术人员显式地和隐式地理解的是,本申请所描述的实施例在不冲突的情况下,可以与其它实施例相结合。Reference in this application to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

除非另作定义,本申请所涉及的技术术语或者科学术语应当为本申请所属技术领域内具有一般技能的人士所理解的通常意义。本申请所涉及的“一”、“一个”、“一种”、“该”等类似词语并不表示数量限制,可表示单数或复数。本申请所涉及的术语“包括”、“包含”、“具有”以及它们任何变形,意图在于覆盖不排他的包含;例如包含了一系列步骤或模块(单元)的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可以还包括没有列出的步骤或单元,或可以还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。本申请所涉及的“连接”、“相连”、“耦接”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电气的连接,不管是直接的还是间接的。本申请所涉及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。本申请所涉及的术语“第一”、“第二”、“第三”等仅仅是区别类似的对象,不代表针对对象的特定排序。Unless otherwise defined, the technical terms or scientific terms involved in the application shall have the usual meanings understood by those with ordinary skill in the technical field to which the application belongs. Words such as "a", "an", "an" and "the" involved in this application do not indicate a limitation on quantity, and may indicate singular or plural numbers. The terms "comprising", "comprising", "having" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or process that includes a series of steps or modules (units). The apparatus is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to the process, method, product or apparatus. The words "connected", "connected", "coupled" and similar words mentioned in this application are not limited to physical or mechanical connection, but may include electrical connection, no matter it is direct or indirect. The "plurality" involved in this application refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships. For example, "A and/or B" may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects, and do not represent a specific ordering of objects.

本申请提供的消息转发方法,可以应用于如图1所示的应用环境中。其中,第一区域服务器102通过网络与第二区域服务器104进行通信。第一区域服务器102首先基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发,在需要转发的情况下,第一区域服务器102再将将所述推送消息转发至对应区域的第二区域服务器104,第二区域服务器104执行根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。通信可以是或包括公共网络(例如,因特网)、卫星网络、路由器、服务器计算机和/或其任何组合。The message forwarding method provided in this application can be applied to the application environment shown in FIG. 1 . Wherein, the first area server 102 communicates with the second area server 104 through the network. The first area server 102 first obtains the area information of the target user based on the configuration information of the push message; based on the area information of the target user, determines whether the push message needs to be forwarded. The server 102 then forwards the push message to the second area server 104 in the corresponding area, and the second area server 104 executes to push the push message to the corresponding terminal according to the terminal information of the target user. Communications can be or include public networks (eg, the Internet), satellite networks, routers, server computers, and/or any combination thereof.

本实施例提供了一种消息转发方法,应用于第一区域服务器,如图2所示,该方法包括以下步骤:This embodiment provides a message forwarding method, which is applied to the first area server, as shown in Figure 2, the method includes the following steps:

步骤S201,基于推送消息的配置信息,获取目标用户的区域信息。Step S201, based on the configuration information of the push message, the area information of the target user is acquired.

在推送消息推送之前,相关人员会配置推送消息的配置信息,所述配置消息包括推送消息的文案、国家、版本、推送时间等信息,并将所述配置信息存储到表中,以推送和查询使用。当对所述推送信息进行推送时,便会根据所述推送消息相关配置信息,获取目标用户的区域信息。Before the push message is pushed, the relevant personnel will configure the configuration information of the push message, which includes information such as the text, country, version, and push time of the push message, and store the configuration information in a table for push and query use. When the push information is pushed, the area information of the target user will be obtained according to the relevant configuration information of the push message.

步骤S202,基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发。Step S202, based on the area information of the target user, determine whether the push message needs to be forwarded.

根据目标用户的区域信息,判断是否需要对所述推送消息进行转发。According to the area information of the target user, it is judged whether the push message needs to be forwarded.

步骤S203,在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。Step S203, if it needs to be forwarded, forward the push message to the second area server in the corresponding area; the second area server is used to push the push message to the corresponding area server according to the terminal information of the target user. terminal.

如果需要转发,则将推送消息转发至目标用户所属区域的第二区域服务器。其中,终端可以但不限于手机、电脑、笔记本、平板电脑等电子终端。If forwarding is required, the push message is forwarded to the second area server in the area to which the target user belongs. Wherein, the terminal may be, but not limited to, electronic terminals such as mobile phones, computers, notebooks, and tablet computers.

所述基于推送消息的配置信息,获取目标用户的区域信息之前包括:根据目标用户的注册地址,初始化所述目标用户的区域信息;跟据所述目标用户登录的IP地址,更新所述目标用户的区域信息。The configuration information based on the push message, before obtaining the area information of the target user, includes: initializing the area information of the target user according to the registration address of the target user; updating the target user according to the IP address logged in by the target user region information.

具体地,当目标用户进行注册操作时,会在应用程序界面选择注册的地址,然后根据注册的地址,初始化所述目标用户的区域信息。Specifically, when the target user performs a registration operation, he will select a registered address on the application program interface, and then initialize the region information of the target user according to the registered address.

然后目标用户每次进行登录时可能会位于不同的区域,因此需要根据目标用户每次登录的IP地址,实时更新目标用户的区域信息。具体为根据登录请求终端的IP地址,获取目标用户当前的区域信息,然后根据目标用户当前的区域信息去更新先前的区域信息。通过实时更新目标用户的区域信息,确保了目标用户区域信息的准确性。解决了当目标用户跨区域从而导致接收消息失败问题,当用户跨区后,若没有根据目标用户实际的区域进行转发推送,而是按照原区域进行推送,则会因消息接收端和发送端不在同一区域导致用户接收失败。Then the target user may be located in a different area each time they log in, so it is necessary to update the area information of the target user in real time according to the IP address of the target user each time they log in. Specifically, according to the IP address of the login request terminal, the current area information of the target user is obtained, and then the previous area information is updated according to the current area information of the target user. By updating the area information of the target user in real time, the accuracy of the area information of the target user is ensured. Solved the problem of failure to receive messages when the target user crosses regions. After the user crosses regions, if the forwarding push is not performed according to the actual region of the target user, but is pushed according to the original region, the message receiving end and sending end will not be The same area caused the user to receive failure.

通过上述步骤S101至步骤S103,通过基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。解决了相关技术中当用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题,实现了用户终端能够准确地接收到推送消息。Through the above steps S101 to S103, the area information of the target user is obtained based on the configuration information of the push message; based on the area information of the target user, it is determined whether the push message needs to be forwarded; if forwarding is required, Forwarding the push message to a second area server in a corresponding area; the second area server is configured to push the push message to a corresponding terminal according to the terminal information of the target user. It solves the problem in the related art that when the area where the user terminal is located is not in the same area as the area where the push message is released, the user terminal will fail to receive the push message, and the user terminal can accurately receive the push message.

在其中一个实施例中,如图3所示,所述基于推送消息的配置信息,获取目标用户的区域信息包括以下步骤:In one of the embodiments, as shown in FIG. 3, the acquisition of the area information of the target user based on the configuration information of the push message includes the following steps:

步骤S301,基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;Step S301, based on the push range in the configuration information and the target user's registered address, determine whether the target user's registered address is within the push range;

推送消息的配置信息中设置了推送范围,例如推送范围可以为中国、美国、英国或者其他的国家,推送范围可以自定义选择。The push range is set in the configuration information of the push message, for example, the push range can be China, the United States, the United Kingdom or other countries, and the push range can be customized.

步骤S302,在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;Step S302, if the registered address of the target user is within the pushing range, determine the target user;

目标用户在注册应用程序时会选择相应的注册地址,即注册的国家。如果用户的注册国家在所述推送范围的国家内,则可以确定对应的目标用户。When registering the application, the target user will choose the corresponding registration address, that is, the country of registration. If the user's registered country is within the push range, the corresponding target user can be determined.

步骤S303,基于所述目标用户,获取所述目标用户的区域信息。Step S303, based on the target user, acquire area information of the target user.

当确定目标用户后,获取所述目标用户的区域信息。After the target user is determined, the area information of the target user is acquired.

在其中一个实施例中,如图4所示,所述基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发包括以下步骤:In one embodiment, as shown in FIG. 4, the determining whether to forward the push message based on the area information of the target user includes the following steps:

步骤S401,获取所述推送消息发布的区域;Step S401, obtaining the area where the push message is released;

步骤S402,判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;Step S402, judging whether the area where the push message is released is consistent with the area information of the target user;

步骤S403,若是,则不对所述推送消息进行转发;Step S403, if yes, do not forward the push message;

步骤S404,若否,则对所述推送消息进行转发。Step S404, if not, forward the push message.

本实施例,通过推送消息发布的区域与目标用户的区域信息,确定是否需要对所述推送消息进行转发,若推送消息发布的区域与目标用户的区域信息不一致,则需要对所述推送消息进行路由转发,通过按照目标用户所在区域进行路由转发到对应区域的协议,保证不同区域用户准确接收到推送消息。In this embodiment, it is determined whether the push message needs to be forwarded through the area information of the push message release and the area information of the target user. If the area information of the push message is inconsistent with the area information of the target user, the push message needs to be forwarded. Routing and forwarding, through the protocol of routing and forwarding to the corresponding area according to the area where the target user is located, to ensure that users in different areas receive push messages accurately.

在其中一个实施例中,如图5所示,所述根据所述目标用户的终端信息,将所述推送消息推送至对应的终端包括以下步骤:In one of the embodiments, as shown in FIG. 5 , the pushing the push message to the corresponding terminal according to the terminal information of the target user includes the following steps:

步骤S501,基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;Step S501, based on the area information of the target user and the ID of the target user, obtain at least one terminal information of the target user in the corresponding area;

具体地,目标用户的区域信息和目标用户的终端信息是通过目标用户的ID进行关联的,因此通过目标用户的ID和目标用户的区域信息,可以获取目标用户在对应区域的至少一个终端信息。Specifically, the area information of the target user and the terminal information of the target user are associated through the ID of the target user, so through the ID of the target user and the area information of the target user, at least one terminal information of the target user in the corresponding area can be obtained.

需要说明的是,所述目标用户在其他区域可能也会有对应的终端信息,因此根据目标用户的区域信息进行筛选,通过目标用户的ID查询所述目标用户在对应区域的至少一个终端信息。因为目标用户在对应的区域可能都会使用不同的终端进行登录,因此在对应的区域中可能会存在多个终端信息。It should be noted that the target user may also have corresponding terminal information in other areas, so screening is performed according to the area information of the target user, and at least one terminal information of the target user in the corresponding area is queried through the ID of the target user. Because the target user may use different terminals to log in in the corresponding area, there may be multiple terminal information in the corresponding area.

步骤S502,基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;Step S502, based on at least one terminal information of the target user in the corresponding area, determine the online terminal information of the target user in the corresponding area;

目标用户的终端信息包括了用户是否在线信息,因此根据目标用户是否在线信息,筛选出目标用户在对应区域的在线终端信息。The terminal information of the target user includes whether the user is online or not, so according to whether the target user is online or not, the online terminal information of the target user in the corresponding area is screened out.

步骤S503,根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。Step S503, push the push message to the corresponding terminal according to the online terminal information of the target user in the corresponding area.

根据目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端,目标用户便可准确地接收到推送信息。According to the online terminal information of the target user in the corresponding area, the push message is pushed to the corresponding terminal, so that the target user can accurately receive the push message.

在其中一个实施例中,消息转发方法还包括:In one of the embodiments, the message forwarding method further includes:

基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。Based on the area information of the target user, the terminal information of the target user is stored in an area database of the corresponding area.

目标用户在进行登录或注册请求时,会获取目标用户的区域信息和目标用户终端信息。首先,将所述目标用户的区域信息存储在用户区域信息表中,具体信息如表一所述,用户区域信息表存储在主库中。其中,ID字段就是指目标用户的身份标识号,每个用户都有唯一的ID号码,用来标识该用户;USER_REGION字段用以标识目标用户所在的区域,其中,USER_REGION字段不是固定不变的,其首次是根据目标用户的注册地址,即用户区域信息表中COUNTRY字段,代表用户注册时选择的国家,根据用户注册时选择的国家初始化USER_REGION字段,例如当国家为中国时,对应的区域为A区域,当国家为美国时,对应的区域为B区域,当国家为菲律宾时,对应的区域也为A区域,国家与区域具体的对应关系是事先设定好的;其次跟据所述目标用户登录的IP地址,更新所述目标用户的区域信息,例如当目标用户第一次登录时的IP地址对应A区域,当该目标用户进行第二次登录时,此时该目标用户去了别的国家,所述国家对应的区域为B区域,此时就需要根据该目标用户第二次登录时的IP地址将USER_REGION字段更新为B区域并存储。其次,根据目标用户区域信息表中的USER_REGION字段,可以确定目标用户所在的区域,通过调用用户分区服务,根据目标用户所在的区域,路由到对应的区域服务,所述区域服务用于将所述目标用户的终端信息存储在对应区域的区域数据库中,所述目标用户的终端信息存储在用户终端信息表中,具体信息如表二所述,用户终端信息表在对应区域的区域数据库中存储,其中,用户区域信息表中的ID字段与用户终端信息表中的USER_ID字段进行关联用于查询。因为目标用户在某一区域可能会使用多个不同的终端进行登录,因此,在用户终端信息表中可能会存在该用户的多个用户终端信息记录,进一步根据用户终端信息表中的IS_ONLINE字段判断用户的终端是否在线然后再进行推送。When the target user makes a login or registration request, the area information of the target user and the terminal information of the target user will be obtained. First, the area information of the target user is stored in the user area information table, the specific information is as described in Table 1, and the user area information table is stored in the master database. Among them, the ID field refers to the identity number of the target user. Each user has a unique ID number to identify the user; the USER_REGION field is used to identify the region where the target user is located. The USER_REGION field is not fixed. For the first time, it is based on the registration address of the target user, that is, the COUNTRY field in the user region information table, which represents the country selected by the user when registering, and initializes the USER_REGION field according to the country selected by the user when registering. For example, when the country is China, the corresponding region is A Region. When the country is the United States, the corresponding region is Region B. When the country is the Philippines, the corresponding region is also Region A. The specific correspondence between countries and regions is set in advance; secondly, according to the target users The logged-in IP address updates the area information of the target user. For example, when the target user logs in for the first time, the IP address corresponds to area A. When the target user logs in for the second time, the target user goes to another Country, the region corresponding to the country is region B. At this time, it is necessary to update the USER_REGION field to region B and store it according to the IP address of the target user when logging in for the second time. Secondly, according to the USER_REGION field in the target user's region information table, the region where the target user is located can be determined, and the user partition service is called to route to the corresponding regional service according to the region where the target user is located, and the regional service is used to transfer the The terminal information of the target user is stored in the regional database of the corresponding region, the terminal information of the target user is stored in the user terminal information table, the specific information is as described in Table 2, the user terminal information table is stored in the regional database of the corresponding region, Wherein, the ID field in the user area information table is associated with the USER_ID field in the user terminal information table for query. Because the target user may use multiple different terminals to log in in a certain area, there may be multiple user terminal information records of the user in the user terminal information table, and further judge according to the IS_ONLINE field in the user terminal information table Whether the user's terminal is online and then push.

表一用户区域信息表Table 1 User area information table

ID:用户idID: user idUSERNAME:用户名USERNAME: usernamePHONE:手机号PHONE: mobile phone numberEMAIL:邮箱EMAIL: EmailPASSWORD:密码PASSWORD: passwordUSER_REGION:用户区域USER_REGION: user regionCREATE_TIME:创建时间CREATE_TIME: creation timeUPDATE_TIME:更新时间UPDATE_TIME: Update timeCOUNTRY:国家COUNTRY: Country

表二用户终端信息表Table 2 User terminal information table

ID:IDID: IDUSER_ID:用户idUSER_ID: user idCLIENT_PUSH_ID:app的推送idCLIENT_PUSH_ID: the push id of the appCLIENT_TYPE:客户端类型,如ios,androidCLIENT_TYPE: client type, such as ios, androidIS_SUBSCRIBED:勿扰模式,1-勿扰关闭,0-勿扰开启IS_SUBSCRIBED: do not disturb mode, 1-do not disturb off, 0-do not disturb onIS_ONLINE:用户是否在线,1-在线,0-离线IS_ONLINE: Whether the user is online, 1-online, 0-offlineCLIENT_VERSION:app的客户端版本号CLIENT_VERSION: app client version numberCLIENT_PROTOCOL_VERSION:app的协议版本号CLIENT_PROTOCOL_VERSION: The protocol version number of the appTERMINAL_ID:app终端idTERMINAL_ID: app terminal idRECEIVE_TIME:消息接收时间段RECEIVE_TIME: message receiving time periodZONE_OFFSET:时区偏移量ZONE_OFFSET: time zone offsetLANGUAGE:语言LANGUAGE: languageINSERT_TIME:创建时间INSERT_TIME: creation timeUPDATE_TIME:更新时间UPDATE_TIME: Update time

本实施例,通过根据所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中,不同于将目标用户的终端信息全部存储在一个主库,大大降低了数据存储的压力,提高了数据读取效率。当对推送消息进行推送时,直接读取对应区域库中的目标用户的终端信息,相比之前将目标用户的终端信息全部存储在一个主库中,需要将目标用户的终端信息从主库同步到对应的区域库,有时会导致对应的区域库中的目标用户的终端信息同步延迟,本实施例解决了目标用户跨区域同步数据的延迟问题,极大地提升了用户体验。In this embodiment, according to the area information of the target user, the terminal information of the target user is stored in the area database of the corresponding area, which is different from storing all the terminal information of the target user in one main database, which greatly reduces the data The pressure of storage improves the efficiency of data reading. When pushing a push message, directly read the terminal information of the target user in the corresponding regional library. Compared with storing all the terminal information of the target user in a main library before, it is necessary to synchronize the terminal information of the target user from the main library. To the corresponding regional database, sometimes the terminal information synchronization delay of the target user in the corresponding regional database will be delayed. This embodiment solves the delay problem of the target user's cross-regional data synchronization, which greatly improves the user experience.

本实施例提供了一种消息转发系统,如图6所示,该系统包括:This embodiment provides a message forwarding system, as shown in Figure 6, the system includes:

获取模块610,用于基于推送消息的配置信息,获取目标用户的区域信息;An acquisition module 610, configured to acquire the area information of the target user based on the configuration information of the push message;

确定模块620,用于基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;A determination module 620, configured to determine whether the push message needs to be forwarded based on the area information of the target user;

转发模块630,用于在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。The forwarding module 630 is configured to forward the push message to a second area server in the corresponding area when forwarding is required; the second area server is configured to forward the push message according to the terminal information of the target user Push to the corresponding terminal.

通过本实施例提供的系统,通过基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。解决了相关技术中当用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题,实现了用户终端能够准确地接收到推送消息。Through the system provided by this embodiment, the area information of the target user is obtained through the configuration information based on the push message; based on the area information of the target user, it is determined whether the push message needs to be forwarded; if forwarding is required, Forwarding the push message to a second area server in a corresponding area; the second area server is configured to push the push message to a corresponding terminal according to the terminal information of the target user. It solves the problem in the related art that when the area where the user terminal is located is not in the same area as the area where the push message is released, the user terminal will fail to receive the push message, and the user terminal can accurately receive the push message.

所述获取模块610,还用于根据目标用户的注册地址,初始化所述目标用户的区域信息;根据所述目标用户登录的IP地址,更新所述目标用户的区域信息。The obtaining module 610 is further configured to initialize the area information of the target user according to the registration address of the target user; and update the area information of the target user according to the registered IP address of the target user.

所述获取模块610,还用于基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;基于所述目标用户,获取所述目标用户的区域信息。The acquisition module 610 is further configured to determine whether the registration address of the target user is within the push range based on the push range in the configuration information and the target user's registration address; If the address is within the push range, the target user is determined; based on the target user, area information of the target user is acquired.

所述确定模块620,还用于获取所述推送消息发布的区域;判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;若是,则不对所述推送消息进行转发;若否,则对所述推送消息进行转发。The determination module 620 is also used to obtain the area where the push message is released; judge whether the area where the push message is released is consistent with the area information of the target user; if yes, do not forward the push message; if not , then forward the push message.

所述转发模块630,还用于基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。The forwarding module 630 is further configured to obtain at least one terminal information of the target user in the corresponding area based on the area information of the target user and the ID of the target user; based on at least one terminal information of the target user in the corresponding area terminal information, determining the online terminal information of the target user in the corresponding area; and pushing the push message to the corresponding terminal according to the online terminal information of the target user in the corresponding area.

在其中一个实施例中,如图7所示,所述系统还包括:In one of the embodiments, as shown in Figure 7, the system further includes:

存储模块640,用于基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。The storage module 640 is configured to store the terminal information of the target user in an area database of the corresponding area based on the area information of the target user.

需要说明的是,上述各个模块可以是功能模块也可以是程序模块,既可以通过软件来实现,也可以通过硬件来实现。对于通过硬件来实现的模块而言,上述各个模块可以位于同一处理器中;或者上述各个模块还可以按照任意组合的形式分别位于不同的处理器中。It should be noted that each of the above-mentioned modules may be a function module or a program module, and may be realized by software or by hardware. For the modules implemented by hardware, the above modules may be located in the same processor; or the above modules may be located in different processors in any combination.

本实施例提供了一种消息推送方法,应用于第二区域服务器,如图8所示,该方法包括以下步骤:This embodiment provides a message push method, which is applied to the second area server. As shown in FIG. 8, the method includes the following steps:

步骤S701,接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;Step S701, receiving the push message forwarded by the first area server, the first area server is used to obtain the area information of the target user based on the configuration information of the push message; based on the area information of the target user, determine whether it is necessary to Forward the above push message;

步骤S702,根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。Step S702, according to the terminal information of the target user, push the push message to the corresponding terminal.

本实施例,通过接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;然后根据所述目标用户的终端信息,将所述推送消息推送至对应的终端,解决了相关技术中当用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题,实现了用户终端能够准确地接收到推送消息。In this embodiment, by receiving the push message forwarded by the first area server, the first area server is used to obtain the area information of the target user based on the configuration information of the push message; Forwarding the push message; and then pushing the push message to the corresponding terminal according to the terminal information of the target user, which solves the problem in related technologies when the area where the user terminal is located and the area where the push message is released are not in the same area , it will lead to the problem that the user terminal fails to receive the push message, so that the user terminal can accurately receive the push message.

在其中一个实施例中,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息之前包括:根据目标用户的注册地址,初始化所述目标用户的区域信息;据所述目标用户登录的IP地址,更新所述目标用户的区域信息。In one of the embodiments, before the first area server is used to obtain the area information of the target user based on the configuration information of the push message, the process includes: initializing the area information of the target user according to the registration address of the target user; according to the The IP address of the target user to log in, and the area information of the target user is updated.

在其中一个实施例中,所述基于推送消息的配置信息,获取目标用户的区域信息包括:基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;基于所述目标用户,获取所述目标用户的区域信息。In one of the embodiments, the acquiring the area information of the target user based on the configuration information of the push message includes: judging the registration address of the target user based on the push range in the configuration information and the registration address of the target user Whether it is within the push range; if the registered address of the target user is within the push range, determine the target user; based on the target user, acquire area information of the target user.

在其中一个实施例中,所述基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发包括:获取所述推送消息发布的区域;判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;若是,则不对所述推送消息进行转发;若否,则对所述推送消息进行转发。In one embodiment, the determining whether the push message needs to be forwarded based on the area information of the target user includes: obtaining the area where the push message is published; Whether the area information of the target user is consistent; if yes, the push message is not forwarded; if not, the push message is forwarded.

在其中一个实施例中,所述根据所述目标用户的终端信息,将所述推送消息推送至对应的终端包括:基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。In one of the embodiments, the pushing the push message to the corresponding terminal according to the terminal information of the target user includes: acquiring the target user based on the area information of the target user and the ID of the target user At least one terminal information of the user in the corresponding area; based on the at least one terminal information of the target user in the corresponding area, determine the online terminal information of the target user in the corresponding area; according to the online terminal information of the target user in the corresponding area, Pushing the push message to a corresponding terminal.

在其中一个实施例中,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发还包括:基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。In one of the embodiments, the first area server is configured to obtain the area information of the target user based on the configuration information of the push message; based on the area information of the target user, determining whether to forward the push message further includes : based on the area information of the target user, storing the terminal information of the target user in an area database of a corresponding area.

本实施例提供了一种消息推送系统,如图9所示,该系统包括:This embodiment provides a message push system, as shown in Figure 9, the system includes:

接收模块810,用于接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;The receiving module 810 is configured to receive the push message forwarded by the first area server, and the first area server is used to obtain the area information of the target user based on the configuration information of the push message; determine whether to The push message needs to be forwarded;

推送模块820,用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。The push module 820 is configured to push the push message to a corresponding terminal according to the terminal information of the target user.

所述第一区域服务器具体用于根据目标用户的注册地址,初始化所述目标用户的区域信息;根据所述目标用户登录的IP地址,更新所述目标用户的区域信息。The first area server is specifically configured to initialize the area information of the target user according to the registration address of the target user; and update the area information of the target user according to the IP address logged in by the target user.

所述第一区域服务器具体用于基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;基于所述目标用户,获取所述目标用户的区域信息。The first area server is specifically configured to determine whether the registration address of the target user is within the push range based on the push range in the configuration information and the registration address of the target user; If the address is within the push range, the target user is determined; based on the target user, area information of the target user is acquired.

所述第一区域服务器具体用于获取所述推送消息发布的区域;判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;若是,则不对所述推送消息进行转发;若否,则对所述推送消息进行转发。The first area server is specifically used to obtain the area where the push message is released; determine whether the area where the push message is released is consistent with the area information of the target user; if yes, do not forward the push message; if not , then forward the push message.

所述第一区域服务器具体用于基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。The first area server is specifically configured to acquire at least one terminal information of the target user in the corresponding area based on the area information of the target user and the ID of the target user; based on at least one terminal information of the target user in the corresponding area terminal information, determining the online terminal information of the target user in the corresponding area; and pushing the push message to the corresponding terminal according to the online terminal information of the target user in the corresponding area.

所述第一区域服务器具体用于基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。The first area server is specifically configured to store the terminal information of the target user in an area database of a corresponding area based on the area information of the target user.

本实施例,通过接收第一区域服务器所转发的推送消息,然后根据所述目标用户的终端信息,将所述推送消息推送至对应的终端,解决了相关技术中当用户终端所处的区域与推送消息发布的区域不在一个地区,就会导致用户终端接收推送消息失败的问题,实现了用户终端能够准确地接收到推送消息。In this embodiment, by receiving the push message forwarded by the first area server, and then pushing the push message to the corresponding terminal according to the terminal information of the target user, it solves the problem of the difference between the area where the user terminal is located in the related art. The area where the push message is released is not in the same area, which will cause the problem that the user terminal fails to receive the push message, so that the user terminal can accurately receive the push message.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一项消息推送方法或消息转发方法实施例中的步骤。In one embodiment, 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 steps in any one of the foregoing message pushing method or message forwarding method embodiments are implemented.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile memory and volatile memory. The non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, and the like. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (10)

Translated fromChinese
1.一种消息转发方法,应用于第一区域服务器,其特征在于,所述方法包括:1. A message forwarding method applied to the first area server, characterized in that the method comprises:基于推送消息的配置信息,获取目标用户的区域信息;Obtain the area information of the target user based on the configuration information of the push message;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;Based on the area information of the target user, determine whether the push message needs to be forwarded;在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。If forwarding is required, the push message is forwarded to a second area server in a corresponding area; the second area server is configured to push the push message to a corresponding terminal according to the terminal information of the target user.2.根据权利要求1所述的消息转发方法,其特征在于,所述基于推送消息的配置信息,获取目标用户的区域信息之前包括:2. The message forwarding method according to claim 1, wherein the configuration information based on the push message includes before obtaining the area information of the target user:根据目标用户的注册地址,初始化所述目标用户的区域信息;According to the registered address of the target user, initialize the area information of the target user;根据所述目标用户登录的IP地址,更新所述目标用户的区域信息。The area information of the target user is updated according to the IP address logged in by the target user.3.根据权利要求2所述的消息转发方法,其特征在于,所述基于推送消息的配置信息,获取目标用户的区域信息包括:3. The message forwarding method according to claim 2, wherein said obtaining the area information of the target user based on the configuration information of the push message comprises:基于所述配置信息中的推送范围以及所述目标用户的注册地址,判断所述目标用户的注册地址是否在所述推送范围内;Based on the pushing range in the configuration information and the registration address of the target user, determine whether the registration address of the target user is within the pushing range;在所述目标用户的注册地址在所述推送范围内的情况下,确定所述目标用户;When the registered address of the target user is within the pushing range, determine the target user;基于所述目标用户,获取所述目标用户的区域信息。Based on the target user, area information of the target user is acquired.4.根据权利要求1所述的消息转发方法,其特征在于,所述基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发包括:4. The message forwarding method according to claim 1, wherein the determining whether to forward the push message based on the area information of the target user comprises:获取所述推送消息发布的区域;Obtain the area where the push message is released;判断所述推送消息发布的区域与所述目标用户的区域信息是否一致;judging whether the area where the push message is released is consistent with the area information of the target user;若是,则不对所述推送消息进行转发;If so, the push message is not forwarded;若否,则对所述推送消息进行转发。If not, the push message is forwarded.5.根据权利要求1所述的消息转发方法,其特征在于,所述根据所述目标用户的终端信息,将所述推送消息推送至对应的终端包括:5. The message forwarding method according to claim 1, wherein, according to the terminal information of the target user, pushing the push message to the corresponding terminal comprises:基于所述目标用户的区域信息以及所述目标用户的ID,获取所述目标用户在对应区域的至少一个终端信息;Acquiring at least one terminal information of the target user in the corresponding area based on the area information of the target user and the ID of the target user;基于所述目标用户在对应区域的至少一个终端信息,确定所述目标用户在对应区域的在线终端信息;determining online terminal information of the target user in the corresponding area based on at least one terminal information of the target user in the corresponding area;根据所述目标用户在对应区域的在线终端信息,将所述推送消息推送至对应的终端。Pushing the push message to the corresponding terminal according to the online terminal information of the target user in the corresponding area.6.根据权利要求1~5任一项所述的消息转发方法,其特征在于,所述方法还包括:6. The message forwarding method according to any one of claims 1-5, characterized in that the method further comprises:基于所述目标用户的区域信息,将所述目标用户的终端信息存储在对应区域的区域数据库中。Based on the area information of the target user, the terminal information of the target user is stored in an area database of the corresponding area.7.一种消息转发系统,应用于第一区域服务器,其特征在于,所述系统包括:7. A message forwarding system applied to a first area server, characterized in that the system comprises:获取模块,用于基于推送消息的配置信息,获取目标用户的区域信息;An acquisition module, configured to acquire the area information of the target user based on the configuration information of the push message;确定模块,用于基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;A determining module, configured to determine whether the push message needs to be forwarded based on the area information of the target user;转发模块,用于在需要转发的情况下,将所述推送消息转发至对应区域的第二区域服务器;所述第二区域服务器用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。A forwarding module, configured to forward the push message to a second area server in the corresponding area when forwarding is required; the second area server is configured to push the push message according to the terminal information of the target user to the corresponding terminal.8.一种消息推送方法,应用于第二区域服务器,其特征在于,所述方法包括:8. A message push method, applied to the second area server, characterized in that the method comprises:接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;receiving the push message forwarded by the first area server, the first area server being used to obtain the area information of the target user based on the configuration information of the push message; and determining whether to update the push message based on the area information of the target user to forward;根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。Pushing the push message to a corresponding terminal according to the terminal information of the target user.9.一种消息推送系统,应用于第二区域服务器,其特征在于,所述系统包括:9. A message push system applied to the second area server, characterized in that the system includes:接收模块,用于接收第一区域服务器所转发的推送消息,所述第一区域服务器用于基于推送消息的配置信息,获取目标用户的区域信息;基于所述目标用户的区域信息,确定是否需要对所述推送消息进行转发;The receiving module is configured to receive the push message forwarded by the first area server, the first area server is used to obtain the area information of the target user based on the configuration information of the push message; based on the area information of the target user, determine whether to Forwarding the push message;推送模块,用于根据所述目标用户的终端信息,将所述推送消息推送至对应的终端。A push module, configured to push the push message to a corresponding terminal according to the terminal information of the target user.10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6中任一项或权利要求8所述的方法。10. A computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 or claim 8 is implemented.
CN202310360568.3A2023-04-032023-04-03 A message forwarding method, message pushing method and systemPendingCN116567066A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310360568.3ACN116567066A (en)2023-04-032023-04-03 A message forwarding method, message pushing method and system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310360568.3ACN116567066A (en)2023-04-032023-04-03 A message forwarding method, message pushing method and system

Publications (1)

Publication NumberPublication Date
CN116567066Atrue CN116567066A (en)2023-08-08

Family

ID=87486984

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310360568.3APendingCN116567066A (en)2023-04-032023-04-03 A message forwarding method, message pushing method and system

Country Status (1)

CountryLink
CN (1)CN116567066A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106549857A (en)*2016-11-302017-03-29济南中维世纪科技有限公司A kind of method and system of trans-regional PUSH message
CN107105066A (en)*2017-07-092017-08-29孝感市青谷信息科技有限公司A kind of information push method based on user profile
CN107733787A (en)*2017-11-062018-02-23世纪禾光科技发展(北京)有限公司Method and system for cross-border instant messaging
KR20180090626A (en)*2017-02-032018-08-13주식회사 엘지유플러스Method for providing push service, service server, and user terminal
CN110300050A (en)*2019-05-232019-10-01中国平安人寿保险股份有限公司Information push method, device, computer equipment and storage medium
CN110517493A (en)*2019-08-302019-11-29公安部交通管理科学研究所 A method and system for obtaining comprehensive information on cross-regional motor vehicles
CN114238600A (en)*2021-12-102022-03-25零犀(北京)科技有限公司Message pushing method and device based on man-machine conversation
CN114531481A (en)*2020-11-032022-05-24湖南微步信息科技有限责任公司Message pushing method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106549857A (en)*2016-11-302017-03-29济南中维世纪科技有限公司A kind of method and system of trans-regional PUSH message
KR20180090626A (en)*2017-02-032018-08-13주식회사 엘지유플러스Method for providing push service, service server, and user terminal
CN107105066A (en)*2017-07-092017-08-29孝感市青谷信息科技有限公司A kind of information push method based on user profile
CN107733787A (en)*2017-11-062018-02-23世纪禾光科技发展(北京)有限公司Method and system for cross-border instant messaging
CN110300050A (en)*2019-05-232019-10-01中国平安人寿保险股份有限公司Information push method, device, computer equipment and storage medium
CN110517493A (en)*2019-08-302019-11-29公安部交通管理科学研究所 A method and system for obtaining comprehensive information on cross-regional motor vehicles
CN114531481A (en)*2020-11-032022-05-24湖南微步信息科技有限责任公司Message pushing method and system
CN114238600A (en)*2021-12-102022-03-25零犀(北京)科技有限公司Message pushing method and device based on man-machine conversation

Similar Documents

PublicationPublication DateTitle
CN110321387B (en)Data synchronization method, equipment and terminal equipment
CN111930780B (en)Data query method and system
CN109688235B (en) Virtual network service processing method, device and system, controller, storage medium
US8103915B2 (en)Failure system for domain name system client
CN110071978B (en)Cluster management method and device
CN110445886B (en)Method and system for realizing domain name access acceleration
CN110532123B (en)Fault transfer method and device of HBase system
US20140059315A1 (en)Computer system, data management method and data management program
CN111064786B (en)Account identifier management method and device
CN112636992B (en)Dynamic routing method, device, equipment and storage medium
CN112866408B (en)Service switching method, device, equipment and storage medium in cluster
US20240106793A1 (en)Traffic scheduling method, apparatus and system, terminal device and readable storage medium
WO2021051747A1 (en)Data update method, system and device, electronic device, and computer storage medium
CN111327651A (en) Resource downloading method, device, edge node and storage medium
CN110781149A (en)Method, device, equipment and storage medium for managing live broadcast room information
CN114745413A (en) Access control method, device, computer equipment and storage medium for server
CN112749172A (en)Data synchronization method and system between cache and database
CN111355600A (en)Method and device for determining main node
US20160044494A1 (en)Determining network connection structure of target area
CN111182014A (en)Data synchronization method and device
CN111355765A (en)Network request processing and sending method and device
CN111400327B (en)Data synchronization method and device, electronic equipment and storage medium
CN116567066A (en) A message forwarding method, message pushing method and system
WO2024066503A1 (en)Service invocation method and apparatus
CN114528266B (en) Methods, systems, devices and storage media for achieving database and cache consistency

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp