CN106550021B - Push method and device for push message - Google Patents
Push method and device for push message Download PDFInfo
- Publication number
- CN106550021B CN106550021B CN201610913507.5A CN201610913507A CN106550021B CN 106550021 B CN106550021 B CN 106550021B CN 201610913507 A CN201610913507 A CN 201610913507A CN 106550021 B CN106550021 B CN 106550021B
- Authority
- CN
- China
- Prior art keywords
- push message
- application
- push
- management process
- applications
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/2876—Pairs of inter-processing entities at each side of the network, e.g. split proxies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种推送消息的推送方法及装置。The present invention relates to the field of computer technology, and in particular, to a method and device for pushing a message.
背景技术Background technique
随着移动通信技术的法阵和终端技术的不断发展,在手机上集成的功能越来越多,手机已经不仅仅是传统意义上的用来发短信和打电话的通信终端了,而逐步发展成了用户的个人信息业务终端。With the continuous development of the array and terminal technology of mobile communication technology, more and more functions are integrated on the mobile phone. The mobile phone is not only a communication terminal used for sending text messages and making calls in the traditional sense, but is gradually developing It has become the user's personal information service terminal.
用户可以在终端上安装各种应用程序,例如聊天软件、游戏软件、支付软件等等,这些软件或应用均可以通过终端即时的接收网络侧发送的应用消息,即接收对应的应用服务器发送的消息推送,例如,新邮件消息通知、新QQ消息通知等等。Users can install various application programs 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, etc.
在相关的技术方案中,为了实现每一个应用的消息的推送,在每一个应用中都内置了一个push服务,在终端中安装的客户端接收到应用服务器发送的推送消息时,启动该应用中内置的push服务进程,并通过该push服务进程来向终端发送推送消息并在终端上预设的推送消息展示区域进行展示。若某一个应用对应的push服务进程因为某一种原因被注销,就可能造成该应用所对应的推送消息不能成功推送或不能及时进行推送。In the related technical solution, in order to realize the push of messages 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 in the The built-in push service process, and through the push service process, 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 an application is cancelled for some reason, it may cause that the push message corresponding to the application cannot be pushed successfully or cannot be pushed in time.
发明内容SUMMARY OF THE INVENTION
本发明实施例提出了一种推送消息的推送方法,可以解决因为推送消息的推送存在的容易出现漏推送从而导致的推送消息的推送的完整性不足的技术问题。The embodiment of the present invention provides a method for pushing a push message, which can solve the technical problem of insufficient push integrity of the push message due to the fact that the push message is prone to missing push.
一种推送消息的推送方法,包括:A push 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;
通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;Receive, through the push message management process, push messages delivered 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 received push message is processed by the application process corresponding to the application.
在其中一个实施例中,所述通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息还包括:In one embodiment, the receiving, by the push message management process, the push messages delivered by the respective application servers corresponding to the one or more applications further includes:
通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。The application server corresponding to the one or more applications is periodically inquired by the push message management process, and the application server is configured to deliver the push message when there is a push message.
在其中一个实施例中,所述通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器还包括:In one embodiment, 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 an inquiry period during polling of the activated one or more applications 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 further includes:
根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;Determine the push message sending interval corresponding to the activated one or more applications according to the priority;
根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。According to the push message sending interval corresponding to each application, the push message management process periodically sends the push message corresponding to the application to the application process corresponding to the application.
在其中一个实施例中,所述通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程还包括:In one embodiment, 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 application process is not started or has been closed when 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 push message will be cached, and the application process will re-run the push message. When activated, the push message management process sends the cached push message to the application process.
此外,在本发明实施例中,还提出了一种推送消息的推送装置。In addition, in an embodiment of the present invention, a push device for pushing a message is also provided.
一种推送消息的推送装置,包括: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 determination module is used to obtain the application process corresponding to the started one or more applications;
推送消息接收模块,用于通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;a push message receiving module, configured to receive, through the push message management process, push messages issued by the respective corresponding application servers of the one or more applications;
推送消息下发模块,用于通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。A push message issuing module is configured to send the push message to an application process corresponding to an application corresponding to the push message through the push message management process, and the received push message is processed by the application process corresponding to the application.
在其中一个实施例中,所述推送消息接收模块还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。In one embodiment, the push message receiving module is further configured to periodically query the application server corresponding to the one or more applications through the push message management process, and the application server is configured to send the push message when there is a push message. The push message is delivered.
在其中一个实施例中,所述推送消息接收模块还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。In one embodiment, the push message receiving module is further configured to determine the priority of the activated one or more applications; according to the priority, determine that the activated one or more applications are in 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 embodiment, the push message issuing module is further configured to determine, according to the priority, a push message sending interval corresponding to the activated one or more applications; The push message sending 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.
在其中一个实施例中,所述推送消息下发模块还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。In one embodiment, the push message issuing 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 the push message is activated or closed, the push message is cached, and when the application process is activated again, the cached push message is sent to the application process through the push message management process.
采用了上述推送消息的推送方法和装置之后,对终端中接收推送消息的应用来讲,将所有的应用程序对应的相应的推送消息的接收以及推送由终端中定义的推送消息管理进程来完成,即由推送消息管理进程接收各个应用服务器下发的推送消息,并且,将接收到的推送消息下发给各个应用进程进行处理。相较于传统技术中由各个应用内置的推送服务进程分别处理本应用的推送消息的方案,由于推送消息的所有操作均是由同一的推送消息管理进程来完成的,避免了单个应用分别处理的情况下容易出现的推送服务进程加载失败或者被其他进程关闭的现象、以及导致的推送消息被漏推送或者推送不及时的现象,提高了推送消息在推送过程中的完整性和时效性,提高了用户体验。进一步的,因为所有的应用的推送消息可以由同一个进程来完成,减少了在终端中运行的进程数量,减少了对终端资源的占用,提高了资源利用率。After adopting the above push message push method and device, for applications receiving push messages in the terminal, the receiving and pushing of corresponding push messages corresponding to all 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 delivered by each application server, and delivers the received push messages to each application process for processing. Compared with the solution in the traditional technology that the push service process built in each application processes the push messages of the application separately, since all operations of the push message are completed by the same push message management process, it avoids the need for a single application to handle the push messages separately. In this case, the phenomenon that the push service process fails to load or is closed by other processes, as well as the phenomenon that the push message is missed or pushed in time, improves the integrity and timeliness of the push message in the push process, and improves the user experience. Further, 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 explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying 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. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
其中:in:
图1为一个实施例中一种推送消息的推送方法的流程示意图;1 is a schematic flowchart of a method for pushing a message in one embodiment;
图2为一个实施例中一种推送消息的推送装置的结构示意图;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 foregoing method for pushing a message in one embodiment.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在相关技术的推送消息的推送过程中,每一个推送消息的推送均需要启动相应的应用中内置的push服务进程,也就是说,在终端中需要开启多个push服务进程,并且,每一个push服务进程负责一个相应的应用的推送消息的推送。发明人经研究发现,在上述推送消息的推送过程中,因为每一个推送消息的推送均需要启动相应的应用中内置的push服务进程,容易导致某一个应用对应的推送消息容易出现推送不成功而被漏掉的情况,用户可能不能及时接收到相应的推送消息,若刚好该推送消息是比较重要的消息,则可能对用户造成较大的影响,即存在容易出现漏推送导致了推送消息的推送存在不及时和不完整的现象。In the push message push process of the related art, each push message push 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 service process needs to be started. The service process is responsible for the push of a corresponding application's push message. The inventor found through research that in the process of pushing the above-mentioned push messages, because the push of each push message needs to start the built-in push service process in the corresponding application, it is easy to cause the push message corresponding to a certain application to be prone to fail to push and fail. 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, it is easy to miss the push and lead to the push of the push message. There are untimely and incomplete phenomena.
在基于上述相关技术方案容易出现漏推送导致了推送消息的推送存在不及时和不完整的现象的基础上,在本实施例中,提出了一种推送消息的推送方法,该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机系统之上,该计算机程序可以是终端中的应用程序对应的推送消息的推送管理程序。该计算机系统可以是运行上述计算机程序的例如智能手机、平板电脑、个人电脑等服务器或终端。Based on the fact that the above-mentioned related technical solutions are prone to missed pushes, resulting in untimely and incomplete push messages, in this embodiment, a push message push method is proposed, and the implementation of the method can depend on As for the computer program, the computer program can run on a computer system based on the von Neumann system, and the computer program can be a push management program for push messages corresponding to the application program in the terminal. The computer system may be a server or terminal such as a smart phone, a tablet computer, a personal computer, etc. running the above-mentioned computer program.
具体的,如图1所示,上述推送消息的推送方法包括如下步骤S102-S108:Specifically, as shown in FIG. 1 , the above method for pushing a message includes the following steps S102-S108:
步骤S102:加载预定义的后台常驻的推送消息管理进程。Step S102: Load a predefined background resident push message management process.
在传统技术中,在智能手机等终端设备上安装的每一个应用在运行时或者后台运行时,都会单独开启一个后台推送进程,用来在对应的应用服务器有推送消息下发时,将接收到的推送消息推送给用户。也就是说,在终端上运行了多个后台推送进程。In the traditional technology, each application installed on a terminal device such as a smartphone will start a separate background push process when it is running or running in the background. 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 to manage the reception, delivery and push of push messages of all applications. Compared with running multiple background push processes simultaneously in the traditional technology, the The process running in the background reduces the occupation of terminal memory.
在本实施例中,在终端中预定义有推送消息管理进程,该推送消息管理进程可以与终端中安装的所有的应用进行通信,并且,对每一个应用的推送消息进行接收和下发。需要说明的是,在本实施例中,该推送消息管理进程是在终端开启之后即在后台运行的,也就是说,推送消息管理进程是后台常驻的。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 applications that have been started.
在本实施例中,推送消息管理进程在当前需要进行推送消息的相关操作所对应的应用是当前正在前台或者后台运行的应用进程所对应的应用,或者,是在设置中设置了在当前需要进程推送消息的推送的应用。In this embodiment, the application corresponding to the current push message management process that needs to perform the relevant operation of the push message is the application corresponding to the application process currently running in the foreground or the background, or, it is set in the settings that the current need process Pushed apps that push messages.
因此,首先需要确定在终端中已启动的应用所对应的应用进程。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, a push message delivered by an application server corresponding to each of the one or more applications.
在终端中运行的推送消息管理进程与上述应用之间建立通信关系,并且,每一个应用对应的应用服务器所下发的推送消息,是下发至终端中运行的推送消息管理进程,并由该推送消息管理进程进行推送消息的推送。A communication relationship is established between the push message management process running in the terminal and 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 sent 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 sent by the application server is the process of polling the application server corresponding to each application through the push message management process. If there is a push message, send the push message to the Tusong message management process.
需要说明的是,在本实施例中,通过推送消息管理进程向应用服务器进行轮询或询问的频率,可以是实时的向应用服务器进行轮询或询问,或者,按照预设的周期或时间间隔,向应用服务器进行轮询或询问。It should be noted that, in this embodiment, the frequency of polling or querying the application server through the push message management process may be polling or querying the application server in real time, or according to a preset period or time interval , polling or querying the application server.
具体的,所述通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息还包括:通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。Specifically, the receiving, through the push message management process, the push messages delivered by the respective application servers corresponding to the one or more applications further includes: periodically querying the one or more application servers through the push message management process An application server corresponding to the application, where the application server is configured to deliver the push message when there is a push message.
也就是说,为了避免推送消息管理进程需要不断的向各个应用服务器进行轮询,并且在存在推送消息时不断的向每一个应用进行推送消息的推送,占用终端资源,可以将推送消息管理进程向应用服务器进行轮询的时间设置为定时向各个应用服务进行轮询。That is to say, in order to avoid the need for the push message management process to continuously poll each application server, and to 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 poll each application service regularly.
进一步的,用户对于不同的应用存在不同的推送消息推送的要求,例如,针对微信、QQ等聊天软件,用户希望实时的接收消息,以免漏掉重要消息或者不能及时接收到相应的推送消息,而例如游戏、视频软件等应用,用户并不希望实时的接收消息,只在设定的时间或者定期接收推送消息即可。在此种情况下,针对所有的应用,均采用实时不断的向每一个应用服务器进行询问并接收下发的推送消息、或者采用同一周期或时间间隔向每一个应用服务器进行询问并接收下发的推送消息,是不符合用户预先的需求,或者,在用户并不急需的应用的推送消息上占用终端的相关资源,是对终端资源的一种浪费。Further, users have different push message push requirements 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, it is used to continuously query each application server in real time and receive the delivered push messages, or use the same period or time interval to query each application server and receive the delivered messages. Push messages do not meet the user's pre-requirements, or occupy relevant resources of the terminal on the push messages of applications that are not urgently needed by the user, which is a waste of terminal resources.
因此,可以根据不同的应用设置不同的询问周期或询问间隔。Therefore, different interrogation periods or interrogation intervals can be set according to different applications.
具体的,在一个实施例中,所述通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器还包括:确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。Specifically, in one embodiment, 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 activated one or more applications ; According to the priority, determine the inquiry period of the started one or more applications when polling; According to the inquiry period corresponding to each application, inquire the corresponding application 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 level of traditional Chinese medicine or the push time of the push message. Therefore, Applications under the same priority can adopt the same push message push policy.
对于当前需要进行询问的应用所对应的应用进程,确定对应的优先级,并且根据优先级确定与每一个应用对应的在询问应用程序的过程中进行询问时的询问周期。在每一个应用对应的询问周期确定的情况下,对每一个应用分别进行处理,也就是说,按照每一个应用对应的询问周期,通过推送消息管理进程,分别向与该应用对应的应用服务器进行询问。For the application process corresponding to the application that needs to be queried currently, the corresponding priority is determined, and according to the priority, the inquiry period corresponding to each application when inquiry is performed in the process of inquiring the application program is determined. When the inquiry period corresponding to each application is determined, each application is processed separately, that is, according to the inquiry period corresponding to each application, the message management process is pushed to the application server corresponding to the application. ask.
步骤S108:通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。Step S108: Send the push message to an application process corresponding to the application corresponding to the push message through the push message management process, and the received push message is processed by the application process corresponding to the application.
推送消息管理进程在接收到各个应用服务器下发的推送消息之后,即可将接收到的每一个推送消息下发给与该推送消息对应的应用,应用进程在接收到推送消息管理进程发送的推送消息之后,按照预设的推送消息展示方式展示接收到的推送消息。After receiving the push message sent by each application server, the push message management process can deliver 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 is sent, the received push message is displayed according to the preset push message display mode.
需要说明的是,并不是所有的推送消息在接收到之后即马上发送给对应的应用进程进行处理,可以根据该推送消息的重要程度来确定具体的发送时间。It should be noted that not all push messages are immediately sent to the corresponding application process for processing after they are received, and the specific sending time may be determined according to the importance of the push message.
具体的,在一个可选的实施例中,上述推送消息的推送方法还包括:根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。Specifically, in an optional embodiment, the above method for pushing a push message further includes: determining a push message sending interval corresponding to the activated one or more applications according to the priority; A push message sending interval corresponding to an application, and the push message corresponding to the application is periodically sent 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, for each application or each application priority, a corresponding push message release interval is determined. After the push message sending interval corresponding to a certain application is determined, 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 issued 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. Thus, the application is prevented from being constantly awakened to process the related operations of the push message, and the effective utilization of the terminal resources is improved.
可选的,在一个实施例中,还可能存在下面这种情况,在推送消息管理进程接收到与某一个应用对应的推送消息之后,在将该推送消息下发时,该应用对应的应用进程却已经被关闭,在此种情况下,不能继续完成该推送消息的推送,需要重新启动该应用进程,而应用进程的关闭可能是用户主动的行为美丽如不想接收该应用对应的推送消息,因为,在此种情况下,处理的方式并不是重新启动该应用进程,而是待下一次该应用进程被启动时继续推送该推送消息,既避免了该应用进程被重新启动,也避免了对应的推送消息被漏推送。Optionally, in an embodiment, there may also be the following situation: 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 been closed. In this case, the push of the push message cannot continue to be completed, and the application process needs to be restarted. The closing of the application process may be the user's active behavior. If you don't 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 prevents the application process from 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 the push message is sent 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, in the case that the application process that receives the push message is closed during the push message for some reason and the push message fails to be pushed, the push message management process caches the failed push message, The push message is sent to and pushed by the application process when the application process is started next time.
此外,在一个实施例中,如图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
推送消息管理进程加载模块102,用于加载预定义的后台常驻的推送消息管理进程;A push message management
已启动应用进程确定模块104,用于获取已启动的一个或一个以上的应用对应的应用进程;A started application
推送消息接收模块106,用于通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;A push
推送消息下发模块108,用于通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。The push
可选的,在一个实施例中,推送消息接收模块106还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。Optionally, in one embodiment, the push
可选的,在一个实施例中,推送消息接收模块106还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。Optionally, in one embodiment, the push
可选的,在一个实施例中,推送消息下发模块108还用于根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。Optionally, in one embodiment, the push
可选的,在一个实施例中,推送消息下发模块108还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。Optionally, in one embodiment, the push
采用了上述推送消息的推送方法和装置之后,对终端中接收推送消息的应用来讲,将所有的应用程序对应的相应的推送消息的接收以及推送由终端中定义的推送消息管理进程来完成,即由推送消息管理进程接收各个应用服务器下发的推送消息,并且,将接收到的推送消息下发给各个应用进程进行处理。相较于传统技术中由各个应用内置的推送服务进程分别处理本应用的推送消息的方案,由于推送消息的所有操作均是由同一的推送消息管理进程来完成的,避免了单个应用分别处理的情况下容易出现的推送服务进程加载失败或者被其他进程关闭的现象、以及导致的推送消息被漏推送或者推送不及时的现象,提高了推送消息在推送过程中的完整性和时效性,提高了用户体验。进一步的,因为所有的应用的推送消息可以由同一个进程来完成,减少了在终端中运行的进程数量,减少了对终端资源的占用,提高了资源利用率。After adopting the above push message push method and device, for applications receiving push messages in the terminal, the receiving and pushing of corresponding push messages corresponding to all 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 delivered by each application server, and delivers the received push messages to each application process for processing. Compared with the solution in the traditional technology that the push service process built in each application processes the push messages of the application separately, since all operations of the push message are completed by the same push message management process, it avoids the need for a single application to handle the push messages separately. In this case, the phenomenon that the push service process fails to load or is closed by other processes, as well as the phenomenon that the push message is missed or pushed in time, improves the integrity and timeliness of the push message in the push process, and improves the user experience. Further, 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 architecture running the above method for pushing a message. The computer system may be a terminal device such as a smart phone, a tablet computer, and a palmtop computer. Specifically, it may include an
在本实施例中,本方法的运行基于计算机程序,该计算机程序的程序文件存储于前述基于冯诺依曼体系的计算机系统的外存储器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
具体的,在本实施例中,处理器1002用于加载预定义的后台常驻的推送消息管理进程;获取已启动的一个或一个以上的应用对应的应用进程;通过所述推送消息管理进程接收所述一个或一个以上的应用各自对应的应用服务器下发的推送消息;通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程,由该应用对应的应用进程处理所述接收到的推送消息。Specifically, in this embodiment, the
在可选的实施例中,处理器1002还用于通过所述推送消息管理进程定期询问所述一个或一个以上的应用对应的应用服务器,所述应用服务器用于在存在推送消息时将所述推送消息下发。In an optional embodiment, the
在可选的实施例中,处理器1002还用于确定所述已启动的一个或一个以上的应用的优先级;根据所述优先级确定所述已启动的一个或一个以上的应用在轮询时的询问周期;按照所述与每一个应用对应的询问周期,通过所述推送消息管理进程询问该应用对应的应用服务器。In an optional embodiment, the
在可选的实施例中,处理器1002还用于根据所述优先级确定所述已启动的一个或一个以上的应用对应的推送消息发送间隔;根据所述与每一个应用对应的推送消息发送间隔,通过所述推送消息管理进程将与该应用对应的推送消息定期发送给该应用对应的应用进程。In an optional embodiment, the
在可选的实施例中,处理器1002还用于若在通过所述推送消息管理进程将所述推送消息发送给该推送消息对应的应用对应的应用进程时,所述应用进程未启动或已关闭,则将该推送消息缓存,在该应用进程再次被启动时,通过所述推送消息管理进程将缓存的推送消息发送给该应用进程。In an optional embodiment, the
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610913507.5A CN106550021B (en) | 2016-10-19 | 2016-10-19 | Push method and device for push message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610913507.5A CN106550021B (en) | 2016-10-19 | 2016-10-19 | Push method and device for push message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106550021A CN106550021A (en) | 2017-03-29 |
CN106550021B true CN106550021B (en) | 2020-03-10 |
Family
ID=58391914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610913507.5A Active CN106550021B (en) | 2016-10-19 | 2016-10-19 | Push method and device for push message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106550021B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106953933B (en) * | 2017-05-18 | 2018-09-11 | 腾讯科技(深圳)有限公司 | A kind of information push method and device, electronic equipment |
CN109729001A (en) * | 2018-12-19 | 2019-05-07 | 北京顺丰同城科技有限公司 | A kind of information push method and device |
CN112291364B (en) * | 2020-11-06 | 2024-07-26 | 腾讯科技(深圳)有限公司 | Message pushing processing method and device |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020038450A1 (en) * | 2000-08-03 | 2002-03-28 | International Business Machines Corporation | Method and system to run stored procedures as workflow activity implementations |
US20060143220A1 (en) * | 2003-12-31 | 2006-06-29 | Spencer Herman Jr | Software application framework using meta-data defined object definitions |
US8296321B2 (en) * | 2009-02-11 | 2012-10-23 | Salesforce.Com, Inc. | Techniques for changing perceivable stimuli associated with a user interface for an on-demand database service |
US8818993B2 (en) * | 2010-10-29 | 2014-08-26 | Microsoft Corporation | Providing consolidated project information service |
KR101488268B1 (en) * | 2012-08-30 | 2015-01-30 | 삼성전자주식회사 | Push message service system and method thereof |
US9256484B2 (en) * | 2013-06-09 | 2016-02-09 | Apple Inc. | Dynamic adjustment of mobile device based on user activity |
CN103647768A (en) * | 2013-12-06 | 2014-03-19 | 北京奇虎科技有限公司 | Game client and realization method thereof |
CN104239132B (en) * | 2014-09-16 | 2016-10-05 | 努比亚技术有限公司 | A kind of wake up the method for alignment, device and terminal up |
CN104331327B (en) * | 2014-12-02 | 2017-07-11 | 山东乾云启创信息科技股份有限公司 | The optimization method of task scheduling and optimization system in large scale virtualisation environment |
CN104539672A (en) * | 2014-12-19 | 2015-04-22 | 南京工业大学 | Mobile application program message pushing agent system based on cloud computing |
-
2016
- 2016-10-19 CN CN201610913507.5A patent/CN106550021B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106550021A (en) | 2017-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108449410B (en) | Message management method, system and related device in cloud platform | |
CN115004673B (en) | Message pushing method, device, electronic equipment and computer readable medium | |
CN107172182B (en) | Message pushing method, message pushing server and terminal | |
WO2019205371A1 (en) | Server, message allocation method, and storage medium | |
EP2893444A1 (en) | Quota-based resource management | |
US20140359111A1 (en) | Idle Worker-Process Page-Out | |
WO2017166713A1 (en) | Service request processing method and device | |
CN111258723B (en) | Transaction processing methods, devices, systems, media and equipment for distributed systems | |
CN111130986B (en) | Message sending method, device, equipment and storage medium | |
CN112751847A (en) | Interface call request processing method and device, electronic equipment and storage medium | |
CN107682389B (en) | Method, terminal and computer readable storage medium for executing network request | |
CN107026879B (en) | A data caching method and background application system | |
CN106550021B (en) | Push method and device for push message | |
US11832349B2 (en) | Nomination of a primary cell phone from a pool of cell phones | |
CN113268317B (en) | Task processing method and device and electronic equipment | |
CN109005465B (en) | Bullet screen message distribution method, device, equipment and storage medium | |
CN106789568A (en) | A kind of communication information acquisition methods and device | |
CN115878138A (en) | Application pre-downloading method and device, computer and storage medium | |
CN109995855B (en) | Data acquisition method, device and terminal | |
CN114388110A (en) | Number source data update method, device, server, storage medium and product | |
CN113368494A (en) | Cloud equipment distribution method and device, electronic equipment and storage medium | |
CN116418804B (en) | Business processing method, system and storage medium | |
CN115334163B (en) | Business data processing method, device and server | |
CN107209882B (en) | Multi-stage de-registration for managed devices | |
CN113704274B (en) | Data reading method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change 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. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |