CN114238832A - Offline message pushing method and device - Google Patents

Offline message pushing method and device Download PDF

Info

Publication number
CN114238832A
CN114238832A CN202111555095.XA CN202111555095A CN114238832A CN 114238832 A CN114238832 A CN 114238832A CN 202111555095 A CN202111555095 A CN 202111555095A CN 114238832 A CN114238832 A CN 114238832A
Authority
CN
China
Prior art keywords
message
operating system
offline
offline message
pushing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111555095.XA
Other languages
Chinese (zh)
Inventor
刘帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xuanxian Technology Co ltd
Original Assignee
Shanghai Xuanxian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Xuanxian Technology Co ltd filed Critical Shanghai Xuanxian Technology Co ltd
Priority to CN202111555095.XA priority Critical patent/CN114238832A/en
Publication of CN114238832A publication Critical patent/CN114238832A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The embodiment of the invention provides an offline message pushing method and device, wherein the method comprises the following steps: acquiring an offline message to be pushed by a target application; determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message; and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so as to enable the offline message pushing server to push the encapsulated message to the target terminal. The method and the device realize that the offline message is received without establishing a long chain with an application server, and reduce the complexity of the offline message pushing service used by the application of a business party.

Description

Offline message pushing method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to an offline message pushing method and apparatus.
Background
The existing mobile app (Application) generally uses a long link technology to establish a long link with a server for receiving an offline message of an Application, however, different apps establish a plurality of long link channels, which consume too much memory, cpu, and network bandwidth, and a process resident in a background can make terminal equipment easily stuck and have high power consumption.
Disclosure of Invention
The embodiment of the invention aims to provide an offline message pushing method and device, so as to receive an offline message without establishing a long chain with an application server and reduce the complexity of using an offline message pushing service by a business side application.
In order to achieve the above object, an embodiment of the present application provides an offline message pushing method, where the method includes:
acquiring an offline message to be pushed by a target application;
determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message;
and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so as to enable the offline message pushing server to push the encapsulated message to the target terminal.
Optionally, after format-encapsulating the offline message to obtain an encapsulated message, the method further includes:
sending the encapsulated message to a message queue;
the step of calling the interface of the offline message pushing server corresponding to the operating system type of the destination terminal for encapsulating the message includes:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence;
and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
Optionally, the method further includes:
monitoring the backlog quantity of the encapsulated messages in the message queue;
and if the backlog quantity exceeds a preset threshold value, expanding the capacity and packaging the message pushing server.
Optionally, the operating system types include an ios operating system and an Android operating system;
the offline message pushing server corresponding to the ios operating system is an APNs pushing server;
and the offline message pushing server corresponding to the Android operating system is an FCM (file control message) pushing server.
In order to achieve the above object, an embodiment of the present application provides an offline message pushing apparatus, where the apparatus includes:
the acquisition module is used for acquiring the off-line message to be pushed by the target application;
the packaging module is used for determining the operating system type of a target terminal of each offline message and packaging the offline message in a format to obtain a packaged message based on a message template corresponding to the operating system type;
and the pushing module is used for calling an interface of an offline message pushing server corresponding to the operating system type of the destination terminal of the encapsulated message so as to enable the offline message pushing server to push the encapsulated message to the destination terminal.
Optionally, the method further includes:
the sending module is used for sending the packaged message to a message queue after the offline message is subjected to format packaging to obtain the packaged message;
the pushing module is specifically configured to:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence;
and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
Optionally, the method further includes:
the monitoring module is used for monitoring the backlog quantity of the packaged messages in the message queue;
and the capacity expansion module is used for expanding the capacity and packaging the message pushing server if the backlog quantity exceeds a preset threshold value.
Optionally, the operating system types include an ios operating system and an Android operating system;
the offline message pushing server corresponding to the ios operating system is an APNs pushing server;
and the offline message pushing server corresponding to the Android operating system is an FCM (file control message) pushing server.
The embodiment of the application also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any method step when executing the program stored in the memory.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above method steps.
The embodiment of the invention has the following beneficial effects:
the method and the device for pushing the offline message, provided by the embodiment of the invention, are used for acquiring the offline message to be pushed by the target application; determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message; and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so that the offline message pushing server pushes the encapsulated message to the target terminal.
Therefore, for the mobile terminal side, the target application in the mobile terminal does not need to establish long link with the application server by adopting a long link technology, and the off-line message can be pushed only by receiving the encapsulated message pushed by the off-line message pushing server. The situations of unsmooth mobile phone and high power consumption caused by excessive consumption of long-chain access to memory, CPU, network bandwidth and the like established by a plurality of target applications in the mobile terminal are reduced.
In addition, format encapsulation is performed on the offline message according to different operating system types so as to interface the offline message pushing servers corresponding to different operating system types, so that a uniform API (application programming interface) can be provided for the server side of the target application, the offline message can be pushed only by calling the uniform API for the server side of the target application, interface adaptation is not needed for different operating system types, and therefore the complexity of using the offline message pushing service by a business side application is reduced.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an offline message pushing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an offline message pushing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an offline message pushing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.
The existing mobile app generally uses a long link technology to establish a long link with a server for receiving an offline message of the application, however, different apps establish a plurality of long link channels, which consume too much memory, cpu and network bandwidth, and a process resident in a background can make terminal equipment easily stuck and have high power consumption.
In order to solve the foregoing technical problem, embodiments of the present application provide an offline message pushing method and apparatus.
Referring to fig. 1, fig. 1 is a schematic flowchart of an offline message pushing method provided in an embodiment of the present application, and as shown in fig. 1, the method may include the following steps:
s101: and acquiring the offline message to be pushed by the target application.
In the embodiment of the present application, an application is an application (app), such as instant messaging application software.
In order to facilitate the service-side application to implement the pushing of the offline message, an SDK (Software Development Kit) may be provided for the service-side application, and the SDK serves to provide the offline message pushing service for the service-side application.
The embodiment of the present application may be applied to a platform providing the above SDK, and for convenience of description, the platform is denoted as an offline message pushing platform.
The application accessing the SDK is the target application, and the number of target applications may be multiple.
The target Application may call an API (Application Programming Interface) of the SDK, and send the offline message to be pushed to the offline message pushing platform.
As an example, the target application includes application a, where user a sends a message to user b, but user b is in an offline state, and the message sent by user a is an offline message to be pushed. The application A can call the API interface, and then the offline message is pushed through the offline message pushing platform.
Since the target application is accessed to the offline message pushing platform, the offline message pushing platform can obtain information of the offline message to be pushed, the target user ID (Identity document) of the offline message, and the operating system type of the target terminal of the offline message.
S102: and determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message.
The destination terminal of the offline message is the terminal where the destination user ID of the offline message is logged in.
In this embodiment, the operating system type of the destination terminal may include: ios (apple) operating system and Android (Android) operating system.
For the two operating systems, there are corresponding offline message push services currently.
Wherein, the offline message push service of the ios operating system is an APNs push service. And the offline message push service of the Android operating system is FCM push service.
The offline message pushing platform provided by the embodiment of the application can be used for docking the APNs pushing server and the FCM pushing server and constructing corresponding data formats.
Specifically, for each offline message, the operating system type of the destination terminal of the offline message is determined.
And if the operating system type of the target terminal of the offline message is the ios operating system, format encapsulation is carried out on the offline message based on a message template corresponding to the ios operating system.
Wherein, the message template corresponding to the ios operating system is the APNs template, and the following is an example of the APNs template file:
Figure BDA0003418856470000061
the message template corresponding to the Android operating system is an FCM template, and the following is an example of an FCM template file:
Figure BDA0003418856470000071
s103: and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so that the offline message pushing server pushes the encapsulated message to the target terminal.
In the embodiment of the application, the offline message push server corresponding to the ios operating system is the APNs push server; and the offline message push server corresponding to the Android operating system is the FCM push server.
After the format of the offline message is encapsulated according to the message template corresponding to the type of the operating system, the corresponding offline message pushing server can be called, and the offline message pushing server finishes pushing the offline message.
Specifically, if the destination terminal is an ios operating system, the destination terminal is integrated with an APNs service and used for receiving an offline message pushed by an APNs push server; and if the destination terminal is an Android operating system, the destination terminal is integrated with the FCM service and used for receiving the offline message pushed by the FCM push server.
Therefore, in the embodiment of the application, the offline message to be pushed by the target application is obtained; determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message; and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so that the offline message pushing server pushes the encapsulated message to the target terminal.
Therefore, for the mobile terminal side, the target application in the mobile terminal does not need to establish long link with the application server by adopting a long link technology, and the off-line message can be pushed only by receiving the encapsulated message pushed by the off-line message pushing server. The situations of unsmooth mobile phone and high power consumption caused by excessive consumption of long-chain access to memory, CPU, network bandwidth and the like established by a plurality of target applications in the mobile terminal are reduced.
In addition, format encapsulation is performed on the offline message according to different operating system types so as to interface the offline message pushing servers corresponding to different operating system types, so that a uniform API (application programming interface) can be provided for the server side of the target application, the offline message can be pushed only by calling the uniform API for the server side of the target application, interface adaptation is not needed for different operating system types, and therefore the complexity of using the offline message pushing service by a business side application is reduced.
In an embodiment of the present application, after format-encapsulating the offline message to obtain an encapsulated message, the method may further include:
the encapsulated message is sent to a message queue.
Correspondingly, the step of calling an interface of the offline message push server corresponding to the operating system type of the destination terminal that encapsulates the message may include:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence; and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
The offline message pushing platform provided by the embodiment of the application can be connected with a plurality of target application servers, so that a large batch of offline messages of the plurality of application servers can be received in a short time, and in order to prevent system breakdown caused by excessive offline messages, the format-packaged messages can be sent to the message queue.
For example, the encapsulated message is sent to a kafka message queue or a redis message queue.
The message queue can buffer the encapsulated message to realize peak clipping to prevent the offline message pushing platform from being over stressed.
Therefore, in the process of pushing the messages, the messages to be forwarded are selected in batches from the message queue according to the arrival sequence of the messages; and for each message to be forwarded, calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal of the message to be forwarded, namely an APNs pushing server interface or an FCM pushing server interface, wherein the offline message pushing server can push the offline message to the target terminal.
Therefore, in the embodiment of the application, the offline messages are cached by adopting the message queue, the message backlog is reduced, and the offline messages are consumed in batches by adopting a production-consumption mode, so that the messages in batches can reliably reach the target terminal.
In an embodiment of the present application, the backlog number of packaged messages in the message queue may also be monitored; and if the backlog quantity exceeds a preset threshold value, expanding the capacity and packaging the message pushing server.
That is, if the backlog of the encapsulated messages in the message queue is serious, in order to prevent the messages from being consumed too late, the encapsulated message push servers in the offline message push platform can be expanded, that is, more encapsulated message push servers are deployed, so that the speed of pushing the encapsulated messages is increased, and the backlog of the encapsulated messages is relieved.
For ease of understanding, the offline message pushing method provided in the embodiment of the present application is further described below with reference to fig. 2. Fig. 2 is a schematic diagram of an offline message pushing method according to an embodiment of the present application.
Referring to fig. 2, an embodiment of the present application provides a platform specially used for pushing an offline message, where the platform may be connected to multiple target app servers, and the target app servers call API interfaces, so as to implement pushing of the offline message by using the offline message pushing platform provided in the embodiment of the present application.
In the offline message pushing platform, offline messages to be pushed of each target app server are obtained, format packaging is carried out on the offline messages according to the type of an operating system of a target terminal of the offline messages, packaged messages matched with an ios operating system and an Android operating system are obtained respectively and then stored in a message queue, and the process belongs to the process of generating the offline messages.
In the consumption process of the offline messages, the messages to be forwarded are selected in batches from the message queue, if the type of an operating system of a target terminal of the messages to be forwarded is an ios operating system, an interface of an APNs server is called, the APNs server realizes offline message pushing, and finally the offline messages are pushed to a target app of the ios operating system. And if the operating system type of the target terminal of the message to be forwarded is the Android operating system, calling an interface of the FCM server, realizing offline message pushing by the FCM server, and finally pushing the offline message to the target app of the Android operating system.
Therefore, for the mobile terminal side, the target application in the mobile terminal does not need to establish a long link with the application server by adopting a long link technology, and the off-line message can be pushed only by receiving the encapsulated message pushed by the off-line message pushing server. The situations of unsmooth mobile phone and high power consumption caused by excessive consumption of long-chain access to memory, CPU, network bandwidth and the like established by a plurality of target applications in the mobile terminal are reduced.
In addition, format encapsulation is performed on the offline message according to different operating system types so as to interface the offline message pushing servers corresponding to different operating system types, so that a uniform API (application programming interface) can be provided for the server side of the target application, the offline message can be pushed only by calling the uniform API for the server side of the target application, interface adaptation is not needed for different operating system types, and therefore the complexity of using the offline message pushing service by a business side application is reduced.
And the offline message is cached by adopting the message queue, the message backlog is reduced, the offline message is consumed in batches by adopting a production-consumption mode, the batch messages are ensured to reliably reach the target terminal, and the arrival rate of the offline message pushing is effectively improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an offline message pushing apparatus according to an embodiment of the present application, and as shown in fig. 3, the offline message pushing apparatus includes:
an obtaining module 301, configured to obtain an offline message to be pushed by a target application;
an encapsulation module 302, configured to determine, for each offline message, an operating system type of a destination terminal of the offline message, and perform format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message;
a pushing module 303, configured to invoke an interface of an offline message pushing server corresponding to the operating system type of the destination terminal that encapsulates the message, so that the offline message pushing server pushes the encapsulated message to the destination terminal.
In an embodiment of the present application, on the basis of the apparatus shown in fig. 3, the apparatus further includes:
the sending module is used for sending the packaged message to a message queue after the offline message is subjected to format packaging to obtain the packaged message;
the pushing module 303 may be specifically configured to:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence;
and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
In an embodiment of the present application, on the basis of the apparatus shown in fig. 3, the apparatus further includes:
the monitoring module is used for monitoring the backlog quantity of the packaged messages in the message queue;
and the capacity expansion module is used for expanding the capacity and packaging the message pushing server if the backlog quantity exceeds a preset threshold value.
In an embodiment of the application, the operating system types include an ios operating system and an Android operating system;
the offline message pushing server corresponding to the ios operating system is an APNs pushing server;
and the offline message pushing server corresponding to the Android operating system is an FCM (file control message) pushing server.
By applying the offline message pushing device provided by the embodiment of the invention, the offline message to be pushed by the target application is obtained; determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message; and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so that the offline message pushing server pushes the encapsulated message to the target terminal.
Therefore, for the mobile terminal side, the target application in the mobile terminal does not need to establish long link with the application server by adopting a long link technology, and the off-line message can be pushed only by receiving the encapsulated message pushed by the off-line message pushing server. The situations of unsmooth mobile phone and high power consumption caused by excessive consumption of long-chain access to memory, CPU, network bandwidth and the like established by a plurality of target applications in the mobile terminal are reduced.
In addition, format encapsulation is performed on the offline message according to different operating system types so as to interface the offline message pushing servers corresponding to different operating system types, so that a uniform API (application programming interface) can be provided for the server side of the target application, the offline message can be pushed only by calling the uniform API for the server side of the target application, interface adaptation is not needed for different operating system types, and therefore the complexity of using the offline message pushing service by a business side application is reduced.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
acquiring an offline message to be pushed by a target application;
determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message;
and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so as to enable the offline message pushing server to push the encapsulated message to the target terminal.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned offline message pushing methods.
In another embodiment, a computer program product containing instructions is provided, which when executed on a computer causes the computer to execute any of the above-mentioned offline message pushing methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the offline message pushing apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the embodiments of the offline message pushing method, the description is relatively simple, and relevant points can be referred to the partial description of the embodiments of the offline message pushing method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An offline message pushing method, the method comprising:
acquiring an offline message to be pushed by a target application;
determining the operating system type of a target terminal of each offline message, and performing format encapsulation on the offline message based on a message template corresponding to the operating system type to obtain an encapsulated message;
and calling an interface of an offline message pushing server corresponding to the operating system type of the target terminal for encapsulating the message so as to enable the offline message pushing server to push the encapsulated message to the target terminal.
2. The method of claim 1, wherein after format-encapsulating the offline message to obtain an encapsulated message, further comprising:
sending the encapsulated message to a message queue;
the step of calling the interface of the offline message pushing server corresponding to the operating system type of the destination terminal for encapsulating the message includes:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence;
and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
3. The method of claim 2, further comprising:
monitoring the backlog quantity of the encapsulated messages in the message queue;
and if the backlog quantity exceeds a preset threshold value, expanding the capacity and packaging the message pushing server.
4. The method of claim 1,
the operating system types comprise an ios operating system and an Android operating system;
the offline message pushing server corresponding to the ios operating system is an APNs pushing server;
and the offline message pushing server corresponding to the Android operating system is an FCM (file control message) pushing server.
5. An offline message pushing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the off-line message to be pushed by the target application;
the packaging module is used for determining the operating system type of a target terminal of each offline message and packaging the offline message in a format to obtain a packaged message based on a message template corresponding to the operating system type;
and the pushing module is used for calling an interface of an offline message pushing server corresponding to the operating system type of the destination terminal of the encapsulated message so as to enable the offline message pushing server to push the encapsulated message to the destination terminal.
6. The apparatus of claim 5, further comprising:
the sending module is used for sending the packaged message to a message queue after the offline message is subjected to format packaging to obtain the packaged message;
the pushing module is specifically configured to:
selecting messages to be forwarded in batch from the message queue according to the message arrival sequence;
and calling an interface of an offline message pushing server corresponding to the type of the operating system of the target terminal of the message to be forwarded aiming at each message to be forwarded.
7. The apparatus of claim 6, further comprising:
the monitoring module is used for monitoring the backlog quantity of the packaged messages in the message queue;
and the capacity expansion module is used for expanding the capacity and packaging the message pushing server if the backlog quantity exceeds a preset threshold value.
8. The apparatus of claim 5,
the operating system types comprise an ios operating system and an Android operating system;
the offline message pushing server corresponding to the ios operating system is an APNs pushing server;
and the offline message pushing server corresponding to the Android operating system is an FCM (file control message) pushing server.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202111555095.XA 2021-12-17 2021-12-17 Offline message pushing method and device Pending CN114238832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111555095.XA CN114238832A (en) 2021-12-17 2021-12-17 Offline message pushing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111555095.XA CN114238832A (en) 2021-12-17 2021-12-17 Offline message pushing method and device

Publications (1)

Publication Number Publication Date
CN114238832A true CN114238832A (en) 2022-03-25

Family

ID=80758588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111555095.XA Pending CN114238832A (en) 2021-12-17 2021-12-17 Offline message pushing method and device

Country Status (1)

Country Link
CN (1) CN114238832A (en)

Similar Documents

Publication Publication Date Title
CN108965400B (en) Information processing method, device, equipment and system
CN107172171B (en) Service request processing method and device and computer readable storage medium
CN111405635B (en) Method, device and equipment for realizing capability opening and computer readable storage medium
KR20130129384A (en) Method and system for recalling a voice mail
CN110958281A (en) Data transmission method and communication device based on Internet of things
CN112422497B (en) Message transmission method and device and computer equipment
CN114205762A (en) Short message flow control method, equipment and storage medium
US20150067066A1 (en) Provisioning Communication Services using Proxy Server in a Cloud
CN106713171B (en) Server, and current-limiting protection system and method based on delay queues
CN114268957A (en) Abnormal business data processing method, device, server and storage medium
CN110069217B (en) Data storage method and device
CN112134907A (en) Message processing method, device and equipment
CN112422485B (en) Communication method and device of transmission control protocol
CN114238832A (en) Offline message pushing method and device
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN112865927A (en) Message delivery verification method, device, computer equipment and storage medium
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
CN107580033B (en) Load information processing method and device, message processing method and device, and server
CN104796519A (en) Terminal
CN114048059A (en) Method and device for adjusting timeout time of interface, computer equipment and storage medium
US11025773B1 (en) Virtual communication service for mobile devices
WO2017186271A1 (en) Method and managing module for managing voice data generated by a call managing system
CN108243091B (en) Information sharing device and information sharing method
CN108351843B (en) Output control device and communication system
CN113766437B (en) Short message sending method and device

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