CN112420217B - Message pushing method, device, equipment and storage medium - Google Patents
Message pushing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112420217B CN112420217B CN202011377809.8A CN202011377809A CN112420217B CN 112420217 B CN112420217 B CN 112420217B CN 202011377809 A CN202011377809 A CN 202011377809A CN 112420217 B CN112420217 B CN 112420217B
- Authority
- CN
- China
- Prior art keywords
- message
- custom
- applet
- custom 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000003860 storage Methods 0.000 title claims abstract description 19
- 238000004891 communication Methods 0.000 claims abstract description 82
- 238000012544 monitoring process Methods 0.000 claims abstract description 15
- 230000004044 response Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 8
- 238000009877 rendering Methods 0.000 claims description 8
- 230000001960 triggered effect Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 4
- 238000012545 processing Methods 0.000 description 20
- 238000005516 engineering process Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 13
- 230000007246 mechanism Effects 0.000 description 11
- 239000008186 active pharmaceutical agent Substances 0.000 description 10
- 230000002093 peripheral effect Effects 0.000 description 10
- 230000001133 acceleration Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000011161 development Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009530 blood pressure measurement Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 238000012377 drug delivery Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H80/00—ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Medical Informatics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Pathology (AREA)
- Epidemiology (AREA)
- Biomedical Technology (AREA)
- Primary Health Care (AREA)
- Public Health (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a message pushing method, a device, equipment and a storage medium, which are applied to the field of message pushing of cloud communication. The method is applied to an applet, the applet is an application for providing a running environment by utilizing a host program, the applet runs with a message push SDK, and the method comprises the following steps: monitoring a first custom message from a message push path, wherein the message push path is a push path between the message push SDK and a cloud communication system, and a custom message template list corresponding to the applet is registered in the message push SDK; when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in the custom message template list; and calling the first custom message template to display the first custom message. The method and the device can achieve the effect of providing customized message pushing capability for different applets.
Description
Technical Field
The embodiment of the application relates to the field of message pushing (Push), in particular to a message pushing method, a device, equipment and a storage medium.
Background
The message push (push) service refers to a technical service in which a server directs a message to a mobile phone interface of a user in real time.
In the related art, there is a message pushing technology of banner messages, and an application program is installed on a mobile phone of a user. The server adopts an online message pushing service provided by a third party to push the message to the mobile phone of the user. The application invokes the operating system provided banner message notification mechanism to display the message with the banner message.
However, the message pushing technology can only be used for an APP type message pushing scene, and cannot be applied to an applet type message pushing scene. Because the applet is characterized by light weight and customization, and the host program (such as WeChat) has offline push capability in the form of template message, the workload of developing an independent message push mechanism specially for a single applet is too great, resulting in the general lack of message push capability for the applet.
Disclosure of Invention
The application provides a message pushing method, a device, equipment and a storage medium, which can provide customized message pushing capability for an applet. The technical scheme is as follows:
according to an aspect of the present application, there is provided a message pushing method applied to an applet, the applet being a program running in dependence on a host program, the applet having a message pushing software development kit (Software Development Kit, SDK) running therein, the method comprising:
Monitoring a first custom message of a message push path, wherein the message push path is a push path between the message push SDK and a cloud communication system, and a custom message template list corresponding to the applet is registered in the message push SDK;
when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in the custom message template list;
and calling the first custom message template to display the first custom message.
According to another aspect of the present application, there is provided a message pushing device, the device being applied to an applet, the applet being a program running in dependence on a host program, the applet having a message pushing SDK running therein, the method comprising:
the monitoring module is used for monitoring a first custom message of a message pushing channel, wherein the message pushing channel is a pushing channel between the message pushing SDK and the cloud communication system, and a custom message template list corresponding to the applet is registered in the message pushing SDK;
the determining module is used for determining a first custom message template corresponding to the first custom message in the custom message template list when the first custom message is monitored;
And the display module is used for calling the first custom message template to display the first custom message.
According to another aspect of the present application, there is provided a computer device comprising: a processor and a memory storing a computer program that is loaded and executed by the processor to implement the message pushing method as described above.
According to another aspect of the present application, there is provided a message pushing system, the system comprising: the cloud communication system comprises a first applet, a cloud communication system and a second applet, wherein a message pushing SDK is operated in the second applet, and a message pushing channel is established between the cloud communication system and the message pushing SDK;
the first applet is configured to send a first custom message through the cloud communication system, where the first custom message conforms to a first custom message template;
the cloud communication system is used for sending the first custom message to the second applet through a message pushing channel;
the second applet is used for monitoring a first custom message from the message pushing channel, and a custom message template list corresponding to the applet is registered in the message pushing SDK; when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in the custom message template list; and calling the first custom message template to display the first custom message.
According to another aspect of the present application, there is provided a computer readable storage medium storing a computer program loaded and executed by a processor to implement a message pushing method as described above.
According to another aspect of the present application, a computer program product is provided, the computer program product comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform the message pushing method described above.
The beneficial effects that technical scheme that this application embodiment provided include at least:
by utilizing the tolerance of cloud communication to the message format and adopting a combination mechanism of cloud communication and a custom message template, a user can customize the style of the push message according to the characteristics of the applet so as to be suitable for the characteristics of the current applet, and the custom message is analyzed and displayed by the message push SDK integrated in the applet, so that the effect of providing customized message push capability for different applets can be realized with smaller development workload.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a block diagram of a message pushing system provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a relationship diagram of a host program and an applet provided in another exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a message pushing method provided by another exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of a message pushing method provided by an exemplary embodiment of the present application;
FIG. 5 illustrates a flow chart of a message pushing method provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a message pushing method according to an exemplary embodiment of the present application;
FIG. 7 illustrates a flow chart of a message pushing method provided by an exemplary embodiment of the present application;
FIG. 8 is a schematic diagram of a message pushing method according to an exemplary embodiment of the present application;
FIG. 9 illustrates a block diagram of a message pushing system provided by an exemplary embodiment of the present application;
FIG. 10 illustrates a block diagram of a message pushing system provided by an exemplary embodiment of the present application;
fig. 11 to 15 are schematic interface diagrams illustrating a message pushing method according to an exemplary embodiment of the present application;
FIG. 16 illustrates a block diagram of a message pushing device provided in one exemplary embodiment of the present application;
FIG. 17 illustrates a block diagram of a computer device provided in an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud computing (Cloud computing) is a computing model that distributes computing tasks across a resource pool of large numbers of computers, enabling various application systems to acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed.
As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short, generally referred to as IaaS (Infrastructure as a Service, infrastructure as a service) platform) is established, in which multiple types of virtual resources are deployed for external clients to select for use.
According to the logic function division, a PaaS (Platform as a Service ) layer can be deployed on an IaaS (Infrastructure as a Service ) layer, and a SaaS (Software as a Service, software as a service) layer can be deployed above the PaaS layer, or the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc. Generally, saaS and PaaS are upper layers relative to IaaS.
The cloud communication platform is used for providing communication platform service (PaaS) and communication software service (SaaS) for enterprise clients in a cloud computing mode by depending on the Internet, so that the communication efficiency of the enterprise with the clients is improved. The application program interface (Application Programming Interface, API) interface and the SDK are packaged into the professional communication capability, so that the use threshold of enterprises and developers for communication services is greatly reduced, and more than 20 professional communication capabilities such as short messages/voice verification codes, voice calls, voice notices, call centers/intelligent interactive voice responses (Interactive Voice Response, IVR), voice talkbacks/conferences, video calls/conferences and the like can be easily accessed by an App, a Web end and an enterprise system, and the development and use efficiency is improved.
Cloud communication is a communication platform service based on cloud computing business model applications. And all communication platform software is concentrated in the cloud and compatible in intercommunication.
The embodiment realizes message pushing based on 'custom message based on cloud communication+message pushing SDK'. Based on the high tolerance of cloud communication to message types, all messages can be customized in a personalized mode by adopting custom message types, and the support of various message pushing scenes is realized through the analysis of message pushing SDKs on the custom messages. Especially, aiming at the situation that the application scenes of each applet are different and the requirements on message pushing capacity are different, the application scenes of a plurality of different applets can be adapted with smaller development quantity.
Fig. 1 shows a schematic diagram of a message pushing system 100 according to an exemplary embodiment of the present application. The message push system 100 includes: a first terminal 110, a cloud communication system 120, a push system 130, a second terminal 140.
The first terminal 110 runs a first client (or application), which is a client having instant messaging capability. The first client may be a common application program without host capability (such as a computer program pushing scene of a third party merchant), or a host program with host capability (such as a small program pushing scene common to doctor-patient furrows). A host program refers to an application program that can carry a running applet. In this application, a host program having a host capability is exemplified as the first client, and the host program has a first applet running therein.
Cloud communication system 120 is a cloud system with messaging capabilities for instant messaging messages. The cloud communication system 120 has the capability to forward instant communication messages between different clients (of the same type or different types). Cloud communication is a communication platform service based on cloud computing business model applications.
The push system 130 includes an online push type and an offline push type. In the embodiment of the present application, the online push type push system 130 is illustrated with a third party online push service provided by a third party push service provider; the offline push type push system 130 is exemplified by an offline notification service provided by a host system corresponding to a host program, hereinafter referred to as a host system notification service. The push system 130 constitutes a message push path between the cloud communication system 120 and the second terminal 140.
The second terminal 140 is operated with a second client (or application), which is a client having instant messaging capability. The second client is a hosting program with hosting capabilities. A host program refers to an application program that can carry a running applet. In this application, a second applet is illustrated as running in the second client. The second applet has a message push SDK integrated therein. The message pushing SDK has the registration capability of a custom message template and the capability of analyzing and displaying the custom message according to the custom message template.
In one example, the first terminal 110 sends a custom message to be pushed, and the cloud communication system 120 sends the custom message to the second terminal 140 through a message push path according to a message destination address. And under the condition that the second applet is online, the third party pushes the SDK to send the custom message to the message pushing SDK in the second applet to analyze and display the custom message.
In the embodiment of the application, the applet (Mini Program) is an application Program that can be used without downloading and installing. In order to provide more diversified business services to users, developers can develop corresponding applets for applications of the terminal (e.g., instant messaging applications, shopping applications, mail applications, etc.), which can be embedded as sub-applications into the applications of the terminal, and can provide corresponding business services to users by running the sub-applications (i.e., corresponding applets) within the applications. An applet is an application that runs in dependence on the host program. An applet is an application that utilizes a host program to provide a running environment. Similar to applets, there are also fast applications, where an applet is a web application that provides a running environment using a host program, and a fast application is a web application that provides a running environment using an operating system.
To facilitate an understanding of the operating mechanisms of the host program and applet, reference is made in connection with FIG. 2. An operating system 251 and a host program 252 are run in the first terminal 110 and the second terminal 140.
The operating system 251, which includes system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., is used to implement various basic services and handle hardware-based tasks. The operating system 251 may be various operating systems, and the specific type of the operating system is not limited. A host program 252 runs in the operating system 251.
Host program 252 is configured to provide an applet runtime environment in which one or more applets, such as applet 1 and applet 2, are running in host program 252. Regardless of the vehicle operating system, the applet may run in dependence upon the host program 252, which host program 252 is also referred to as an applet engine, so long as the host program 252 is running in the vehicle operating system.
As schematically shown in FIG. 2, host program 252 is an application program that carries an applet, providing an operating environment for the execution of the applet. Host program 252 is a native application. The native application is an application that may run directly on the operating system 251. Host program 252 may be a social application, a specialized application that specifically supports applets, a file management application, a mail application, a game application, a map application, a navigation application, and the like. Social applications include instant messaging applications, SNS (Social Network Service, social networking sites) applications, or live applications, among others. An applet is an application that can run in the environment provided by the host program. The applet may specifically be a social application, a file management application, a mail application, or a gaming application, among others. Host program 252 may specifically be a WeChat program (WeChat) or a QQ program or a Payment device program, among others.
The applet logic layer unit 252c and the corresponding applet view layer unit 252b are used to implement an applet instance. An applet may be implemented by an applet logic layer unit 252c and at least one applet view layer unit 252 b. The applet view layer unit 252b and applet page may be in a one-to-one correspondence.
The applet view layer unit 252b is used to organize the view of the applet and render. The applet logic layer unit 252c is used for processing the data processing logic of the applet and the corresponding applet page. The elements may be processes or threads in particular, and the applet view layer elements 252b may be applet view layer threads, and the applet logic layer elements 252c may be applet logic layer threads. The applet logic layer unit 252c may run in a virtual machine. The applet view layer unit 252b and the applet logic layer unit 252c may communicate through the host program native unit 252a, the host program native unit 252a being an interface of the host program 252 to communicate with the applet, the host program native unit 252a may be a thread or process of the host program 252 itself. The page logic code belonging to the package for each applet page may be registered by applet logic layer unit 252c at start-up and executed when the page logic code is needed to process data.
Fig. 3 shows a flowchart of a message pushing method according to an exemplary embodiment of the present application. This embodiment is illustrated with the method applied to an applet (such as the second applet in fig. 1). An applet is an application that runs in dependence on the host program. The method optionally comprises the steps of:
step 302: monitoring a first custom message from a message push path;
the message push path is a push path between the message push SDK and the cloud communication system. The message push path may be constructed based on the message push system. In the embodiment of the application, the online push service may adopt a third party online push service provided by a third party push service provider; the offline push service may employ a hosting system notification service.
The message pushing SDK is registered with a custom message template list corresponding to the applet. Illustratively, the custom message template list includes one or more custom message templates that may be specific to the applet, may be generic to both the applet and other applets, or may be a mixture of both.
The first custom message is a message conforming to a first custom message template. The first user-defined message is sent to the second applet through a push path between the cloud communication system and the message push SDK after the first terminal sends to the cloud communication system. The first custom message template is one of a list of custom message templates corresponding to the applet.
The destination address of the first custom message is the user account or IP address corresponding to the second applet.
Step 304: when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in a custom message template list;
optionally, the first custom message has a message type identifier, where the message type identifier is used to identify a custom message template corresponding to the first custom message.
When the first custom message is monitored, analyzing the message type identifier of the first custom message; and determining a first custom message template corresponding to the message type identifier in the custom message template list.
For example, if the message type identifier datatype=0 in the first custom message, the first custom message template is custom message template 0; if the message type identifier datatype=1 in the first custom message, the first custom message template is custom message template 1; if the message type in the first custom message identifies datatype=2, then the first custom message template is custom message template 2.
Step 306: and calling a first custom message template to display the first custom message.
The message pushing SDK calls a first custom message template to display the first custom message.
In summary, by using the tolerance of cloud communication to the message format and adopting the combination mechanism of "cloud communication+custom message template", the method provided in this embodiment enables the user to customize the style of the push message according to the characteristics of the applet itself, so as to adapt to the characteristics of the current applet, and the custom message is parsed and displayed by the message push SDK integrated in the applet, so that the effect of providing customized message push capability for different applets can be achieved with smaller development workload.
The implementation basis of the custom message template is the custom message type supported by the cloud communication system. A custom message template is schematically shown.
List one
In general, when a first terminal sends a cloud communication message, a corresponding message type identifier is directly used to represent a template type of a custom message template, such as a text message, a picture message, and the like. The method and the device can abstract the message types of all messages into custom messages, then identify different message types in the message body of the custom messages through the message type identification written in the json schema field, and which attribute fields the message types have, and the message templates used by the different types are registered in the program of the message push SDK in advance. When the message push SDK needs to display the custom message, the message push SDK acquires attribute fields in the message body of the custom message, then combines the custom message template to assemble, and finally renders and displays the custom message on the applet page.
In one example, the code of the message body of the custom message is illustrated as follows:
for example: by default, a message with a message type identifier datatype=2 is defined as a text message, and the message body of the text message contains a text field. When the message push SDK monitors that a custom message with datatype=2 is determined to be a text message, the text tag is used to display the content in the text field in the message body on the applet page.
In one example, an example of a default message template for a picture message is as follows:
for example: the default has defined that the custom message with the message type identifier datatype=3 is a picture message, and the message content of the picture message contains information such as the type of the picture, the picture address and the like. The received custom message with message type 3 will show a picture on the page with image tag.
Assuming that a custom message with both pictures and text needs to be presented, we can customize a custom message with datatype=4 and then put any required attribute fields into the message body content "DataContent". Exemplary are as follows:
the implementation of the custom message needs to go through two phases:
1. a registration process of a custom message template;
The requirement of pre-registering the custom message template in the present application provides two registration modes:
registration mode one: registration is performed by using a message template configuration platform, as shown in fig. 4;
registration mode II: the API calling the message push SDK is employed for registration as shown in fig. 5.
2. And customizing the using process of the message template.
Registration process for custom message templates:
registration mode one:
fig. 4 shows a flowchart of a method for registration of a message template based on mode one according to an exemplary embodiment of the present application. The method is applied between a message push configuration platform and a message push SDK (applet). The method comprises the following steps:
step 401: the message pushing configuration platform displays a message template preview interface;
referring to fig. 6 in combination, the message push configuration platform 61 is a web platform provided separately at the server side. The server side can be provided by a cloud communication system, or by a background server corresponding to a host program, or by a background server corresponding to an applet side.
The message template preview interface 63 is an interface for previewing and editing custom message templates. In the message template preview interface, a user can view, modify and delete registered custom message templates and can edit new custom message templates.
On the message template preview interface 63, the user may employ a drag-and-drop base message template to assemble a complex custom message template. For example, a custom message template supported by both text and picture can be combined based on the text message template and picture message template drag.
Optionally, on the message template preview interface 63, the user may also configure the message pushing policy of the custom message. For example, the push time, frequency, directional crowd, etc. of the custom message are set.
In one example, the custom message template is represented in JSON format data. On the message template preview interface, the user can edit the custom message template in various editing modes for editing the JSON format data.
Step 402: responding to editing operation on a message template preview interface, and generating a custom message template by a message pushing configuration platform through a message template editor;
illustratively, the custom message template is represented using JSON data. The custom message template also has a corresponding message type identifier.
A message template editor 62 is disposed in the message pushing configuration platform 61, and in response to an editing operation on the message template preview interface 63, the message template editor 62 generates JSON data of the custom message template according to the editing operation.
Step 403: the message pushing configuration platform stores the custom message template to the server;
the message push configuration platform 61 stores the message type identification and JSON data of the custom message template to the server. When the custom message template is only suitable for certain applets, the message pushing configuration platform stores the message type identifier, the JSON data and the applicable applet identifier of the custom message template to the server.
Step 404: the message push SDK sends a template acquisition request to a message push configuration platform in the server;
the message push SDK65 is also initialized after the applet is started. After the initialization is completed, the message push SDK65 sends a template acquisition request to the message push configuration platform 61 in the server.
Optionally, the template retrieval request is for requesting all custom message templates stored in the server.
Optionally, the template acquisition request carries an applet identification to acquire a custom message template applicable to the current applet.
Step 405: responding to the template acquisition request, and sending a custom message template list to the message pushing SDK by the server;
the server 64 sends JSON data for all custom message templates to the message push SDK65, or the server 64 sends JSON data for custom message templates for the current applet to the message push SDK 65.
The custom message template list at least comprises: a first custom message template.
Step 406: the message pushing SDK receives a first custom message template replied by the server, wherein the first custom message template is a template registered on a message pushing configuration platform;
step 407: the message push SDK registers the first custom message template with the message push SDK (local).
In summary, the method provided in this embodiment configures the custom message template through the message pushing configuration platform, so that operators can reasonably configure the custom message template according to operation requirements, thereby customizing a message pushing scene of a certain applet, and supporting configuring different custom message templates for a plurality of different applets. And the message pushing configuration platform supports visual drag editing, so that the programming capability requirement on operators is reduced, and the customizing difficulty of the custom message is reduced.
Registration mode II:
fig. 5 shows a flowchart of a method for registration of a message template based on mode one according to an exemplary embodiment of the present application. The method is applied between a message push configuration platform and a message push SDK (applet). The method comprises the following steps:
Step 501: the research and development terminal sends a first call request to the message push SDK;
the first call request is used for requesting to call a registration API in the message push SDK, and the registration API is an API interface for registering a custom message template.
Illustratively, the first invocation request carries template data of the custom message template. The developer writes the template string by code mode, taking the custom message of datatype=4 as an example, and the following description is given by the form of pseudo code:
sdk.register({id:4,key:’customMessage’,template:’<text>{{data.text}}</test><image style=”width:data.width”>{{data.url}}</image>})
wherein sdk.register is a registration API provided by the message push SDK.
Step 502: the message pushing SDK receives a first call request of a registration API of the message pushing SDK;
referring to fig. 6 in combination, the message push SDK 65 receives a first call request from the development terminal to the registration API 66, and obtains template data of the custom message template from the first call request. Illustratively, the template data is also represented using JSON data.
Step 503: in response to the first call request, the message pushing SDK registers the first custom message template with the message pushing SDK (local).
After acquiring the JSON data of the custom message template, the message push SDK is delivered to a rendering engine 67 in the applet to perform template analysis of the custom message, so that flexible customization of the custom message is realized.
In summary, the method provided by the embodiment provides a fast and efficient registration manner of the custom message template for research and development engineers with better programming capability by registering an API call. Under the registration mode, a message template configuration platform does not need to be specially built, and the computing resources, storage resources and network resources of the server are saved.
The use process for the custom message template is as follows:
fig. 7 shows a flowchart of a message pushing method according to an exemplary embodiment of the present application. This embodiment is illustrated with the method applied to an applet (such as the second applet in fig. 1). The method optionally comprises the steps of:
step 701: initializing a message push SDK;
after the applet is started, the applet initializes the message push SDK. Illustratively, initializing includes: and acquiring basic configuration to initialize each function interface.
Step 702: establishing a message pushing channel between the message pushing SDK and the cloud communication system;
illustratively, a communication socket is exchanged between the message push SDK and the cloud communication system to establish a message link between the message push SDK and the cloud communication system. The message push path may be constructed based on the message push system. In the embodiment of the application, the online push service may adopt a third party online push service provided by a third party push service provider; the offline push service may employ a hosting system notification service.
Step 703: monitoring a first custom message from a message push path;
the message pushing channel is a pushing channel between the message pushing SDK and the cloud communication system, and a custom message template list corresponding to the applet is registered in the message pushing SDK.
The message push SDK listens for a first custom message from the message push path. And under the condition that the applet is in an online state, the cloud communication system sends the first custom message to the message push SDK through a third party online push service provided by a third party service provider.
Step 704: after the first custom message is monitored, analyzing the message type identifier of the first custom message;
after the message pushing SDK monitors the first custom message, analyzing a message type identifier from the first custom message, wherein the message type identifier is used for indicating a custom message template corresponding to the first custom message.
Step 705: determining a first custom message template corresponding to the message type identifier in a custom message template list;
a plurality of custom message templates are registered in the message pushing SDK, and the custom message templates form a custom message template list. Each custom message template corresponds to a message type identification, such as datatype=2 or 3 or 4.
The message pushing SDK determines a first custom message template corresponding to the message type identifier in the custom message template list.
For example, if the message type identifier datatype=0 in the first custom message, the first custom message template is custom message template 0; if the message type identifier datatype=1 in the first custom message, the first custom message template is custom message template 1; if the message type in the first custom message identifies datatype=2, then the first custom message template is custom message template 2.
Step 706: and calling a first custom message template to display the first custom message.
The first custom message template comprises: definition and description of the various fields in the first custom message. The message pushing SDK calls a first custom message template to analyze each field in the first custom message, and calls a rendering engine to assemble, render and display each field obtained by analysis.
Illustratively, the first custom message is a combined message supporting a plurality of message contents. The message pushing SDK calls a first custom message template to analyze different attribute fields in the first custom message to obtain message contents belonging to different types. And after the message contents of different types are assembled based on the first custom message template, rendering and displaying the assembled message contents. The types of the message content include: at least one of text, picture, audio, video, links, files, locations, business cards.
Exemplary referring to fig. 8, a message push configuration platform operates on the server side. The message pushing configuration platform is used for configuring a custom message template and a custom message pushing strategy according to operation requirements by an operation classmate, and more complex message template types are combined through a basic message template, for example, different message templates can be used for android and iOS equipment, and the time and frequency of message pushing and the like can be set.
The message notification SDK is integrated in the APP or in the applet. The function of the message notification SDK includes: initializing SDK, registering custom message template, establishing message path of cloud communication, and monitoring and displaying message. The initializing SDK is used for acquiring basic configuration to perform initializing operation of an interface; the registration custom template is an interface exposed to a user for the user to carry out customized service, when the combined template of the built-in message template and the message pushing configuration platform can not meet the user requirement, the user can customize the message template, then call the interface to register in the message notification SDK, and customized message display can be carried out subsequently; the message monitoring and displaying module is mainly used for monitoring the message pushed by the server side, then processing the message, and calling the rendering engine to assemble a message template and display the message template on the user interface.
In summary, by using the tolerance of cloud communication to the message format and adopting the combination mechanism of "cloud communication+custom message template", the method provided in this embodiment enables the user to customize the style of the push message according to the characteristics of the applet itself, so as to adapt to the characteristics of the current applet, and the custom message is parsed and displayed by the message push SDK integrated in the applet, so that the effect of providing customized message push capability for different applets can be achieved with smaller development workload.
The method provided by the embodiment also enables the same custom message to support the combination of a plurality of different types of message contents by combining a plurality of attribute fields in the custom message. The user can determine the custom information needed by the applet according to the actual scene requirement of the applet.
Fig. 9 illustrates a block diagram of a message pushing system provided in an exemplary embodiment of the present application. The system comprises: the cloud communication system 120 and the second applet 142 are connected with each other, wherein a message pushing SDK is operated in the second applet 142, and a message pushing channel is established between the cloud communication system 120 and the message pushing SDK.
A first applet 112 for sending a first custom message through the cloud communication system 120, the first custom message conforming to a first custom message template;
the cloud communication system 120 is configured to send a first custom message to the second applet through the message push path;
a second applet 142, configured to monitor a first custom message from the message push path, where a custom message template list corresponding to the applet is registered in the message push SDK; when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in a custom message template list; and calling a first custom message template to display the first custom message.
In this embodiment, the message push path supports both online push and offline push forms. Illustratively, the message push path includes: the system comprises a third party online pushing system and a host program pushing platform.
The third party online pushing system is used for realizing online pushing. The third party online pushing system comprises: third party SDKs and third party IM services. In the case where the second applet 142 is online, the first custom message sent by the first applet 112 is pushed to the second applet 142 for use by the user by the cloud communication system 120 through the online push service of the third party SDK and the third party IM service.
The host program pushing platform is used for realizing offline pushing. In the case that the second applet 142 is in an offline state, the second custom message sent by the first applet 112 is pushed to the host program used by the user by the cloud communication system 120 through the host program push platform, and then the host program calls the second applet 142 to process the second custom message. In the offline push scenario, the second applet 142 receives a second call request from the host program, the second call request being generated by the host program after a second custom message is triggered, the second custom message being pushed to the host program by the host program push platform while the second applet is offline, in one example, the host program push platform pushes the second custom message to the host program via a template notification message, the template notification message being a generic type notification message provided by the host program push platform. In response to the second invocation request, the second applet switches from the offline state to the online state, displaying a user interface associated with the second custom message.
In some embodiments, the message pushing system further provides a message compensation mechanism for offline message pushing.
The cloud communication system 120 is further configured to invoke a host program push platform before and after the sending of the second custom message; and the host program pushing platform is used for sending a second custom message to the second applet in an offline pushing mode under the condition that the second applet is determined to be in an offline state according to the call. Or the host program pushing platform is used for sending the second custom message to the second applet in an offline pushing mode under the condition that the message pushing loss or the message pushing failure exists according to the call.
Taking a host program as an example of a WeChat program, the WeChat program is provided with an offline push service for the applet. As shown in fig. 10, the first applet of the sender loads the communication SDK of the cloud communication system 120 and then sends a custom message. The cloud communication system 120, upon receiving the custom message, generates pre-send callbacks and post-send callbacks to the host program push platform, which trigger the host system session service to learn whether the second applet is online. The host system session service judges whether the second applet of the receiving end is on line currently through the cloud communication system 120, and if the second applet of the receiving end is on line, the cloud communication system 120 performs on-line forwarding through a third party on-line push service; if the second applet at the receiving end is not online, the message is converted into a micro-letter service notification provided by the host program push platform, wherein the micro-letter service notification is an offline push capability provided by a template notification message. The host program pushing platform sends the custom message to the WeChat of the receiver through the template notification message of the WeChat; at the same time, the host program session service will store the messages (permanently) in a database for viewing the history messages at any time.
In practical application, it is found that callback of the cloud communication system often fails, which results in that part of message pushing is lost, and in order to solve the problem, a message compensation mechanism is created in the application. The message compensation mechanism includes: the cloud communication system 120 calls back the host system session service before the user-defined message is sent, the cloud communication system 120 calls back the host system session service after the user-defined message is sent, and the cloud communication system 120 calls back the host system session service at the position where the system message is sent successfully, and the offline pushing capability (i.e. host program pushing platform) of the host system session service is called in three modes, so that the arrival rate of the message can be guaranteed to the greatest extent under the offline condition. In one possible example, the host program pushing platform is configured to determine that there is a message pushing loss or a message pushing failure when a pre-sending callback is received and a post-sending callback is not received, and send a second custom message to the second applet again in an offline pushing manner. The message compensation mechanism has the following capabilities: 1. calling offline push capability at multiple places; 2. ensuring idempotency of the message; 3. and the pressure measurement is required, so that the data processing capacity is not reduced under the condition of ensuring mass data.
Taking the second applet as an example, the doctor version applet realizes functions of on-line inquiry, patient management and the like, and the applet realizes: the doctor can process the inquiry request of the patient, and check the illness state to give advice; the patient can establish a long-term communication relation with the doctor through code scanning, and can timely and conveniently acquire consultation advice of the doctor at low cost; physicians can also accumulate high value cases in small procedures.
In the above functions, there are a large number of scenes where both doctor and patient end interact, and the following characteristics are presented:
1. the user stays long. Unlike other tool-type applets that are used and walked, doctors and patients can stay in the applets for a long time to communicate, write articles and the like.
2. The message instantaneity is strong. Under the conversation scene and the patient management scene, because of the strong doctor-patient communication attribute, the patient can evaluate the diagnosis and treatment behaviors of doctors. The physician version applet requires very high immediate notification of the message.
Due to the characteristics, when a doctor or a patient stays in the small program, the doctor or the patient can receive the important message in time so as to create conditions for the doctor or the patient to respond efficiently.
Based on the above objective, by adopting the technical scheme provided by the application, the instant reminding of important messages such as diagnosis and treatment, report and the like in the applet can be realized, and a doctor can directly enter a corresponding user interface to respond through the instant reminding. Meanwhile, on the technical mechanism, besides the application scene, the good message type, the expansibility of the coverage scene and the superior performance of message pushing are guaranteed.
Illustratively, when the applet displays the first user interface and receives that the first custom message belongs to the second user interface, the first custom message template is invoked to render the first custom message as a banner message, which is displayed on the first user interface.
Illustratively, the first user interface is displayed as a second user interface within the applet in response to a triggering operation on the banner message.
As shown in fig. 11, when the applet displays the electronic prescription interface, a custom message 71 "focus on patient xx, initiate a drug application to you". Since the custom message 71 corresponds to the user interface that focuses on the patient xx, the message pushing SDK displays the custom message 71 above the electronic prescription interface in a banner message manner. After clicking the custom message 71, the user may jump to the user interface corresponding to the patient xx of great interest for processing.
As shown in fig. 12, when the applet displays the doctor-patient chat interface, a custom message 71 "focus on patient xx, and a consultation application is initiated to you". Since the custom message 72 corresponds to the consultation interface that focuses on the patient xx, the message pushing SDK displays the custom message 72 above the doctor-patient chat interface in a banner message manner. After clicking the custom message 72, the user may jump to the advisory interface corresponding to the patient xx of great concern for processing.
As shown in FIG. 13, when the applet displays the patient teaching data interface, a custom message 73 "focus on patient review order with new message". Because the custom message 73 corresponds to the order-for-medicine interface that focuses on the patient xx, the message pushing SDK displays the custom message 73 above the patient teaching data interface in a banner message manner. When the user clicks on the custom message 73, the user may jump to the order interface for the drug delivery corresponding to the patient xx of great concern for processing.
As shown in FIG. 14, when the applet displays the article details interface, a custom message 74 "patient xx consultation order has a new message" is received. Because the custom message 74 corresponds to the consultation order interface that focuses on the patient xx, the message pushing SDK displays the custom message 74 above the article detail interface in a banner message manner. When the user clicks on the custom message 74, the user may jump to the consultation order interface for processing.
As shown in FIG. 15, when the applet displays the doctor-patient chat interface, a custom message 75 "patient xx reports, please perfect the message" is received. Because the custom message 75 corresponds to the message perfecting interface corresponding to the patient xx, the message pushing SDK displays the custom message 75 above the doctor-patient chat interface in a banner message manner. When the user clicks on the custom message 75, the user may jump to the message perfecting interface for processing.
Fig. 16 shows a block diagram of a message pushing device according to an exemplary embodiment of the present application, where the device is applied in an applet, the applet is a program running in dependence on a host program, and the applet has a message pushing SDK running therein, and the method includes:
a monitoring module 1220, configured to monitor a first custom message of a message push path, where the message push path is a push path between the message push SDK and a cloud communication system, and a custom message template list corresponding to the applet is registered in the message push SDK;
a determining module 1240, configured to determine, when the first custom message is monitored, a first custom message template corresponding to the first custom message in the custom message template list;
The display module 1260 is configured to invoke the first custom message template to display the first custom message.
In one example of the present application, the determining module 1240 is configured to parse a message type identifier of the first custom message when the first custom message is monitored; and determining a first custom message template corresponding to the message type identifier in the custom message template list.
In one example of the present application, the display module 1260 is configured to invoke the first custom message template to parse different attribute fields in the first custom message to obtain message contents belonging to different types; after the message contents of different types are assembled based on the first custom message template, rendering and displaying the assembled message contents;
wherein the types include: at least one of text, picture, audio, video, links, files, locations, business cards.
In one example of the present application, the apparatus further comprises:
an initialization module 1212 for initializing the message push SDK;
and a building module 1214, configured to build the message push channel between the message push SDK and the cloud communication system.
In one example of the present application, the apparatus further comprises:
a receiving module 1282, configured to send a template acquisition request to a message pushing configuration platform in a server;
a sending module 1284, configured to receive the first custom message template replied by the server, where the first custom message template is a template registered on the message pushing configuration platform;
registering the first custom message template to the message push SDK.
In one example of the present application, the apparatus further comprises:
the receiving module 1282 is configured to receive a call request to a registration API of the message push SDK;
the determining module 1240 is configured to register the first custom message template with the message push SDK in response to the call request.
In one example of the present application, the apparatus further comprises:
the receiving module 1282 is configured to receive a second call request of the host program, where the second call request is generated by the host program after a second custom message is triggered, and the second custom message is pushed to the host program by a host program push platform when the applet is in an offline state;
The presentation module 1260 is configured to switch the applet from the offline state to the online state in response to the second call request, and display a user interface related to the second custom message.
In one example of the present application, the display module 1260 is configured to, when the applet displays a first user interface and the first custom message belongs to a second user interface, invoke the first custom message template to render the first custom message as a banner message, and display the banner message on the first user interface.
In one example of the present application, the presentation module 1260 is configured to switch the first user interface to be displayed as the second user interface within the applet in response to a triggering operation on the banner message.
Fig. 17 shows a block diagram of a computer device 1300 provided in an exemplary embodiment of the present application. The computer device 1300 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Computer device 1300 may also be referred to by other names as user device, portable computer device, laptop computer device, desktop computer device, etc.
In general, the computer device 1300 includes: a processor 1301, and a memory 1302.
Processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. Processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). Processor 1301 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 1301 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. Memory 1302 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1302 is used to store at least one instruction for execution by processor 1301 to implement the message pushing method provided by the method embodiments herein.
In some embodiments, the computer device 1300 may further optionally include: a peripheral interface 1303 and at least one peripheral. The processor 1301, the memory 1302, and the peripheral interface 1303 may be connected by a bus or signal lines. The respective peripheral devices may be connected to the peripheral device interface 1303 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1304, a display screen 1305, a camera assembly 1306, audio circuitry 1307, a positioning assembly 1308, and a power supply 1309.
A peripheral interface 1303 may be used to connect I/O (Input/Output) related at least one peripheral to the processor 1301 and the memory 1302. In some embodiments, processor 1301, memory 1302, and peripheral interface 1303 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1301, the memory 1302, and the peripheral interface 1303 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1304 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1304 converts an electrical signal to an electromagnetic signal for transmission, or converts a received electromagnetic signal to an electrical signal. Optionally, the radio frequency circuit 1304 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 1304 may communicate with other computer devices via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or Wi-Fi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 1304 may also include NFC (Near Field Communication ) related circuits, which are not limited in this application.
The display screen 1305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1305 is a touch display, the display 1305 also has the ability to capture touch signals at or above the surface of the display 1305. The touch signal may be input to the processor 1301 as a control signal for processing. At this point, the display 1305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 1305 may be one, providing a front panel of the computer apparatus 1300; in other embodiments, the display screen 1305 may be at least two, disposed on different surfaces of the computer apparatus 1300 or in a folded design; in still other embodiments, the display 1305 may be a flexible display disposed on a curved surface or a folded surface of the computer apparatus 1300. Even more, the display screen 1305 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display screen 1305 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1306 is used to capture images or video. Optionally, camera assembly 1306 includes a front camera and a rear camera. Typically, the front camera is disposed on a front panel of the computer device and the rear camera is disposed on a rear surface of the computer device. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1306 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 1307 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 1301 for processing, or inputting the electric signals to the radio frequency circuit 1304 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each disposed at a different location of the computer device 1300. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is then used to convert electrical signals from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 1307 may also comprise a headphone jack.
The location component 1308 is used to locate the current geographic location of the computer device 1300 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 1308 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, or the Galileo system of Russia.
A power supply 1309 is used to power the various components in the computer device 1300. The power supply 1309 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1309 comprises a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, computer device 1300 also includes one or more sensors 1310. The one or more sensors 1310 include, but are not limited to: acceleration sensor 1311, gyroscope sensor 1312, pressure sensor 1313, fingerprint sensor 1314, optical sensor 1315, and proximity sensor 1316.
The acceleration sensor 1311 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the computer apparatus 1300. For example, the acceleration sensor 1311 may be used to detect components of gravitational acceleration in three coordinate axes. Processor 1301 may control touch display screen 1305 to display a user interface in either a landscape view or a portrait view based on gravitational acceleration signals acquired by acceleration sensor 1311. The acceleration sensor 1311 may also be used for the acquisition of motion data of a game or user.
The gyro sensor 1312 may detect a body direction and a rotation angle of the computer apparatus 1300, and the gyro sensor 1312 may collect a 3D motion of the user on the computer apparatus 1300 in cooperation with the acceleration sensor 1311. Processor 1301 can implement the following functions based on the data collected by gyro sensor 1312: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
Pressure sensor 1313 may be disposed on a side frame of computer device 1300 and/or on an underlying layer of touch display screen 1305. When the pressure sensor 1313 is disposed on the side frame of the computer apparatus 1300, a grip signal of the computer apparatus 1300 by the user may be detected, and the processor 1301 may perform left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 1313. When the pressure sensor 1313 is disposed at the lower layer of the touch display screen 1305, the processor 1301 realizes control of the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1305. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1314 is used to collect a fingerprint of the user, and the processor 1301 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 1314, or the fingerprint sensor 1314 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by processor 1301 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1314 may be provided on the front, back, or side of the computer device 1300. When a physical key or vendor Logo is provided on the computer device 1300, the fingerprint sensor 1314 may be integrated with the physical key or vendor Logo.
The optical sensor 1315 is used to collect ambient light intensity. In one embodiment, processor 1301 may control the display brightness of touch display screen 1305 based on the intensity of ambient light collected by optical sensor 1315. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1305 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 1305 is turned down. In another embodiment, processor 1301 may also dynamically adjust the shooting parameters of camera assembly 1306 based on the intensity of ambient light collected by optical sensor 1315.
A proximity sensor 1316, also known as a distance sensor, is typically provided on the front panel of the computer device 1300. The proximity sensor 1316 is used to collect the distance between the user and the front of the computer device 1300. In one embodiment, when proximity sensor 1316 detects a gradual decrease in the distance between the user and the front of computer device 1300, processor 1301 controls touch display screen 1305 to switch from a bright screen state to a inactive screen state; when the proximity sensor 1316 detects that the distance between the user and the front of the computer device 1300 gradually increases, the touch display screen 1305 is controlled by the processor 1301 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the architecture shown in fig. 17 is not limiting as to the computer device 1300, and may include more or fewer components than shown, or may combine certain components, or employ a different arrangement of components.
The application further provides a computer readable storage medium, in which at least one instruction, at least one program, a code set, or an instruction set is stored, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a message pushing method provided by the foregoing method embodiments.
Optionally, the present application also provides a computer program product containing instructions which, when run on a computer device, cause the computer device to perform the message pushing method of the above aspects.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.
Claims (13)
1. A message pushing method, wherein the method is applied to an applet, the applet is an application that provides an operating environment by using a host program, and a message pushing software development kit SDK is operated in the applet, the method comprises:
Monitoring a first custom message from a message push path, wherein the message push path is a push path between the message push SDK and a cloud communication system, and a custom message template list corresponding to the applet is registered in the message push SDK;
when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in the custom message template list;
and calling the first custom message template to display the first custom message.
2. The method of claim 1, wherein the determining a first custom message template corresponding to the first custom message in a custom message template list when the first custom message is listened to comprises:
analyzing a message type identifier of the first custom message when the first custom message is monitored;
and determining a first custom message template corresponding to the message type identifier in the custom message template list.
3. The method of claim 2, wherein the invoking the first custom message template to expose the first custom message comprises:
Calling the first custom message template to analyze different attribute fields in the first custom message to obtain message contents belonging to different types;
after the message contents of different types are assembled based on the first custom message template, rendering and displaying the assembled message contents;
wherein the types include: at least one of text, picture, audio, video, links, files, locations, business cards.
4. A method according to any one of claims 1 to 3, wherein the method further comprises:
initializing the message push SDK;
and establishing the message pushing channel between the message pushing SDK and the cloud communication system.
5. A method according to any one of claims 1 to 3, wherein the method further comprises:
sending a template acquisition request to a message pushing configuration platform in a server;
receiving the first custom message template replied by the server, wherein the first custom message template is a template registered on the message pushing configuration platform;
registering the first custom message template to the message push SDK.
6. A method according to any one of claims 1 to 3, wherein the method further comprises:
Receiving a call request of a registration application program interface API of the message push SDK;
and responding to the call request, registering the first custom message template to the message push SDK.
7. A method according to any one of claims 1 to 3, wherein the method further comprises:
receiving a second call request of the host program, wherein the second call request is generated by the host program after a second custom message is triggered, and the second custom message is pushed to the host program by a host program pushing platform when the applet is in an offline state;
in response to the second invocation request, the applet switches from the offline state to an online state, displaying a user interface associated with the second custom message.
8. The method of claim 1, wherein the invoking the first custom message template to expose the first custom message comprises:
and when the applet displays a first user interface and the first custom message belongs to a second user interface, calling the first custom message template to render the first custom message into a banner message, and displaying the banner message on the first user interface.
9. A message pushing device, wherein the device runs in an applet, the applet is an application that provides an operating environment by means of a host program, the applet runs in a message pushing software development kit, SDK, the device comprising:
the monitoring module is used for monitoring a first custom message of a message pushing channel, wherein the message pushing channel is a pushing channel between the message pushing SDK and the cloud communication system, and a custom message template list corresponding to the applet is registered in the message pushing SDK;
the determining module is used for determining a first custom message template corresponding to the first custom message in the custom message template list when the first custom message is monitored;
and the display module is used for calling the first custom message template to display the first custom message.
10. A computer device, the computer device comprising: a processor and a memory storing a computer program to be loaded and executed by the processor to implement the message pushing method according to any of claims 1 to 8.
11. A message pushing system, the system comprising: the cloud communication system comprises a first applet, a cloud communication system and a second applet, wherein a message pushing Software Development Kit (SDK) is operated in the second applet, and a message pushing passage is established between the cloud communication system and the message pushing SDK;
the first applet is configured to send a first custom message through the cloud communication system, where the first custom message conforms to a first custom message template;
the cloud communication system is used for sending the first custom message to the second applet through a message pushing channel;
the second applet is used for monitoring a first custom message from the message pushing channel, and a custom message template list corresponding to the applet is registered in the message pushing SDK; when the first custom message is monitored, determining a first custom message template corresponding to the first custom message in the custom message template list; and calling the first custom message template to display the first custom message.
12. The system of claim 11, wherein the message push path comprises: a host program pushing platform;
The cloud communication system is further used for calling the host program pushing platform before and after the second custom message is sent;
and the host program pushing platform is used for sending the second custom message to the second applet in an offline pushing mode under the condition that the second applet is determined to be in an offline state according to the call.
13. A computer readable storage medium storing a computer program to be loaded and executed by a processor to implement the message pushing method according to any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011377809.8A CN112420217B (en) | 2020-11-30 | 2020-11-30 | Message pushing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011377809.8A CN112420217B (en) | 2020-11-30 | 2020-11-30 | Message pushing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112420217A CN112420217A (en) | 2021-02-26 |
CN112420217B true CN112420217B (en) | 2023-07-28 |
Family
ID=74828978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011377809.8A Active CN112420217B (en) | 2020-11-30 | 2020-11-30 | Message pushing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112420217B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113271250B (en) * | 2021-04-20 | 2023-05-02 | 长沙市到家悠享家政服务有限公司 | Multi-channel multi-format instant message forwarding method, system and computer equipment |
CN114125047A (en) * | 2021-11-10 | 2022-03-01 | 携程商旅信息服务(上海)有限公司 | Message push method, system, device and storage medium based on third-party system |
CN115208846B (en) * | 2022-07-08 | 2023-06-09 | 武汉联影医疗科技有限公司 | Session interaction method and system |
CN116582585B (en) * | 2023-07-07 | 2023-11-14 | Tcl通讯科技(成都)有限公司 | Message pushing method, device, medium and equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015101357A1 (en) * | 2014-01-06 | 2015-07-09 | Tencent Technology (Shenzhen) Company Limited | Method and system for pushing web application message |
CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
CN110519154A (en) * | 2019-08-15 | 2019-11-29 | 中国平安财产保险股份有限公司 | Data transmission method for uplink, device, equipment and computer readable storage medium |
CN110971503A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | WeChat applet message pushing method, storage medium, electronic device and system |
CN111356024A (en) * | 2020-03-11 | 2020-06-30 | 厦门亿合恒拓信息科技有限公司 | Online video communication method and storage medium for webpage end and wechat applet end |
CN111835837A (en) * | 2020-06-28 | 2020-10-27 | 中国船舶重工集团公司第七一六研究所 | Message pushing method and system with multi-terminal adaptation |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060240851A1 (en) * | 2003-03-21 | 2006-10-26 | Vocel, Inc. | Interactive messaging system |
US7761878B2 (en) * | 2003-11-19 | 2010-07-20 | Nexaweb Technologies, Inc | System and method for stateful web-based computing |
US8634810B2 (en) * | 2011-09-29 | 2014-01-21 | International Business Machines Corporation | Pushing secure notifications to mobile computing devices |
EP3055978B1 (en) * | 2013-10-10 | 2019-02-27 | Google LLC | Systems, methods, and computer program products for managing communications |
US11438294B2 (en) * | 2014-09-24 | 2022-09-06 | Yahoo Assets Llc | System and method for auto-formatting messages based on learned message templates |
US10476978B2 (en) * | 2015-09-28 | 2019-11-12 | Facebook, Inc. | Providing notifications on online social networks |
-
2020
- 2020-11-30 CN CN202011377809.8A patent/CN112420217B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015101357A1 (en) * | 2014-01-06 | 2015-07-09 | Tencent Technology (Shenzhen) Company Limited | Method and system for pushing web application message |
CN110971503A (en) * | 2018-09-30 | 2020-04-07 | 武汉斗鱼网络科技有限公司 | WeChat applet message pushing method, storage medium, electronic device and system |
CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
CN110519154A (en) * | 2019-08-15 | 2019-11-29 | 中国平安财产保险股份有限公司 | Data transmission method for uplink, device, equipment and computer readable storage medium |
CN111356024A (en) * | 2020-03-11 | 2020-06-30 | 厦门亿合恒拓信息科技有限公司 | Online video communication method and storage medium for webpage end and wechat applet end |
CN111835837A (en) * | 2020-06-28 | 2020-10-27 | 中国船舶重工集团公司第七一六研究所 | Message pushing method and system with multi-terminal adaptation |
Also Published As
Publication number | Publication date |
---|---|
CN112420217A (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112947823B (en) | Session processing method, device, equipment and storage medium | |
CN112420217B (en) | Message pushing method, device, equipment and storage medium | |
CN111324259B (en) | Group creation method, device and storage medium | |
CN113204298B (en) | Method and device for displaying release progress, electronic equipment and storage medium | |
CN112148499B (en) | Data reporting method, device, computer equipment and medium | |
CN111338910B (en) | Log data processing and display method, device, device and storage medium | |
CN108874496B (en) | Application management method, device, terminal, server and storage medium | |
CN113965807A (en) | Message pushing method, device, terminal, server and storage medium | |
CN112764608B (en) | Message processing method, device, equipment and storage medium | |
CN111177013A (en) | Log data acquisition method and device, computer equipment and storage medium | |
CN113051015B (en) | Page rendering method and device, electronic equipment and storage medium | |
CN112163406A (en) | Interactive message display method and device, computer equipment and storage medium | |
CN113467663B (en) | Interface configuration method, device, computer equipment and medium | |
CN111737100A (en) | Data acquisition method, device, equipment and storage medium | |
CN111459466B (en) | Code generation method, device, equipment and storage medium | |
CN113190362B (en) | Service calling method and device, computer equipment and storage medium | |
CN112749362A (en) | Control creating method, device, equipment and storage medium | |
CN113837709A (en) | Online processing method and device of business process, terminal and readable storage medium | |
CN110768843B (en) | Network problem analysis method, device, terminal and storage medium | |
CN113064981A (en) | Group head portrait generation method, device, equipment and storage medium | |
CN112910752A (en) | Voice expression display method and device and voice expression generation method and device | |
CN112988254A (en) | Method, device and equipment for managing hardware equipment | |
CN112311661B (en) | Message processing method, device, equipment and storage medium | |
CN111666214B (en) | Client fault tolerance test method, device, terminal, server and storage medium | |
CN114329292A (en) | Resource information configuration method and device, electronic equipment and storage medium |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40038816 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |