Movatterモバイル変換


[0]ホーム

URL:


CN106550021A - Method and device for pushing message - Google Patents

Method and device for pushing message
Download PDF

Info

Publication number
CN106550021A
CN106550021ACN201610913507.5ACN201610913507ACN106550021ACN 106550021 ACN106550021 ACN 106550021ACN 201610913507 ACN201610913507 ACN 201610913507ACN 106550021 ACN106550021 ACN 106550021A
Authority
CN
China
Prior art keywords
push message
application
push
sent
turned
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.)
Granted
Application number
CN201610913507.5A
Other languages
Chinese (zh)
Other versions
CN106550021B (en
Inventor
周璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610913507.5ApriorityCriticalpatent/CN106550021B/en
Publication of CN106550021ApublicationCriticalpatent/CN106550021A/en
Application grantedgrantedCritical
Publication of CN106550021BpublicationCriticalpatent/CN106550021B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例公开了一种推送消息的推送方法,包括:加载预定义的后台常驻的推送消息管理进程;获取已启动的一个或一个以上的应用对应的应用进程;通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。此外,本发明实施例还公开了一种推送消息的推送装置。采用本发明实施例,可提高各个应用的推送消息的推送成功率。

The embodiment of the present invention discloses a method for pushing a push message, including: loading a predefined push message management process that is resident in the background; obtaining application processes corresponding to one or more applications that have been started; receiving push messages sent by application servers corresponding to the one or more applications through the push message management process; sending the push message to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process corresponding to the application processes the received push message. In addition, the embodiment of the present invention also discloses a push message pushing device. By adopting the embodiment of the present invention, the push success rate of push messages of each application can be improved.

Description

Translated fromChinese
推送消息的推送方法及装置Method and device for pushing message

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种推送消息的推送方法及装置。The present invention relates to the field of computer technology, in particular to a method and device for pushing messages.

背景技术Background technique

随着移动通信技术的法阵和终端技术的不断发展,在手机上集成的功能越来越多,手机已经不仅仅是传统意义上的用来发短信和打电话的通信终端了,而逐步发展成了用户的个人信息业务终端。With the continuous development of mobile communication technology and terminal technology, more and more functions are integrated on the mobile phone. The mobile phone is not only a communication terminal for sending text messages and making calls in the traditional sense, but gradually It becomes the user's personal information service terminal.

用户可以在终端上安装各种应用程序,例如聊天软件、游戏软件、支付软件等等,这些软件或应用均可以通过终端即时的接收网络侧发送的应用消息,即接收对应的应用服务器发送的消息推送,例如,新邮件消息通知、新QQ消息通知等等。Users can install various applications on the terminal, such as chat software, game software, payment software, etc. These software or applications can instantly receive application messages sent by the network side through the terminal, that is, receive messages sent by the corresponding application server Push, for example, new email message notification, new QQ message notification and so on.

在相关的技术方案中,为了实现每一个应用的消息的推送,在每一个应用中都内置了一个push服务,在终端中安装的客户端接收到应用服务器发送的推送消息时,启动该应用中内置的push服务进程,并通过该push服务进程来向终端发送推送消息并在终端上预设的推送消息展示区域进行展示。若某一个应用对应的push服务进程因为某一种原因被注销,就可能造成该应用所对应的推送消息不能成功推送或不能及时进行推送。In a related technical solution, in order to realize the message push of each application, a push service is built in each application. When the client installed in the terminal receives the push message sent by the application server, it starts the application A built-in push service process, through which push messages are sent to the terminal and displayed in the preset push message display area on the terminal. If the push service process corresponding to a certain application is canceled for some reason, it may cause that the push message corresponding to the application cannot be successfully pushed or cannot be pushed in time.

发明内容Contents of the invention

本发明实施例提出了一种推送消息的推送方法,可以解决因为推送消息的推送存在的容易出现漏推送从而导致的推送消息的推送的完整性不足的技术问题。The embodiment of the present invention proposes a method for pushing a push message, which can solve the technical problem of insufficient integrity of the push message due to the possibility of missing push in the push of the push message.

一种推送消息的推送方法,包括:A method for pushing messages, comprising:

加载预定义的后台常驻的推送消息管理进程;Load the predefined background resident push message management process;

获取已启动的一个或一个以上的应用对应的应用进程;Obtain the application process corresponding to one or more applications that have been started;

通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;receiving, through the push message management process, the push messages issued by the respective application servers corresponding to the one or more applications;

通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。The push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process corresponding to the application processes the received push message.

在其中一个实施例中,所述通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息还包括:In one of the embodiments, the receiving the push message sent by the application server corresponding to the one or more applications through the push message management process further includes:

通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。The application server corresponding to the one or more applications is periodically queried through the push message management process, and the application server is configured to deliver the push message when there is a push message.

在其中一个实施例中,所述通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器还包括:In one of the embodiments, the regularly querying the application server corresponding to the one or more applications through the push message management process further includes:

确定所述已启动的一个或一个以上的应用的优先级;determining the priority of the launched one or more applications;

根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;determining the query period of the one or more started applications during polling according to the priority;

按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。According to the inquiry period corresponding to each application, the application server corresponding to the application is inquired through the push message management process.

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

根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;Determine the push message sending interval corresponding to the one or more started applications according to the priority;

根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。According to the push message sending interval corresponding to each application, the push message corresponding to the application is regularly sent to the application process corresponding to the application through the push message management process.

在其中一个实施例中,所述通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程还包括:In one of the embodiments, the sending the push message to the application process corresponding to the application corresponding to the push message through the push message management process further includes:

若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。If the push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process is not started or has been closed, then the push message is cached, and the push message is stored again in the application process When being started, the buffered push message is sent to the application process through the push message management process.

此外,在本发明实施例中,还提出了一种推送消息的推送装置。In addition, in the embodiment of the present invention, a push device for pushing messages is also proposed.

一种推送消息的推送装置,包括:A push device for pushing messages, comprising:

推送消息管理进程加载模块,用于加载预定义的后台常驻的推送消息管理进程;The push message management process loading module is used to load the predefined background resident push message management process;

已启动应用进程确定模块,用于获取已启动的一个或一个以上的应用对应的应用进程;The started application process determining module is used to obtain the application process corresponding to one or more started applications;

推送消息接收模块,用于通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;A push message receiving module, configured to receive, through the push message management process, the push messages issued by the respective application servers corresponding to the one or more applications;

推送消息下发模块,用于通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。The push message sending module is configured to send the push message to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process corresponding to the application processes the received push message.

在其中一个实施例中,所述推送消息接收模块还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。In one of the embodiments, the push message receiving module is further configured to regularly query the application server corresponding to the one or more applications through the push message management process, and the application server is used to send the push message to the The push message is delivered.

在其中一个实施例中,所述推送消息接收模块还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。In one of the embodiments, the push message receiving module is also used to determine the priority of the one or more applications that have been started; Inquiry period during polling: according to the inquiry period corresponding to each application, the application server corresponding to the application is inquired through the push message management process.

在其中一个实施例中,所述推送消息下发模块还用于根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。In one of the embodiments, the push message sending module is also used to determine the push message sending interval corresponding to the one or more applications that have been started according to the priority; The push message sending interval is to periodically send the push message corresponding to the application to the application process corresponding to the application through the push message management process.

在其中一个实施例中,所述推送消息下发模块还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。In one of the embodiments, the push message sending module is further configured to: if the push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, the application process does not If activated or closed, the push message is cached, and when the application process is started again, the cached push message is sent to the application process through the push message management process.

采用了上述推送消息的推送方法和装置之后,对终端中接收推送消息的应用来讲,将所有的应用程序对应的相应的推送消息的接收以及推送由终端中定义的推送消息管理进程来完成,即由推送消息管理进程接收各个应用服务器下发的推送消息,并且,将接收到的推送消息下发给各个应用进程进行处理。相较于传统技术中由各个应用内置的推送服务进程分别处理本应用的推送消息的方案,由于推送消息的所有操作均是由同一的推送消息管理进程来完成的,避免了单个应用分别处理的情况下容易出现的推送服务进程加载失败或者被其他进程关闭的现象、以及导致的推送消息被漏推送或者推送不及时的现象,提高了推送消息在推送过程中的完整性和时效性,提高了用户体验。进一步的,因为所有的应用的推送消息可以由同一个进程来完成,减少了在终端中运行的进程数量,减少了对终端资源的占用,提高了资源利用率。After adopting the push method and device of the above push message, for the application receiving the push message in the terminal, the receiving and pushing of the corresponding push message corresponding to all the application programs are completed by the push message management process defined in the terminal, That is, the push message management process receives the push messages sent by each application server, and sends the received push messages to each application process for processing. Compared with the solution in the traditional technology that each application's built-in push service process handles the push messages of this application separately, since all the operations of the push message are completed by the same push message management process, it avoids the need for separate processing by a single application. Under normal circumstances, the push service process may fail to load or be closed by other processes, and the resulting push messages may be missed or not pushed in time, which improves the integrity and timeliness of push messages in the push process, and improves the user experience. Furthermore, because the push messages of all applications can be completed by the same process, the number of processes running in the terminal is reduced, the occupation of terminal resources is reduced, and the resource utilization rate is improved.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

其中:in:

图1为一个实施例中一种推送消息的推送方法的流程示意图;Fig. 1 is a schematic flow chart of a method for pushing a push message in an embodiment;

图2为一个实施例中一种推送消息的推送装置的结构示意图;FIG. 2 is a schematic structural diagram of a push device for pushing messages in an embodiment;

图3为一个实施例中运行前述推送消息的推送方法的计算机设备的结构示意图。Fig. 3 is a schematic structural diagram of a computer device running the aforementioned method for pushing messages in one embodiment.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

在相关技术的推送消息的推送过程中,每一个推送消息的推送均需要启动相应的应用中内置的push服务进程,也就是说,在终端中需要开启多个push服务进程,并且,每一个push服务进程负责一个相应的应用的推送消息的推送。发明人经研究发现,在上述推送消息的推送过程中,因为每一个推送消息的推送均需要启动相应的应用中内置的push服务进程,容易导致某一个应用对应的推送消息容易出现推送不成功而被漏掉的情况,用户可能不能及时接收到相应的推送消息,若刚好该推送消息是比较重要的消息,则可能对用户造成较大的影响,即存在容易出现漏推送导致了推送消息的推送存在不及时和不完整的现象。In the push process of the push message in the related art, the push of each push message needs to start the push service process built in the corresponding application, that is to say, multiple push service processes need to be started in the terminal, and each push The service process is responsible for pushing the push message of a corresponding application. The inventor found through research that, in the push process of the above-mentioned push messages, since the push of each push message needs to start the push service process built in the corresponding application, it is easy to cause the push message corresponding to a certain application to be pushed unsuccessfully. In the case of being missed, the user may not be able to receive the corresponding push message in time. If the push message happens to be a relatively important message, it may have a greater impact on the user, that is, there are prone to missed pushes that lead to the push of the push message There are untimely and incomplete phenomena.

在基于上述相关技术方案容易出现漏推送导致了推送消息的推送存在不及时和不完整的现象的基础上,在本实施例中,提出了一种推送消息的推送方法,该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机系统之上,该计算机程序可以是终端中的应用程序对应的推送消息的推送管理程序。该计算机系统可以是运行上述计算机程序的例如智能手机、平板电脑、个人电脑等服务器或终端。On the basis of the above-mentioned related technical solutions, which are prone to missed pushes and cause the push of push messages to be untimely and incomplete, in this embodiment, a push method for push messages is proposed. The implementation of this method can rely on For a computer program, the computer program may run on a computer system based on the von Neumann architecture, and the computer program may be a push message management program corresponding to an application program in the terminal. The computer system may be a server or a terminal such as a smart phone, a tablet computer, or a personal computer running the above-mentioned computer program.

具体的,如图1所示,上述推送消息的推送方法包括如下步骤S102-S108:Specifically, as shown in FIG. 1, the method for pushing the above-mentioned push message includes the following steps S102-S108:

步骤S102:加载预定义的后台常驻的推送消息管理进程。Step S102: Loading a predefined background resident push message management process.

在传统技术中,在智能手机等终端设备上安装的每一个应用在运行时或者后台运行时,都会单独开启一个后台推送进程,用来在对应的应用服务器有推送消息下发时,将接收到的推送消息推送给用户。也就是说,在终端上运行了多个后台推送进程。In traditional technology, each application installed on a terminal device such as a smart phone will open a background push process separately when it is running or running in the background, which is used to receive a push message when the corresponding application server sends a push message. The push message is pushed to the user. That is, there are multiple background push processes running on the terminal.

在本发明中,在终端中定义了一个推送消息管理进程,用来管理所有的应用程序的推送消息的接收、下发及推送,相较于传统技术中的同时运行多个后台推送进程,减少了在后台中运行的进程,减少了对终端内存的占用。In the present invention, a push message management process is defined in the terminal, which is used to manage the receiving, sending and pushing of push messages of all application programs. Compared with the simultaneous operation of multiple background push processes in the traditional technology, the Processes running in the background are eliminated, and the memory usage of the terminal is reduced.

在本实施例中,在终端中预定义有推送消息管理进程,该推送消息管理进程可以与终端中安装的所有的应用进行通信,并且,对每一个应用的推送消息进行接收和下发。需要说明的是,在本实施例中,该推送消息管理进程是在终端开启之后即在后台运行的,也就是说,推送消息管理进程是后台常驻的。In this embodiment, a push message management process is predefined in the terminal, and the push message management process can communicate with all applications installed in the terminal, and receive and deliver push messages of each application. It should be noted that, in this embodiment, the push message management process runs in the background after the terminal is turned on, that is, the push message management process is resident in the background.

步骤S104:获取已启动的一个或一个以上的应用对应的应用进程。Step S104: Obtain application processes corresponding to one or more started applications.

在本实施例中,推送消息管理进程在当前需要进行推送消息的相关操作所对应的应用是当前正在前台或者后台运行的应用进程所对应的应用,或者,是在设置中设置了在当前需要进程推送消息的推送的应用。In this embodiment, the application corresponding to the push message management process that currently needs to perform push message related operations is the application corresponding to the application process that is currently running in the foreground or background, or is set in the settings. The push application that pushes the message.

因此,首先需要确定在终端中已启动的应用所对应的应用进程。Therefore, it is first necessary to determine the application process corresponding to the application started in the terminal.

步骤S106:通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息。Step S106: Receive, through the push message management process, the push messages delivered by the respective application servers corresponding to the one or more applications.

在终端中运行的推送消息管理进程与上述应用之间建立通信关系,并且,每一个应用对应的应用服务器所下发的推送消息,是下发至终端中运行的推送消息管理进程,并由该推送消息管理进程进行推送消息的推送。The push message management process running in the terminal establishes a communication relationship with the above-mentioned applications, and the push message sent by the application server corresponding to each application is sent to the push message management process running in the terminal, and is determined by the push message management process running in the terminal. The push message management process pushes the push message.

具体的,接收应用服务器下发的推送消息的过程,是通过推送消息管理进程向每一个应用对应的应用服务器进行轮询的过程,也就是说,在轮询的过程中,若在应用服务器中存在推送消息,则将该推送消息下发给涂松消息管理进程。Specifically, the process of receiving the push message from the application server is a process of polling the application server corresponding to each application through the push message management process, that is to say, during the polling process, if the application server If there is a push message, the push message is sent to the Tusong message management process.

需要说明的是,在本实施例中,通过推送消息管理进程向应用服务器进行轮询或询问的频率,可以是实时的向应用服务器进行轮询或询问,或者,按照预设的周期或时间间隔,向应用服务器进行轮询或询问。It should be noted that, in this embodiment, the frequency of polling or inquiring the application server through the push message management process may be polling or inquiring to the application server in real time, or according to a preset cycle or time interval , to poll or query the application server.

具体的,所述通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息还包括:通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。Specifically, receiving the push messages issued by the application servers corresponding to the one or more applications through the push message management process further includes: regularly inquiring about the one or more applications through the push message management process An application server corresponding to the application, the application server is configured to deliver the push message when there is a push message.

也就是说,为了避免推送消息管理进程需要不断的向各个应用服务器进行轮询,并且在存在推送消息时不断的向每一个应用进行推送消息的推送,占用终端资源,可以将推送消息管理进程向应用服务器进行轮询的时间设置为定时向各个应用服务进行轮询。That is to say, in order to avoid that the push message management process needs to continuously poll each application server, and continuously push push messages to each application when there are push messages, occupying terminal resources, the push message management process can be sent to The polling time of the application server is set to periodically poll each application service.

进一步的,用户对于不同的应用存在不同的推送消息推送的要求,例如,针对微信、QQ等聊天软件,用户希望实时的接收消息,以免漏掉重要消息或者不能及时接收到相应的推送消息,而例如游戏、视频软件等应用,用户并不希望实时的接收消息,只在设定的时间或者定期接收推送消息即可。在此种情况下,针对所有的应用,均采用实时不断的向每一个应用服务器进行询问并接收下发的推送消息、或者采用同一周期或时间间隔向每一个应用服务器进行询问并接收下发的推送消息,是不符合用户预先的需求,或者,在用户并不急需的应用的推送消息上占用终端的相关资源,是对终端资源的一种浪费。Furthermore, users have different requirements for pushing messages for different applications. For example, for chat software such as WeChat and QQ, users want to receive messages in real time, so as not to miss important messages or fail to receive corresponding push messages in time. For example, in applications such as games and video software, users do not want to receive messages in real time, but only receive push messages at a set time or periodically. In this case, for all applications, use real-time continuous inquiry to each application server and receive the issued push message, or use the same cycle or time interval to inquire each application server and receive the issued push message The push message does not meet the user's prior needs, or occupies relevant resources of the terminal on the push message of the application that the user does not urgently need, which is a waste of terminal resources.

因此,可以根据不同的应用设置不同的询问周期或询问间隔。Therefore, different query cycles or query intervals can be set according to different applications.

具体的,在一个实施例中,所述通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器还包括:确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。Specifically, in one embodiment, the regularly inquiring the application server corresponding to the one or more applications through the push message management process further includes: determining the priority of the one or more started applications ; According to the priority, determine the query cycle of the one or more applications that have been started during polling; according to the query cycle corresponding to each application, query the application corresponding to the push message through the push message management process application server.

也就是说,针对终端中安装的所有的应用程序,均设定其对应的优先级,并且,同一优先级下的应用对用户的中药程度或者推送消息的推送时间的需求是相同的,因此,同一优先级下的应用可以采用同一种推送消息的推送策略。That is to say, for all the applications installed in the terminal, their corresponding priorities are set, and the applications under the same priority have the same requirements for the user's traditional Chinese medicine degree or the push time of the push message. Therefore, Applications under the same priority can adopt the same push strategy for push messages.

对于当前需要进行询问的应用所对应的应用进程,确定对应的优先级,并且根据优先级确定与每一个应用对应的在询问应用程序的过程中进行询问时的询问周期。在每一个应用对应的询问周期确定的情况下,对每一个应用分别进行处理,也就是说,按照每一个应用对应的询问周期,通过推送消息管理进程,分别向与该应用对应的应用服务器进行询问。For the application process corresponding to the application that currently needs to be inquired, the corresponding priority is determined, and the inquiring cycle corresponding to each application is determined in the process of inquiring the application program according to the priority. When the query period corresponding to each application is determined, each application is processed separately, that is, according to the query period corresponding to each application, through the push message management process, the application server corresponding to the application is separately processed ask.

步骤S108:通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。Step S108: Send the push message to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process corresponding to the application processes the received push message.

推送消息管理进程在接收到各个应用服务器下发的推送消息之后,即可将接收到的每一个推送消息下发给与该推送消息对应的应用,应用进程在接收到推送消息管理进程发送的推送消息之后,按照预设的推送消息展示方式展示接收到的推送消息。After the push message management process receives the push message sent by each application server, it can send each received push message to the application corresponding to the push message, and the application process receives the push message sent by the push message management process. After the message, the received push message is displayed according to the preset push message display method.

需要说明的是,并不是所有的推送消息在接收到之后即马上发送给对应的应用进程进行处理,可以根据该推送消息的重要程度来确定具体的发送时间。It should be noted that not all push messages are immediately sent to the corresponding application process for processing after being received, and the specific sending time can be determined according to the importance of the push message.

具体的,在一个可选的实施例中,上述推送消息的推送方法还包括:根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。Specifically, in an optional embodiment, the method for pushing a push message further includes: determining, according to the priority, a push message sending interval corresponding to the one or more applications that have been started; The push message sending interval corresponding to an application is to periodically send the push message corresponding to the application to the application process corresponding to the application through the push message management process.

也就是说,针对每一个应用或者每一个应用优先级,确定相应的推送消息放间隔。在某一个应用对应的推送消息发送间隔确定之后,在推送消息管理进程接收到与该应用对应的推送消息之后,按照该推送消息发送间隔来确定该推送消息的发送时间。例如,对于APP1来讲,在1:00时刻发送了一则推送消息给APP1对应的应用进程,在1:10分接收到APP1对应的应用服务器下发的推送消息,因为与APP1对应的推送消息发送间隔为30min,则该推送消息的发送时间为1:30。从而避免了应用被不停的唤醒来处理推送消息的相关操作,提高了对终端资源的有效利用率。That is to say, for each application or each application priority, the corresponding push message release interval is determined. After the push message sending interval corresponding to a certain application is determined, and after the push message management process receives the push message corresponding to the application, the sending time of the push message is determined according to the push message sending interval. For example, for APP1, a push message is sent to the application process corresponding to APP1 at 1:00, and the push message sent by the application server corresponding to APP1 is received at 1:10, because the push message corresponding to APP1 If the sending interval is 30 minutes, the sending time of the push message is 1:30. Therefore, it is avoided that the application is continuously woken up to process related operations of pushing messages, and the effective utilization rate of terminal resources is improved.

可选的,在一个实施例中,还可能存在下面这种情况,在推送消息管理进程接收到与某一个应用对应的推送消息之后,在将该推送消息下发时,该应用对应的应用进程却已经被关闭,在此种情况下,不能继续完成该推送消息的推送,需要重新启动该应用进程,而应用进程的关闭可能是用户主动的行为美丽如不想接收该应用对应的推送消息,因为,在此种情况下,处理的方式并不是重新启动该应用进程,而是待下一次该应用进程被启动时继续推送该推送消息,既避免了该应用进程被重新启动,也避免了对应的推送消息被漏推送。Optionally, in an embodiment, the following situation may also exist. After the push message management process receives a push message corresponding to a certain application, when the push message is delivered, the application process corresponding to the application However, it has already been closed. In this case, the push of the push message cannot be continued, and the application process needs to be restarted. The closing of the application process may be an active behavior of the user. For example, if you do not want to receive the push message corresponding to the application, because , in this case, the processing method is not to restart the application process, but to continue to push the push message when the application process is started next time, which not only avoids the application process being restarted, but also avoids the corresponding The push message was missed.

具体的,通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程还包括:若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。Specifically, sending the push message to the application process corresponding to the application corresponding to the push message through the push message management process further includes: if sending the push message to the push message corresponding to the push message through the push message management process When the application process corresponding to the application is not started or has been closed, the push message is cached, and when the application process is started again, the cached push message is sent to the application through the push message management process process.

也就是说,在因为某种原因导致推送消息在推送的过程中接收该推送消息的应用进程被关闭而导致推送消息的推送失败的情况下,推送消息管理进程将推送失败的推送消息进行缓存,在下一次该应用进程启动时再将该推送消息发送给该应用进程并由该应用进程进行推送。That is to say, when the application process that receives the push message is shut down during the pushing process of the push message for some reason and the pushing of the push message fails, the push message management process caches the push message that failed to be pushed, When the application process starts next time, the push message is sent to the application process and pushed by the application process.

此外,在一个实施例中,如图3所示,还提出了一种推送消息的推送装置,包括推送消息管理进程加载模块102、已启动应用进程确定模块104、推送消息接收模块106以及推送消息下发模块108,其中:In addition, in one embodiment, as shown in FIG. 3 , a push device for pushing messages is also proposed, including a push message management process loading module 102, a started application process determination module 104, a push message receiving module 106, and a push message receiving module 106. Issue module 108, wherein:

推送消息管理进程加载模块102,用于加载预定义的后台常驻的推送消息管理进程;The push message management process loading module 102 is used to load the predefined background resident push message management process;

已启动应用进程确定模块104,用于获取已启动的一个或一个以上的应用对应的应用进程;The started application process determining module 104 is configured to obtain the application process corresponding to one or more started applications;

推送消息接收模块106,用于通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;A push message receiving module 106, configured to receive, through the push message management process, the push messages issued by the respective application servers corresponding to the one or more applications;

推送消息下发模块108,用于通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。The push message sending module 108 is configured to send the push message to the application process corresponding to the application corresponding to the push message through the push message management process, and the application process corresponding to the application processes the received push message.

可选的,在一个实施例中,推送消息接收模块106还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。Optionally, in one embodiment, the push message receiving module 106 is further configured to regularly query the application server corresponding to the one or more applications through the push message management process, and the application server is used to When the push message is delivered.

可选的,在一个实施例中,推送消息接收模块106还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。Optionally, in one embodiment, the push message receiving module 106 is also configured to determine the priority of the one or more applications that have been started; determine the one or more applications that have been started according to the priority The inquiry period of the application during polling: according to the inquiry period corresponding to each application, the application server corresponding to the application is inquired through the push message management process.

可选的,在一个实施例中,推送消息下发模块108还用于根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。Optionally, in one embodiment, the push message sending module 108 is also used to determine the push message sending interval corresponding to the one or more applications that have been started according to the priority; For the corresponding push message sending interval, the push message corresponding to the application is regularly sent to the application process corresponding to the application through the push message management process.

可选的,在一个实施例中,推送消息下发模块108还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。Optionally, in one embodiment, the push message sending module 108 is also configured to: if the push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, the application If the process is not started or has been closed, the push message is cached, and when the application process is started again, the cached push message is sent to the application process through the push message management process.

采用了上述推送消息的推送方法和装置之后,对终端中接收推送消息的应用来讲,将所有的应用程序对应的相应的推送消息的接收以及推送由终端中定义的推送消息管理进程来完成,即由推送消息管理进程接收各个应用服务器下发的推送消息,并且,将接收到的推送消息下发给各个应用进程进行处理。相较于传统技术中由各个应用内置的推送服务进程分别处理本应用的推送消息的方案,由于推送消息的所有操作均是由同一的推送消息管理进程来完成的,避免了单个应用分别处理的情况下容易出现的推送服务进程加载失败或者被其他进程关闭的现象、以及导致的推送消息被漏推送或者推送不及时的现象,提高了推送消息在推送过程中的完整性和时效性,提高了用户体验。进一步的,因为所有的应用的推送消息可以由同一个进程来完成,减少了在终端中运行的进程数量,减少了对终端资源的占用,提高了资源利用率。After adopting the push method and device of the above push message, for the application receiving the push message in the terminal, the receiving and pushing of the corresponding push message corresponding to all the application programs are completed by the push message management process defined in the terminal, That is, the push message management process receives the push messages sent by each application server, and sends the received push messages to each application process for processing. Compared with the solution in the traditional technology that each application's built-in push service process handles the push messages of this application separately, since all the operations of the push message are completed by the same push message management process, it avoids the need for separate processing by a single application. Under normal circumstances, the push service process may fail to load or be closed by other processes, and the resulting push messages may be missed or not pushed in time, which improves the integrity and timeliness of push messages in the push process, and improves the user experience. Furthermore, because the push messages of all applications can be completed by the same process, the number of processes running in the terminal is reduced, the occupation of terminal resources is reduced, and the resource utilization rate is improved.

在一个实施例中,如图3所示,图3展示了一种运行上述推送消息的推送方法的基于冯诺依曼体系的计算机系统的终端。该计算机系统可以是智能手机、平板电脑、掌上电脑等终端设备。具体的,可包括通过系统总线连接的外部输入接口1001、处理器1002、存储器1003和输出接口1004。其中,外部输入接口1001可选的可至少包括网络接口10012。存储器1003可包括外存储器10032(例如硬盘、光盘或软盘等)和内存储器10034。输出接口1004可至少包括显示屏10042等设备。In one embodiment, as shown in FIG. 3 , FIG. 3 shows a terminal of a computer system based on the von Neumann system running the above method for pushing messages. The computer system may be a terminal device such as a smart phone, a tablet computer, or a handheld computer. Specifically, it may include an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected through a system bus. Wherein, the external input interface 1001 may optionally include at least a network interface 10012 . The memory 1003 may include an external memory 10032 (such as a hard disk, an optical disk, or a floppy disk, etc.) and an internal memory 10034 . The output interface 1004 may at least include devices such as a display screen 10042 .

在本实施例中,本方法的运行基于计算机程序,该计算机程序的程序文件存储于前述基于冯诺依曼体系的计算机系统的外存储器10032中,在运行时被加载到内存储器10034中,然后被编译为机器码之后传递至处理器1002中执行,从而使得基于冯诺依曼体系的计算机系统中形成逻辑上的推送消息管理进程加载模块102、已启动应用进程确定模块104、推送消息接收模块106以及推送消息下发模块108。且在上述推送消息的推送方法执行过程中,输入的参数均通过外部输入接口1001接收,并传递至存储器1003中缓存,然后输入到处理器1002中进行处理,处理的结果数据或缓存于存储器1003中进行后续地处理,或被传递至输出接口1004进行输出。In this embodiment, the operation of this method is based on a computer program, and the program file of the computer program is stored in the external memory 10032 of the aforementioned computer system based on the Von Neumann architecture, and is loaded into the internal memory 10034 during operation, and then After being compiled into machine code, it is delivered to the processor 1002 for execution, so that a logical push message management process loading module 102, a started application process determination module 104, and a push message receiving module are formed in the computer system based on the von Neumann system 106 and push message delivery module 108. Moreover, during the execution of the push method of the above-mentioned push message, the input parameters are all received through the external input interface 1001, and passed to the memory 1003 for buffering, and then input to the processor 1002 for processing, and the processed result data may be cached in the memory 1003 Subsequent processing is carried out, or is transmitted to the output interface 1004 for output.

具体的,在本实施例中,处理器1002用于加载预定义的后台常驻的推送消息管理进程;获取已启动的一个或一个以上的应用对应的应用进程;通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。Specifically, in this embodiment, the processor 1002 is configured to load a predefined background resident push message management process; obtain the application process corresponding to one or more started applications; The push message sent by the application server corresponding to the one or more applications; the push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, and the application corresponding to the application The process processes the received push message.

在可选的实施例中,处理器1002还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。In an optional embodiment, the processor 1002 is further configured to regularly query the application server corresponding to the one or more applications through the push message management process, and the application server is used to send the push message to the Push message delivery.

在可选的实施例中,处理器1002还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。In an optional embodiment, the processor 1002 is further configured to determine the priority of the one or more started applications; determine that the one or more started applications are polling according to the priority Inquiry period; according to the inquiry period corresponding to each application, the application server corresponding to the application is inquired through the push message management process.

在可选的实施例中,处理器1002还用于根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。In an optional embodiment, the processor 1002 is further configured to determine the push message sending interval corresponding to the one or more started applications according to the priority; according to the push message sending interval corresponding to each application interval, the push message corresponding to the application is periodically sent to the application process corresponding to the application through the push message management process.

在可选的实施例中,处理器1002还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。In an optional embodiment, the processor 1002 is further configured to: if the push message is sent to the application process corresponding to the application corresponding to the push message through the push message management process, the application process is not started or has If it is closed, the push message is cached, and when the application process is started again, the cached push message is sent to the application process through the push message management process.

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and certainly cannot limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (10)

CN201610913507.5A2016-10-192016-10-19Push method and device for push messageActiveCN106550021B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610913507.5ACN106550021B (en)2016-10-192016-10-19Push method and device for push message

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610913507.5ACN106550021B (en)2016-10-192016-10-19Push method and device for push message

Publications (2)

Publication NumberPublication Date
CN106550021Atrue CN106550021A (en)2017-03-29
CN106550021B CN106550021B (en)2020-03-10

Family

ID=58391914

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610913507.5AActiveCN106550021B (en)2016-10-192016-10-19Push method and device for push message

Country Status (1)

CountryLink
CN (1)CN106550021B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106953933A (en)*2017-05-182017-07-14腾讯科技(深圳)有限公司A kind of information push method and device, electronic equipment
CN109729001A (en)*2018-12-192019-05-07北京顺丰同城科技有限公司A kind of information push method and device
CN112291364A (en)*2020-11-062021-01-29腾讯科技(深圳)有限公司Message pushing processing method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020038450A1 (en)*2000-08-032002-03-28International Business Machines CorporationMethod and system to run stored procedures as workflow activity implementations
US20060143220A1 (en)*2003-12-312006-06-29Spencer Herman JrSoftware application framework using meta-data defined object definitions
US20120109938A1 (en)*2010-10-292012-05-03Microsoft CorporationProviding consolidated project information service
US8296321B2 (en)*2009-02-112012-10-23Salesforce.Com, Inc.Techniques for changing perceivable stimuli associated with a user interface for an on-demand database service
CN103647768A (en)*2013-12-062014-03-19北京奇虎科技有限公司Game client and realization method thereof
CN104331327A (en)*2014-12-022015-02-04山东乾云启创信息科技有限公司Optimization method and optimization system for task scheduling in large-scale virtualization environment
CN104539672A (en)*2014-12-192015-04-22南京工业大学Mobile application program message pushing agent system based on cloud computing
CN104584489A (en)*2012-08-302015-04-29三星电子株式会社Push message service system and method
CN105308568A (en)*2013-06-092016-02-03苹果公司 Dynamic scaling of mobile devices based on user activity
CN104239132B (en)*2014-09-162016-10-05努比亚技术有限公司A kind of wake up the method for alignment, device and terminal up

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20020038450A1 (en)*2000-08-032002-03-28International Business Machines CorporationMethod and system to run stored procedures as workflow activity implementations
US20060143220A1 (en)*2003-12-312006-06-29Spencer Herman JrSoftware application framework using meta-data defined object definitions
US8296321B2 (en)*2009-02-112012-10-23Salesforce.Com, Inc.Techniques for changing perceivable stimuli associated with a user interface for an on-demand database service
US20120109938A1 (en)*2010-10-292012-05-03Microsoft CorporationProviding consolidated project information service
CN104584489A (en)*2012-08-302015-04-29三星电子株式会社Push message service system and method
CN105308568A (en)*2013-06-092016-02-03苹果公司 Dynamic scaling of mobile devices based on user activity
CN103647768A (en)*2013-12-062014-03-19北京奇虎科技有限公司Game client and realization method thereof
CN104239132B (en)*2014-09-162016-10-05努比亚技术有限公司A kind of wake up the method for alignment, device and terminal up
CN104331327A (en)*2014-12-022015-02-04山东乾云启创信息科技有限公司Optimization method and optimization system for task scheduling in large-scale virtualization environment
CN104539672A (en)*2014-12-192015-04-22南京工业大学Mobile application program message pushing agent system based on cloud computing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106953933A (en)*2017-05-182017-07-14腾讯科技(深圳)有限公司A kind of information push method and device, electronic equipment
CN109729001A (en)*2018-12-192019-05-07北京顺丰同城科技有限公司A kind of information push method and device
CN112291364A (en)*2020-11-062021-01-29腾讯科技(深圳)有限公司Message pushing processing method and device
CN112291364B (en)*2020-11-062024-07-26腾讯科技(深圳)有限公司Message pushing processing method and device

Also Published As

Publication numberPublication date
CN106550021B (en)2020-03-10

Similar Documents

PublicationPublication DateTitle
CN115004673B (en)Message pushing method, device, electronic equipment and computer readable medium
CN107172182B (en)Message pushing method, message pushing server and terminal
KR102105636B1 (en)Installing application remotely
US10425349B2 (en)Idle worker-process page-out
WO2011023068A1 (en)Device, method and related device for obtaining service content for personal network equipment
CN103544035A (en)Application clearing method and device for mobile terminal
WO2017166713A1 (en)Service request processing method and device
CN111258723B (en) Transaction processing methods, devices, systems, media and equipment for distributed systems
CN106550021B (en)Push method and device for push message
CN105677754A (en)Method, apparatus and system for acquiring subitem metadata in file system
US20220124483A1 (en)Nomination of a primary cell phone from a pool of cell phones
CN106919461B (en)Method and device for adjusting broadcast receiver queue and terminal equipment
WO2024251107A1 (en)Container orchestration method, data access method, and electronic device and storage medium
CN106941509B (en)User information flow request method and device
JP4882537B2 (en) Request control method by timer cooperation
CN108234481B (en) A method and distributed system for controlling multi-machine distributed access to external systems
CN116932248A (en)Event processing method and device based on threads and coroutines and terminal equipment
CN107729435A (en)Method, apparatus, equipment and the storage medium that distributed file system task is assigned
CN113098761B (en)Communication method, communication apparatus, electronic device, and storage medium
CN113368494A (en)Cloud equipment distribution method and device, electronic equipment and storage medium
CN106357764A (en) Data synchronization method and server for mobile terminal
CN111399934A (en)Method and device for managing automatic program
CN115334163B (en) Business data processing method, device and server
CN114610691B (en)Storage object acquisition method, storage object acquisition device, equipment and medium
CN115033617B (en) Account details data processing method, device, server and client

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

CB02Change of applicant information
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp