A message pushing method and device, electronic equipment and storage medium
By establishing service binding relationships between applications and using active applications to revive destroyed processes, the problem of poor message delivery capability of proprietary channels is solved, thereby improving the timely delivery rate of messages and the activity rate of applications.
Patent Information
- Application Number
- CN202111266073.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2041-10-28
AI Technical Summary
Existing technologies have poor message delivery capabilities through proprietary channels, resulting in messages not being delivered to users in a timely manner, which affects the frequency of application usage and retention rate.
By establishing service binding relationships between user-side applications, the message service of the active application can be used to revive destroyed processes and re-establish push channels, ensuring that messages can be delivered in a timely manner.
It improved the activity rate of the application's messaging service, enhanced message delivery rate, and avoided the problem of push messages not being delivered due to application destruction.
Smart Images

Figure CN114090283B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to computer technology, and particularly relate to a message pushing method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the high development of mobile Internet, the application program APP uses the message pushing mode to promote the user to use the APP frequently to achieve the marketing purpose. The strength of the message pushing on the APP, and the closeness of the message and the user determine the user frequency and the retention rate, and drive the APP service income. In the prior art, the common pushing mode of the manufacturer channel and the self-owned channel is adopted, the manufacturer channel is a shared pushing channel, and it is difficult to improve, and the self-owned channel pushes through a plurality of third-party platforms, and the pushing ability of different pushing platforms is greatly different. How to improve the touch ability of the self-owned channel to push the message is the key to high touch rate of the message. SUMMARY
[0003] The present application provides a message pushing method, device, electronic equipment and storage medium to improve the activity rate of the message service of the application program, thereby improving the touch rate of the message on the application program.
[0004] In a first aspect, an embodiment of the present application provides a message pushing method, which comprises:
[0005] The first application program of the user end queries the server whether there is a registered second application program of the user end;
[0006] If there is a registered second application program of the user end, the service binding is performed on the first application program and the second application program through the message service of the first application program and the message service of the second application program;
[0007] If the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of another application program in service binding, so that the pulled-alive application program re-establishes the pushing channel with the server, and the pushing channel is used for the information pushing channel of the server to the pulled-alive application program.
[0008] Further, the method further comprises:
[0009] The third application program of the user end receives the pull-alive instruction sent by the server; wherein the pull-alive instruction is sent by the server when it is determined that the pushing channel with the first application program does not exist when it needs to push information to the first application program; and the third application program is any application program in an active state of the user end;
[0010] The third application program of the user terminal activates the first application program according to the pull instruction, so that the first application program re-establishes a push channel with the server for the server to push information to the first application program.
[0011] Further, the service binding of the first application program and the second application program through the message service of the first application program and the message service of the second application program comprises:
[0012] binding the first message service of the first application program and the second message service of the second application program to form a first communication connection from the first application program to the second application program, so that the first application program obtains the destroyed notification of the second application program through the first communication connection, and activates the second application program according to the destroyed notification of the second application program;
[0013] binding the third message service of the first application program and the fourth message service of the second application program to form a second communication connection from the second application program to the first application program, so that the second application program obtains the destroyed notification of the first application program through the second communication connection, and activates the first application program according to the destroyed notification of the first application program.
[0014] Further, if the process of any one of the application programs in the service binding is destroyed, the process of the destroyed application program is activated through the message service of another application program in the service binding, comprising:
[0015] If the process of any one of the application programs in the service binding is destroyed, the destroyed application program is service-unbound through the message service of another application program in the service binding, and after a preset time interval, the process of the destroyed application program is reactivated through the message service of the another application program, and the reactivated application program is service-bound.
[0016] In a second aspect, an embodiment of the present application provides a message pushing method, which comprises:
[0017] receiving a query request sent by a first application program of a user terminal, and determining whether there is a registered second application program of the user terminal according to the query request;
[0018] If there is a registered second application program of the user terminal, the registration information of the second application program is sent to the first application program, so that the first application program is service-bound to the second application program through the message service;
[0019] The application receives a channel establishment request sent by any one of the application programs of the service binding, establishes a push channel with the any one application program according to the channel establishment request, and pushes information to the any one application program through the push channel.
[0020] Further, the method further comprises:
[0021] When the information is pushed to the first application program, it is determined whether the push channel with the first application program exists;
[0022] When the push channel with the first application program does not exist, a pull-to-live instruction is sent to a third application program, so that the third application program pulls the first application program to live according to the pull-to-live instruction, and the first application program re-establishes a push channel with the server;
[0023] The information is pushed to the first application program through the re-established push channel.
[0024] Further, the sending of the pull-to-live instruction to the third application program comprises:
[0025] The application program of the user terminal in an active state is determined as the third application program, and the pull-to-live instruction is sent to the third application program.
[0026] Further, the determination of the active application program of the user terminal as the third application program comprises:
[0027] According to the heartbeat messages received within a preset time period and the identifier of the user terminal, the active application program of the user terminal is determined as the third application program.
[0028] Further, before the receiving of the first application program query request of the user terminal, the method further comprises:
[0029] The first application program is registered according to the registration request of the first application program, and a push channel between the server and the first application program is established, so that the first application program receives the push message sent by the server.
[0030] In a third aspect, an embodiment of the present application further provides a message pushing device, which comprises:
[0031] A registration query module is configured to query, by a first application program of a user terminal, a server to determine whether a second application program of the user terminal is registered;
[0032] a program binding module, configured to, if there is a registered second application program of the user terminal, perform service binding on the first application program and the second application program through message services of the first application program and the second application program;
[0033] a program pull-alive module, configured to, if a process of any one of the service-bound application programs is destroyed, pull alive the process of the destroyed application program through a message service of another application program of the service-bound application programs, so that the pulled-alive application program re-establishes a push channel with the server, the push channel being a push channel for the server to push information to the pulled-alive application program.
[0034] In a fourth aspect, an embodiment of the present application further provides a message pushing device, which comprises:
[0035] a request receiving module, configured to receive a query request sent by a first application program of a user terminal, and determine whether there is a registered second application program of the user terminal according to the query request;
[0036] an information sending module, configured to, if there is a registered second application program of the user terminal, send registration information of the second application program to the first application program, so that the first application program performs service binding on the second application program through a message service;
[0037] a channel establishing module, configured to receive a channel establishing request sent by any one of the service-bound application programs, establish a push channel with the any one of the application programs according to the channel establishing request, and push information to the any one of the application programs through the push channel.
[0038] In a fifth aspect, an embodiment of the present application further provides an electronic device, which comprises:
[0039] one or more processors;
[0040] a storage device, configured to store one or more programs,
[0041] when the one or more programs are executed by the one or more processors, the one or more processors implement the message pushing method.
[0042] In a sixth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the message pushing method.
[0043] In the embodiment of the present application, the first application program of the user terminal queries the server whether there is a registered second application program of the user terminal, if there is a registered second application program of the user terminal, the first application program and the second application program are service-bound through the message service of the first application program and the message service of the second application program, if the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled up through the message service of the other application program of the service binding, so that the pulled-up application program and the server re-establish a push channel, and the push channel is used for the server to push information to the pulled-up application program. That is, in the embodiment of the present application, the message service is used to bind the application programs, the activity rate of the message service of the application program is improved, the message reach rate is improved through the pulling-up of the active application program, and the receiving of the push task is pulled up in time, so that the user terminal cannot receive the push message because the message service of the application program is destroyed. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is a flowchart of a message push method provided by the embodiment of the present application;
[0045] Figure 2 is another flowchart of a message push method provided by the embodiment of the present application;
[0046] Figure 3 is still another flowchart of a message push method provided by the embodiment of the present application;
[0047] Figure 4 is a structural diagram of a message push device provided by the embodiment of the present application;
[0048] Figure 5 is another structural diagram of a message push device provided by the embodiment of the present application;
[0049] Figure 6 is a structural diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0050] The present application will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, in order to facilitate the description, only the parts related to the present application are shown in the drawings, but not all the structures.
[0051] Figure 1This is a flowchart illustrating a message push method provided in an embodiment of the present invention. This method can be executed by a message push device provided in this embodiment, which can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a server. The following embodiments will illustrate this using the integration of the device into an electronic device as an example. Figure 1 The method may specifically include the following steps:
[0052] Step 110: The first application on the user's end queries the server to see if there is a registered second application on the user's end;
[0053] For example, a client can be understood as a program that provides local services to a user, installed on a regular user's device, and needs to work in conjunction with a server. This device can be a personal computer, laptop, smartphone, tablet, portable wearable device, server, or a server cluster. The first application on the client can be understood as a computer program installed on the client to perform a specific function or multiple specific tasks. It runs in user mode, can interact with the user, and has a visual user interface. The first application registers its identity on the server, establishing a push channel with the server. This push channel can be the TCP (Transmission Control Protocol) for data transmission and sharing between the first application and the server. The server can be understood as providing computing and application services to the client, establishing a push channel with the application through identity verification, enabling the application to receive push messages. This server may include a Software Development Kit (SDK) for application identity registration. The registered second application can be understood as a computer program installed on the same client as the first application and already registered on the server. It can perform a specific function or multiple specific tasks, run in user mode, interact with the user, and has a visual user interface.
[0054] In a specific implementation, the first application program of the user end completes identity registration on the server through a software development kit (SDK) and establishes a push channel between the first application program and the server. The first application program queries whether the registered second application program exists on the server through a heartbeat message, determines the target application program that needs to be bound with the first application program, so as to make the first application program and the second application program registered on the server on the same user end perform service binding. The first application program takes the second application program as the specified pull-to-activate application program through service binding with the second application program, and the second application program can be one application program or multiple application programs; when the second application program is multiple application programs, the first application program performs one-to-one service binding with the multiple application programs, and the multiple application programs can be set in a priority order according to the process usage rate or process survival rate of the user using the multiple application programs for pull-to-activation.
[0055] In step 120, if the registered second application program of the user end exists, the first application program and the second application program are bound in service through the message service of the first application program and the message service of the second application program.
[0056] For example, the message service of the first application program can be understood as a service of communication and data exchange between the first application program and other application programs, receives data and notification messages transmitted by other application programs, and sends data and notification messages to other application programs. The message service of the second application program can be understood as a service of communication and data exchange between the second application program and other application programs, receives data and notification messages transmitted by other application programs, and sends data and notification messages to other application programs. The message service of the first application program and the message service of the second application program depend on the message transmission system of the user end and are closely integrated into the message service platform of the user end.
[0057] In a specific implementation, the first application program queries whether the registered second application program exists on the server through a heartbeat message. If the registered second application program of the user end exists, it indicates that other application programs on the user end have registered on the server and established a push channel, and can be bound in service with the first application program. If the registered second application program of the user end does not exist, it indicates that other application programs on the user end have not registered on the server to establish a push channel, and cannot complete the purpose of pull-to-activate the first application program through the second application program.
[0058] If the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive by the message service of another application program bound by the service, so that the pulled-alive application program re-establishes a push channel with the server, and the push channel is used for the server to push information to the pulled-alive application program.
[0059] For example, the service-bound application programs can be understood as all application programs that form a binding relationship with the first application program two by two, including the first application program, such as: one application program in the second application program forms a binding relationship with the first application program, and the process of the destroyed application program can be one application program in the second application program or the first application program. The push channel can be understood as a channel or protocol for transmitting messages or data between the server and the application program, and can transmit messages and data in a preset format or in accordance with a protocol. The process of the application program can be understood as all running activities of the application program in the computer, and the process of the application program is destroyed, that is, all running activities of the application program are stopped, that is, there is no process of the application program in the running process of the user end, and the application program is in an inactive state of exiting the background running or stopping the background running.
[0060] In a specific implementation, the first application program and the second application program form a binding relationship two by two, and when the process of any one application program with a binding relationship is destroyed, the application program on the user end cannot receive the messages and data pushed by the server through the push channel, and another application program bound with the application program receives the notification that the application program is destroyed through the message service, and the binding information of the other application program is obtained by unbinding. According to the unbinding information, it is determined that the application program is destroyed. After determining that the application program is destroyed, the process of the destroyed application program is pulled alive by the message service of another application program, so that the pulled-alive application program re-establishes a push channel with the server, and the push channel is used for the server to push information to the pulled-alive application program. Among them, two application programs bound by the service are pulled alive by one killed and the other killed, so that the survival rate of the two application programs bound by the service on the user end is increased, and even the process can be resident. Through the pulled-alive application program on the user end, the push channel between the application program and the server is re-established according to the message push service of the user end, and it can be seen that the process is destroyed. The application program on the user end is destroyed or exits the background running, so that the push channel between the application program and the server is interrupted.
[0061] In the embodiment of the present application, the first application program of the user terminal queries the server whether there is a registered second application program of the user terminal, if there is a registered second application program of the user terminal, the first application program and the second application program are service-bound through the message service of the first application program and the message service of the second application program, if the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of the other application program of the service binding, so that the pulled-alive application program re-establishes a push channel with the server, and the push channel is used for the server to push information to the pulled-alive application program. That is, in the embodiment of the present application, the message service is used to bind the application programs, the activity rate of the message service of the application program is improved, the message reach rate is improved through the pulled-alive application program, and the receiving push task is pulled alive in time, so that the user terminal cannot receive the push message because the message service of the application program is destroyed.
[0062] The message push method provided by the embodiment of the present application is further described below, as shown in the following table, the method can specifically include the following steps: Figure 2
[0063] Step 210, the first application program of the user terminal queries the server whether there is a registered second application program of the user terminal.
[0064] Step 220, if there is a registered second application program of the user terminal, the first application program and the second application program are service-bound through the message service of the first application program and the message service of the second application program.
[0065] Step 230, if the process of any one of the service-bound application programs is destroyed, the destroyed application program is service-unbound through the message service of the other application program of the service binding, and the process of the destroyed application program is pulled alive through the message service of the other application program after a preset time interval, and the pulled-alive application program is service-bound.
[0066] For example, the process of any one of the service-bound application programs being destroyed can be understood as that the process of one application program in the service binding formed by the two application programs is destroyed, and the process of the other application program is not destroyed. The preset time can be understood as the time when the destroyed application program is completely destroyed, different application programs can set different times, or a fixed preset time can be set according to the completely destroyed time of most application programs.
[0067] In the specific implementation, the process of any one of the application programs in the service binding can be understood as the process of one of the application programs in the service binding formed by the two application programs being destroyed, and the process of the other application program is not destroyed. The other application program obtains the process destruction notification through the message service, and the other application program is unbound from the service binding of the application program whose process is destroyed according to the process destruction notification. It is determined that the destroyed application program is destroyed, and the interval preset time is needed to avoid the case that the destroyed application program has residual information and then reactivates. When the other application program activates the destroyed application program after the interval preset time, the destroyed application program is activated in time to avoid the destroyed application program, which ensures the survival rate of the application programs forming the service binding relationship to a certain extent, so that the activated application program reestablishes the push channel with the server. The push channel is used for the server to push information to the activated application program.
[0068] Further, the method further comprises:
[0069] The third application program of the user end receives the activation instruction sent by the server; wherein the activation instruction is sent by the server when it is determined that the push channel with the first application program does not exist when the server needs to push information to the first application program; and the third application program is any application program of the user end in an active state;
[0070] The third application program of the user end activates the first application program according to the activation instruction, so that the first application program reestablishes the push channel with the server for the server to push information to the first application program.
[0071] For example, the third application program can be understood as an application program in an active state on the user end, which can be multiple application programs on the user end, or one application program on the user end. When the third application program is multiple application programs on the user end, the multiple application programs can be sorted according to the task amount of the multiple application programs, and the application program with the least task amount is determined to activate the first application program according to the activation instruction. The activation instruction can be understood as an instruction sent by the server through the push channel of the third application program, which is used to instruct the third application program to activate the first application program.
[0072] In a specific implementation, when the server pushes a message to the first application, it needs to determine whether the push channel between the server and the first application exists. If the push channel between the server and the first application exists, the server pushes the message to the first application through the push channel of the first application. If the push channel between the server and the first application does not exist, the first application on the user side can be destroyed, and the third application on the user side needs to be used to send a keep-alive instruction to the third application to instruct the third application to keep the first application alive, and send a channel establishment request of the first application to the server through the push channel of the third application, reestablish the push channel between the first application and the server, and push information to the first application through the reestablished push channel.
[0073] Further, the service binding of the first application and the second application through the message service of the first application and the message service of the second application comprises:
[0074] binding the first message service of the first application and the second message service of the second application, forming a first communication connection from the first application to the second application, so that the first application obtains the destroyed notification of the second application through the first communication connection, and keeps the second application alive according to the destroyed notification of the second application;
[0075] binding the third message service of the first application and the fourth message service of the second application, forming a second communication connection from the second application to the first application, so that the second application obtains the destroyed notification of the first application through the second communication connection, and keeps the first application alive according to the destroyed notification of the first application.
[0076] The first message service of the first application can be understood as a designated service channel in the message channel of the first application that receives a message sent by the message channel of the second application, is used to form a binding relationship with the second message service of the second application, so as to obtain the destroyed notification of the second application through the designated service channel when the second application is destroyed, and can pull the second application according to the destroyed notification of the second application; that is, it is equivalent to forming a pull-up program of the second application on the first application through the service binding journey. The second message service of the second application can be understood as a designated channel of the message service channel of the second application that sends a message to the first application, is used to form a service binding relationship with the first message service of the first application, and sends the destroyed notification of the second application to the first application when the second application is destroyed. The first communication connection can be understood as a connection relationship of receiving and sending messages between the first application and the second application formed after the service binding relationship is established through the first message service of the first application and the second message service of the second application. The third message service of the first application can be understood as a designated channel of the message channel of the first application that sends a message to the second application, is used to form a service binding relationship with the fourth message service of the second application, and sends the destroyed notification of the first application to the second application when the first application is destroyed. The fourth message service of the second application can be understood as a designated service channel in the message channel of the second application that receives a message sent by the message channel of the first application, is used to form a binding relationship with the third message service of the first application, so as to obtain the destroyed notification of the first application through the designated service channel when the first application is destroyed, and can pull the first application according to the information used by the binding relationship. The second communication connection can be understood as a connection relationship of receiving and sending messages between the second application and the first application formed after the service binding relationship is established through the third message service of the first application and the fourth message service of the second application. The destroyed notification of the first application can be understood as a message that notifies other applications that the first application is destroyed; the destroyed notification of the second application can be understood as a message that notifies other applications that the first application is destroyed, and is used to determine the pull-up object according to the destroyed notification.
[0077] In a specific implementation, the first message service of the first application program is bound with the second message service of the second application program to form a first communication connection from the first application program to the second application program, and the first application program receives the destroyed notification of the second application program, and when the second application program is destroyed, the destroyed notification of the second application program is sent to the first application program, so that the first application program determines the live object according to the destroyed notification of the second application program and live the second application program. The third message service of the first application program is bound with the fourth message service of the second application program to form a second communication connection from the second application program to the first application program, and the second application program receives the destroyed notification of the first application program, and when the first application program is destroyed, the destroyed notification of the first application program is sent to the second application program, so that the second application program determines the live object according to the destroyed notification of the first application program and live the first application program. The application program receiving the destroyed notification determines the live object according to the destroyed notification and performs the fast live processing after being destroyed, which guarantees the survival rate of the application programs in the service binding relationship to a certain extent.
[0078] In the embodiment of the application, the first application program of the user terminal queries the server whether there is a registered second application program of the user terminal, if there is a registered second application program of the user terminal, the first application program and the second application program are bound through the message service of the first application program and the message service of the second application program, if the process of any one of the bound application programs is destroyed, the process of the destroyed application program is live through the message service of the other bound application program, so that the live application program re-establishes a push channel with the server, and the push channel is used for the server to push information to the live application program. That is, in the embodiment of the application, the message service is used to bind the application programs, the activity rate of the message service of the application program is improved, the message reach rate is improved through the live application program, and the receiving push task is live in time, so that the push message cannot be sent to the user terminal because the message service of the application program is destroyed.
[0079] Figure 3 Another flowchart of a message push method is provided in the embodiment of the application, the method can be executed by the message push device provided in the embodiment of the application, and the device can be realized in the form of software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, and the electronic device can be a server. The following embodiment will be described by taking the device integrated in the electronic device as an example. Referring to Figure 3 The method can specifically include the following steps:
[0080] Step 310, receiving a query request sent by a first application of the user terminal, and determining whether there is a registered second application of the user terminal according to the query request;
[0081] For example, the first application of the user terminal can be understood as a computer program installed on the user terminal to complete a certain function or a plurality of specific tasks, running in user mode, which can interact with the user and has a visual user interface. Among them, the application that can send a query request to the server is registered for identity on the server and establishes a push channel with the server. The push channel can be a communication transmission control protocol TCP between the first application and the server to realize data transmission and data sharing. The server can be understood as a user terminal providing computing and application services, which can establish a push channel with the application through identity, so that the application has the ability to receive push messages. The server can include a software development kit for completing the identity registration of the application. The query request can be understood as a request for the user terminal to determine whether other applications on the user terminal have been registered by querying the registered information on the server when the registered application is bound to the service. The registered second application can be understood as an application on the user terminal registered on the server in addition to the first application.
[0082] In a specific implementation, the server receives a query request sent by a first application of the user terminal, and determines whether there is a registered second application of the user terminal according to the user terminal identifier in the query request. In essence, it is determined whether there is an application with the user identifier in addition to the first application in the registered information on the server. If there is an application with the user identifier in addition to the first application in the registered information on the server, it means that the other application on the user terminal is registered on the server and can be bound to the service with the first application.
[0083] Step 320, if there is a registered second application of the user terminal, sending the registration information of the second application to the first application to enable the first application to bind the second application through a message service;
[0084] For example, the registration information of the second application can be understood as the identity information of the registration of the second application on the server, and the first application can determine the binding of the second application on the user terminal according to the registration information of the second application. The message service of the first application can be understood as a service of communication and data exchange between other applications, which receives data and notification messages transmitted by other applications and sends data and notification messages to other applications.
[0085] In a specific implementation, if the registered second application of the user terminal exists, the registration information of the second application is sent to the first application, and the first application searches for the message service of the registered second application on the user terminal according to the registration information of the second application sent by the server. The first application and the second application are service-bound according to the message service of the first application and the message service of the second application. The first application and the second application having the binding relationship can pull the destroyed application according to the message service of the corresponding application in the binding relationship when any one of the applications is destroyed.
[0086] In step 330, a channel establishment request sent by any one of the service-bound applications is received, a push channel with any one of the applications is established according to the channel establishment request, and information is pushed to any one of the applications through the push channel.
[0087] For example, the channel establishment request can be understood as a request sent by the application having the binding relationship with the destroyed application among the service-bound applications on the user terminal to the server, that is, the application implementing the pull operation, for establishing a push channel between the destroyed application on the user terminal and the server, so as to realize the message transmission between the server and the destroyed application.
[0088] In a specific implementation, the first application and the second application having the binding relationship can pull the destroyed application according to the message service of the corresponding application in the binding relationship when any one of the applications is destroyed. Although the destroyed application is pulled, the push channel between the destroyed application and the server is not restored, and the channel establishment request for establishing the push channel between the destroyed application and the server needs to be sent to the server by the application corresponding to the binding relationship, and information is pushed to the destroyed application through the push channel.
[0089] Further, the method further includes:
[0090] When the information is pushed to the first application, it is determined whether the push channel with the first application exists;
[0091] When the push channel with the first application does not exist, a pull instruction is sent to the third application, so that the third application pulls the first application according to the pull instruction, and the first application and the server reestablish a push channel;
[0092] The information is pushed to the first application through the reestablished push channel.
[0093] For example, the third application can be understood as an application in an active state on the user terminal, can be multiple applications on the user terminal, or can be one application on the user terminal. When the third application is multiple applications on the user terminal, the multiple applications can be sorted according to the task amount of the multiple applications, and the application with the least task amount is determined to pull the first application according to the pull instruction. The pull instruction can be understood as an instruction sent by the server through the push channel of the third application, used to instruct the third application to pull the first application.
[0094] In a specific implementation, when the server pushes a message to the first application, it needs to determine whether the push channel between the server and the first application exists. If the push channel between the server and the first application exists, the server pushes the message to the first application through the push channel of the first application. If the push channel between the server and the first application does not exist, the first application may be destroyed on the user terminal, and the third application on the user terminal needs to be used to send a pull instruction to the third application to instruct the third application to pull the first application, and send a channel establishment request of the first application to the server through the push channel of the third application to reestablish the push channel between the first application and the server, and push information to the first application through the reestablished push channel.
[0095] Further, sending the pull instruction to the third application comprises:
[0096] Determining an application in an active state of the user terminal as the third application, and sending a pull instruction to the third application.
[0097] In a specific implementation, the server needs to determine an application in an active state on the user terminal as the third application, and send a pull instruction to the third application to instruct the third application to pull the first application, because only an application in an active state can use its own message service to pull other applications.
[0098] Further, determining an application in an active state of the user terminal as the third application comprises:
[0099] According to the heartbeat messages received within a preset time period and the identifier of the user terminal, determining an application in an active state of the user terminal as the third application.
[0100] For example, the heartbeat message can be understood as a message periodically sent by an application group as a sending source, wherein the application periodically sends a message to the server, and the message can include the running state of the application, the running state of the push channel established between the application and the server, etc. When the server does not receive the heartbeat message within any message receiving period, the application may have exited or the push channel may have been destroyed. The preset time period can be understood as a periodic period of the heartbeat message set according to the needs of the application or the server. The identifier of the user end can be understood as a symbol or mark used by the application to distinguish different user ends. The identifier of the user end can be the identifier of the user end corresponding to the application obtained by the server through the establishment of the push channel between the user end and the application when the application establishes the push channel with the server for the first time. The server stores the application and the identifier of the user end in correspondence and classifies to obtain the application set on the user end.
[0101] In a specific implementation, the server determines the application that has not been destroyed or exited from background running according to the running state of the application in the heartbeat message sent by the application within the preset time period, and determines the application with a perfect push channel between the application and the server according to the running state of the push channel sent by the application. The application that has not been destroyed or exited from background running and the application with a perfect push channel are determined as the third application according to the identifier of the user end.
[0102] Further, before receiving the first application query request of the user end, the method further includes:
[0103] According to the registration request of the first application, the first application is registered, and a push channel between the server and the first application is established, so that the first application receives the push message sent by the server.
[0104] For example, the registration request of the first application can be understood as a request sent by an application without a push channel to the server before establishing a push channel, for requesting the registration of the application before establishing a push channel with the server. Only the application that is registered by the server can establish a push channel with the server. The registration message includes the identity information of the application and the identifier of the user end corresponding to the application, and the identity information of the application can ensure the security and reliability of the application. The push message can be understood as a message sent by the product side and the platform side of the application to the user end through the server. The user receives the message through the application, so that the message can be spread.
[0105] In the implementation, the server receives a registration request of the first application program sent by the first application program, and after determining the security and reliability of the first application program according to the registration request of the first application program, the server registers the first application program according to the registration request of the first application program. A push channel is established between the registered first application program and the server, so that the first application program receives the push message sent by the server.
[0106] In the embodiment of the application, a query request sent by a first application program of a user terminal is received, and it is determined whether there is a registered second application program of the user terminal according to the query request. If there is a registered second application program of the user terminal, registration information of the second application program is sent to the first application program, so that the first application program binds the second application program through a message service. A channel establishment request sent by any one of the service-bound application programs is received, a push channel with any one of the application programs is established according to the channel establishment request, and information is pushed to any one of the application programs through the push channel. That is, in the embodiment of the application, the message service is used to bind the application programs, the activity rate of the message service of the application programs is improved, the message reach rate is improved through the active application program, and the user terminal is pulled to be active in real time only when the push task is received, so that the push message cannot be sent to the user terminal because the message service of the application program is destroyed.
[0107] Figure 4 is a structural schematic diagram of a message push device provided by the embodiment of the application, as shown in Figure 4 The message push device comprises:
[0108] The registration query module 410 is configured to query, by a first application program of a user terminal, whether there is a registered second application program of the user terminal.
[0109] The application program binding module 420 is configured to, if there is a registered second application program of the user terminal, bind the first application program and the second application program through the message service of the first application program and the message service of the second application program.
[0110] The application program pulling module 430 is configured to, if the process of any one of the service-bound application programs is destroyed, pull the process of the destroyed application program through the message service of another application program that is service-bound, so that the pulled application program re-establishes a push channel with the server, and the push channel is used for information push of the server to the pulled application program.
[0111] In an embodiment, the device further comprises:
[0112] The third application program of the user terminal receives the pull-to-wake instruction sent by the server; wherein, the pull-to-wake instruction is sent by the server when it is determined that the push channel with the first application program does not exist when the server pushes information to the first application program; the third application program is any application program of the user terminal in an active state;
[0113] The third application program of the user terminal pulls to wake the first application program according to the pull-to-wake instruction, so that the first application program re-establishes a push channel with the server for the server to push information to the first application program.
[0114] In an embodiment, the program binding module 420 binds the first application program and the second application program through the message service of the first application program and the message service of the second application program, including:
[0115] binding the first message service of the first application program and the second message service of the second application program to form a first communication connection from the first application program to the second application program, so that the first application program obtains the destroyed notification of the second application program through the first communication connection, and pulls to wake the second application program according to the destroyed notification of the second application program;
[0116] binding the third message service of the first application program and the fourth message service of the second application program to form a second communication connection from the second application program to the first application program, so that the second application program obtains the destroyed notification of the first application program through the second communication connection, and pulls to wake the first application program according to the destroyed notification of the first application program.
[0117] In an embodiment, the program pull-to-wake module 430 pulls to wake the process of the destroyed application program through the message service of another application program that is service-bound if the process of any one of the application programs that are service-bound is destroyed, including:
[0118] If the process of any one of the application programs that are service-bound is destroyed, the program pull-to-wake module 430 service-unbinds the destroyed application program through the message service of another application program that is service-bound, and after a preset time interval, the message service of the other application program re-pulls to wake the process of the destroyed application program and service-binds with the pulled-to-wake application program.
[0119] In the device embodiment of the present application, the first application program of the user terminal queries the server whether there is a registered second application program of the user terminal, if there is a registered second application program of the user terminal, the first application program and the second application program are service-bound through the message service of the first application program and the message service of the second application program, if the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of the other application program of the service binding, so that the pulled-alive application program and the server re-establish a push channel, and the push channel is used for the server to push information to the pulled-alive application program. That is, in the embodiment of the present application, the message service is used to bind the application programs, the activity rate of the message service of the application program is improved, the message reach rate is improved through the pulled-alive application program, and the receiving push task is pulled alive in time, so that the user terminal cannot receive the push message due to the destruction of the message service of the application program.
[0120] Figure 5 Figure 1 is a structural schematic diagram of a message push device provided by an embodiment of the present application, as shown in the figure, the message push device comprises: Figure 5
[0121] The request receiving module 510 is configured to receive a query request sent by a first application program of a user terminal, and determine whether there is a registered second application program of the user terminal according to the query request.
[0122] The information sending module 520 is configured to send registration information of the second application program to the first application program if there is a registered second application program of the user terminal, so that the first application program service-binds the second application program through the message service.
[0123] The channel establishing module 530 is configured to receive a channel establishing request sent by any one of the service-bound application programs, establish a push channel with the any one application program according to the channel establishing request, and push information to the any one application program through the push channel.
[0124] In an embodiment, the device further comprises:
[0125] The channel determining module is configured to determine whether the push channel with the first application program exists when pushing information to the first application program.
[0126] The instruction pull module is configured to send a pull instruction to a third application when a push channel with the first application does not exist, so that the third application pulls the first application according to the pull instruction, and the first application re-establishes a push channel with the server.
[0127] The re-establishment module is configured to push information to the first application through the re-established push channel.
[0128] In an embodiment, the instruction pull module sends a pull instruction to a third application, including:
[0129] The third application is determined as an active application of the user terminal, and the pull instruction is sent to the third application.
[0130] In an embodiment, the instruction pull module determines the third application as an active application of the user terminal, including:
[0131] According to the heartbeat messages received within a preset time period and the identifier of the user terminal, the third application is determined as an active application of the user terminal.
[0132] In an embodiment, the request receiving module 510 receives a first application query request of a user terminal, and further includes:
[0133] The first application is registered according to the registration request of the first application, and a push channel between the server and the first application is established, so that the first application receives the push message sent by the server.
[0134] In an embodiment of the device of the application, a query request sent by a first application of a user terminal is received, and it is determined whether there is a registered second application of the user terminal according to the query request; if there is a registered second application of the user terminal, the registration information of the second application is sent to the first application, so that the first application performs service binding on the second application through a message service; a channel establishment request sent by any one of the service-bound applications is received, a push channel with any one of the applications is established according to the channel establishment request, and information is pushed to any one of the applications through the push channel. That is, in an embodiment of the application, the message service is used to bind the applications, so that the activity rate of the message service of the applications is improved, the message reach rate is improved through the pull mode of the active applications, and the instant pull mode of the received push task avoids the situation that the push message cannot be delivered due to the cache of the user terminal.
[0135] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 6 A block diagram is shown of an exemplary electronic device 12 suitable for implementing embodiments of the present invention. Figure 6 The electronic device 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0136] like Figure 6 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 that pushes different system components (including system memory 28 and processing units 16).
[0137] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0138] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0139] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (not shown in Figure C, commonly referred to as a "hard disk drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0140] Program / utility 40 having a set of programs / modules 42 can be stored in system memory 28 and implemented by way of program modules 42, which include but are not limited to: operating system 44, one or more applications programs, other program modules 46, and program data 48. Each of the operating system 44, the one or more applications programs, the other program modules 46, and the program data 48 are, or can be, stored in system memory 28, or any suitable variant thereof. Generally, program modules 42 include routines, programs, components, or tools that perform particular tasks or implement particular abstract data types.
[0141] Electronic device 12 can also communicate with one or more external devices 14 such as a keyboard or pointing device, a display 24, etc.; one or more devices that enable a user to interact with electronic device 12; and / or one or more devices that enable electronic device 12 to communicate with one or more other computing devices. Such communication can occur via input / output (I / O) interface(s) 22. Still yet, electronic device 12 can communicate with one or more networks, such as one or more local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet, via network adapter 20. As depicted, network adapter 20 is in communication with the other components of electronic device 12 through bus 18. It should be appreciated that other hardware and / or software modules can be used in conjunction with electronic device 12. For example, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. can be used with electronic device 12.
[0142] Processing unit 16 executes various functions and processes, such as implementing the message pushing method provided by the embodiments of the present application, by running programs stored in system memory 28.
[0143] The first application program of the user end queries the server whether there is a registered second application program of the user end;
[0144] If there is a registered second application program of the user end, the first application program and the second application program are service-bound through the message service of the first application program and the message service of the second application program;
[0145] If the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of another application program that is service-bound, so that the pulled-alive application program re-establishes a pushing channel with the server, and the pushing channel is a pushing channel for the server to push information to the pulled-alive application program;
[0146] Or, receiving a query request sent by a first application program of a user terminal, and determining whether there is a registered second application program of the user terminal according to the query request;
[0147] If there is the registered second application program of the user terminal, sending registration information of the second application program to the first application program, so that the first application program performs service binding on the second application program through a message service;
[0148] Receiving a channel establishment request sent by any one of the application programs performing service binding, establishing a push channel with the any one of the application programs according to the channel establishment request, and pushing information to the any one of the application programs through the push channel.
[0149] The embodiment of the application further provides a computer readable storage medium, which has a computer program stored thereon, and the program is executed by a processor to realize the message pushing method provided by the embodiment of the application, and the method comprises the following steps:
[0150] A first application program of a user terminal queries a server whether there is a registered second application program of the user terminal;
[0151] If there is the registered second application program of the user terminal, performing service binding on the first application program and the second application program through a message service of the first application program and a message service of the second application program;
[0152] If a process of any one of the application programs performing service binding is destroyed, pulling the process of the destroyed application program alive through a message service of another application program performing service binding, so that the pulled alive application program re-establishes a push channel with the server, and the push channel is used for information pushing of the server to the pulled alive application program;
[0153] Or, receiving a query request sent by a first application program of a user terminal, and determining whether there is a registered second application program of the user terminal according to the query request;
[0154] If there is the registered second application program of the user terminal, sending registration information of the second application program to the first application program, so that the first application program performs service binding on the second application program through a message service;
[0155] Receiving a channel establishment request sent by any one of the application programs performing service binding, establishing a push channel with the any one of the application programs according to the channel establishment request, and pushing information to the any one of the application programs through the push channel.
[0156] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0157] The computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which computer-readable program code is embodied. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium that is not a storage medium, that is, that is not a tangible medium, and that can communicate, propagate or transport programming for use by or in connection with an instruction execution system, apparatus, or device.
[0158] The program code embodied on the computer-readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above.
[0159] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments of the present application, electronic mail (email) can be utilized as the
[0160] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A message pushing method, characterized by, The method comprises: A first application program of a user terminal queries a server whether there is a registered second application program of the user terminal; wherein, when there are multiple registered second application programs, the first application program is one-to-one service-bound with multiple application programs, and multiple application programs are prioritized according to process usage or process survival rate of the user using multiple application programs to pull alive; If there is a registered second application program of the user terminal, a first message service of the first application program is bound with a second message service of the second application program, a first communication connection of the first application program to the second application program is formed, so that the first application program obtains a destroyed notification of the second application program through the first communication connection, and the second application program is pulled alive according to the destroyed notification of the second application program; A third message service of the first application program is bound with a fourth message service of the second application program, a second communication connection of the second application program to the first application program is formed, so that the second application program obtains a destroyed notification of the first application program through the second communication connection, and the first application program is pulled alive according to the destroyed notification of the first application program; If the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of another application program in the service-bound application programs, so that the pulled-alive application program re-establishes a push channel with the server, and the push channel is a push channel for the server to push information to the pulled-alive application program.
2. The method of claim 1, wherein, The method further comprises: A third application program of the user terminal receives a pull-alive instruction sent by the server; wherein, the pull-alive instruction is sent by the server when it is determined that the push channel with the first application program does not exist when the server needs to push information to the first application program; and the third application program is any application program in an active state of the user terminal; The third application program of the user terminal pulls alive the first application program according to the pull-alive instruction, so that the first application program re-establishes a push channel with the server for the server to push information to the first application program.
3. The method of claim 1, wherein, The if the process of any one of the service-bound application programs is destroyed, the process of the destroyed application program is pulled alive through the message service of another application program in the service-bound application programs, comprises: If the process of any one of the service-bound application programs is destroyed, the destroyed application program is service-unbound through the message service of another application program in the service-bound application programs, and after a preset time interval, the process of the destroyed application program is pulled alive again through the message service of the another application program, and the pulled-alive application program is service-bound.
4. A message pushing method applied to a server, characterized in that, The method comprises: receiving a query request sent by a first application of a user terminal, and determining whether there is a registered second application of the user terminal according to the query request; when there are multiple registered second applications, the first application is one-to-one service-bound with multiple applications, and the multiple applications are set in priority order according to process usage or process survival rate of the user using the multiple applications, and are pulled alive; if there is a registered second application of the user terminal, sending registration information of the second application to the first application, so that the first application is service-bound with the second application through message service; receiving a channel establishment request sent by an application that has a binding relationship with a destroyed application among the service-bound applications, establishing a push channel with the destroyed application according to the channel establishment request, and pushing information to the destroyed application through the push channel; wherein the first application is service-bound with the second application through message service, comprising: binding a first message service of the first application with a second message service of the second application to form a first communication connection from the first application to the second application, so that the first application obtains a destroyed notification of the second application through the first communication connection, and pulls alive the second application according to the destroyed notification of the second application; binding a third message service of the first application with a fourth message service of the second application to form a second communication connection from the second application to the first application, so that the second application obtains a destroyed notification of the first application through the second communication connection, and pulls alive the first application according to the destroyed notification of the first application.
5. The method of claim 4, wherein, The method further comprises: when pushing information to the first application, determining whether a push channel with the first application exists; when the push channel with the first application does not exist, sending a pull-alive instruction to a third application, so that the third application pulls alive the first application according to the pull-alive instruction, and the first application re-establishes a push channel with the server; pushing information to the first application through the re-established push channel.
6. The method of claim 5, wherein, The sending of the pull-alive instruction to the third application comprises: determining an application of the user terminal in an active state as the third application, and sending a pull-alive instruction to the third application.
7. The method of claim 6, wherein, The determination of the active application of the user terminal as the third application comprises: determining an active application of the user terminal as the third application according to heartbeat messages received within a preset time period and an identifier of the user terminal.
8. The method of claim 4, wherein, Before the receiving of the query request of the first application of the user terminal, the method further comprises: Register the first application according to the registration request of the first application, and establish a push channel between the server and the first application, so that the first application receives the push message sent by the server.
9. A message pushing apparatus characterized by comprising: Comprise: The registration query module is used for the first application of the user end to query whether the registered second application of the user end exists in the server; wherein, when there are multiple registered second applications, the first application is one-to-one service binding with multiple applications, and the priority order of multiple applications is set according to the process usage or process survival rate of the user using multiple applications to pull the active; The program binding module is used for if the registered second application of the user end exists, the service binding of the first application and the second application is carried out through the message service of the first application and the message service of the second application; The program pull active module is used for if the process of any one of the service binding applications is destroyed, the process of the destroyed application is pulled active through the message service of another application of the service binding, so that the pulled active application reestablishes the push channel with the server, and the push channel is used for the information push of the server to the pulled active application; The program binding module carries out the service binding of the first application and the second application through the message service of the first application and the message service of the second application, comprising: The first message service of the first application is bound with the second message service of the second application, forming the first communication connection of the first application to the second application, so that the first application gets the destroyed notification of the second application through the first communication connection, and pulls the active second application according to the destroyed notification of the second application; The third message service of the first application is bound with the fourth message service of the second application, forming the second communication connection of the second application to the first application, so that the second application gets the destroyed notification of the first application through the second communication connection, and pulls the active first application according to the destroyed notification of the first application.
10. A message pushing apparatus characterized by comprising: Comprise: The request receiving module is used for receiving the query request sent by the first application of the user end, and determining whether the registered second application of the user end exists according to the query request; wherein, when there are multiple registered second applications, the first application is one-to-one service binding with multiple applications, and the priority order of multiple applications is set according to the process usage or process survival rate of the user using multiple applications to pull the active; The information sending module is used for if the registered second application of the user end exists, the registration information of the second application is sent to the first application, so that the first application carries out the service binding of the second application through the message service; The channel establishment module is configured to receive a channel establishment request sent by an application having a binding relationship with a destroyed application in an application of a service binding, establish a push channel with the destroyed application according to the channel establishment request, and push information to the destroyed application through the push channel. The first application is service-bound to the second application through a message service, and the method comprises the following steps: binding a first message service of the first application to a second message service of the second application to form a first communication connection from the first application to the second application, so that the first application obtains a destroyed notification of the second application through the first communication connection and pulls the second application alive according to the destroyed notification of the second application; binding a third message service of the first application to a fourth message service of the second application to form a second communication connection from the second application to the first application, so that the second application obtains a destroyed notification of the first application through the second communication connection and pulls the first application alive according to the destroyed notification of the first application.
11. An electronic device, comprising: The electronic device comprises: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the message pushing method according to any one of claims 1 to 3, or 4 to 8.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the message pushing method according to any one of claims 1 to 3, or 4 to 8.
Citation Information
Patent Citations
Application keep-alive method and device
CN106909446A
Process keep-alive method, device and system in cloud real machine and storage medium
CN112860408A
Message pushing method and device
CN113238808A