CN112420217A - Message pushing method, device, equipment and storage medium - Google Patents

Message pushing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112420217A
CN112420217A CN202011377809.8A CN202011377809A CN112420217A CN 112420217 A CN112420217 A CN 112420217A CN 202011377809 A CN202011377809 A CN 202011377809A CN 112420217 A CN112420217 A CN 112420217A
Authority
CN
China
Prior art keywords
message
custom
pushing
applet
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011377809.8A
Other languages
Chinese (zh)
Other versions
CN112420217B (en
Inventor
范统帅
王进
王玥
高鹏飞
邢小京
黄晓彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011377809.8A priority Critical patent/CN112420217B/en
Publication of CN112420217A publication Critical patent/CN112420217A/en
Application granted granted Critical
Publication of CN112420217B publication Critical patent/CN112420217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H80/00ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing 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 message pushing device, message pushing equipment and a storage medium, which are applied to the field of message pushing of cloud communication. The method is applied to an applet, wherein the applet is an application which provides a running environment by using a host program, and a message pushing SDK is run in the applet, and the method comprises the following steps: monitoring a first custom message from a message pushing path, wherein the message pushing path is a pushing path between the message pushing SDK and a cloud communication system, 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. The method and the device can achieve the effect of providing customized message pushing capacity aiming at different applets.

Description

Message pushing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of message pushing (Push), and in particular, to a method, an apparatus, a device, and a storage medium for message pushing.
Background
The message push (push) service refers to a technical service for a server to direct a message to a mobile phone interface of a user in real time.
In the related art, there is a message pushing technology for banner messages, and an application program is installed on a mobile phone of a user. The server adopts the online message pushing service provided by the third party to push the message to the mobile phone of the user. The application program invokes a banner message notification mechanism provided by the operating system to display the message using the banner message.
However, the above message push technology can only be used in an APP type message push scenario, and cannot be applied to an applet type message push scenario. Since the applet is characterized by light weight and customization, and the host program (such as WeChat) already has the offline push capability in the form of template messages, the workload of developing an independent message push mechanism specially for a single applet is too large, so that the applet generally lacks the message push capability.
Disclosure of Invention
The application provides a message pushing method, a message pushing device and a message pushing storage medium, which can provide customized message pushing capacity 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, where the applet is a program that runs in dependence on a host program, and a message pushing Software Development Kit (SDK) runs in the applet, the method including:
monitoring a first custom message of a message pushing path, wherein the message pushing path is a pushing path between the message pushing SDK and a cloud communication system, 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 message pushing apparatus, where the apparatus is applied to an applet, the applet is a program that runs in dependence on a host program, and a message pushing SDK runs in the applet, and the method includes:
the monitoring module is used for monitoring a first custom message of a message pushing path, wherein the message pushing path is a pushing path between the message pushing SDK and a 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, the memory storing a computer program that is loaded and executed by the processor to implement the message push method as described above.
According to another aspect of the present application, there is provided a message push system, including: the system comprises a first small program, a cloud communication system and a second small program, wherein a message pushing SDK runs in the second small program, and a message pushing channel is established between the cloud communication system and the message pushing SDK;
the first applet is used for sending a first custom message through the cloud communication system, and 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 access, 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, a computer-readable storage medium is provided, which stores a computer program, which is loaded and executed by a processor to implement the message push method as described above.
According to another aspect of the present application, a computer program product is provided that includes 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, so that the computer device executes the message pushing method.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
by utilizing the wide capacity of the cloud communication to the message format and adopting a combination mechanism of 'cloud communication + self-defined 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 user-defined 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 in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a block diagram of a message push system according to an exemplary embodiment of the present application;
FIG. 2 illustrates a relationship diagram of a host program and an applet provided by another exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating a message pushing method according to another exemplary embodiment of the present application;
fig. 4 is a flowchart illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 5 is a flowchart illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 6 is a schematic diagram illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 7 is a flowchart illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 8 is a schematic diagram illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 9 is a block diagram illustrating a message push system according to an exemplary embodiment of the present application;
fig. 10 is a block diagram illustrating a message push system according to an exemplary embodiment of the present application;
fig. 11 to fig. 15 are interface diagrams illustrating a message pushing method according to an exemplary embodiment of the present application;
fig. 16 is a block diagram of a message pushing apparatus according to an exemplary embodiment of the present application;
FIG. 17 illustrates a block diagram of a computer device provided by an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like 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 a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied in a Cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
Cloud computing (Cloud computing) is a computing model that distributes computing tasks over a pool of resources made up of a large number of computers, enabling various application systems to obtain 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" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand.
As a basic capability provider of cloud computing, a cloud computing resource pool (called as an ifas (Infrastructure as a Service) platform for short is established, and multiple types of virtual resources are deployed in the resource pool and are selectively used by external clients.
According to the logic function division, a PaaS (Platform as a Service) layer can be deployed on an IaaS (Infrastructure as a Service) layer, a SaaS (Software as a Service) layer is deployed on the PaaS layer, and the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, a web container, etc. SaaS is a variety of business software, such as web portal, sms, and mass texting. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
The cloud communication platform relies on the internet, provides communication platform service (PaaS) and communication software service (SaaS) for enterprise customers in a cloud computing mode, and helps the enterprises to improve the communication efficiency with the customers. By packaging professional communication capabilities into an Application Programming Interface (API) Interface and an SDK (software development kit), the use threshold of enterprises and developers for communication services is greatly reduced, so that the App, a Web end and an enterprise system can easily access more than 20 professional communication capabilities such as short message/Voice verification codes, Voice calls, Voice notifications, call centers/intelligent Interactive Voice Responses (IVR), Voice talks/conferences, video calls/conferences and the like, 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 centralized at the cloud end and is intercommunicated and compatible.
The present embodiment implements message push based on "cloud communication-based custom message + message push SDK". The method and the device are based on the high tolerance of the cloud communication to the message types, all messages can be personalized and customized by the user-defined message types, and the user-defined messages are analyzed through the message pushing SDK to support various message pushing scenes. Particularly, under the condition that the application scenes of each small program are different and the requirements on the message pushing capacity are different, the application scenes of various small programs can be adapted by using smaller development amount.
Fig. 1 shows a schematic diagram of a message push system 100 provided in an exemplary embodiment of the present application. The message push system 100 includes: the system comprises a first terminal 110, a cloud communication system 120, a push system 130 and a second terminal 140.
The first terminal 110 runs a first client (or called application), which is a client with instant messaging capability. The first client may be a common application without host capability (such as a computer program push scenario of a third-party merchant), or may be a host program with host capability (such as an applet push scenario common to doctor and patient channels). A host refers to an application that can carry an applet. In this application, the first client is exemplified as a host program with a host capability, and the host program runs a first applet.
The 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 exemplified by 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 the host program, and is hereinafter referred to as a host system notification service. The push system 130 forms a message push path between the cloud communication system 120 and the second terminal 140.
The second terminal 140 runs a second client (or called application), which is a client with instant messaging capability. The second client is a hosting program having hosting capabilities. A host refers to an application that can carry an applet. In this application, the second applet is run in the second client for example. The second applet has a message push SDK integrated therein. The message push SDK has the registration capability of a user-defined message template and the capability of analyzing and displaying the user-defined message according to the user-defined message template.
In one example, the first terminal 110 sends a custom message needing to be pushed, and the cloud communication system 120 sends the custom message to the second terminal 140 through a message pushing path according to a message destination address. And under the condition that the second applet is online, the third party pushing SDK sends the custom message to the message pushing SDK in the second applet to analyze and display the custom message.
In the embodiment of the present application, the applet (Mini Program) is an application 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 (such as instant messaging applications, shopping applications, mail applications, and the like) of the terminal, the applets can be embedded into the applications of the terminal as sub-applications, and the corresponding business services can be provided for the users by running the sub-applications (i.e., the corresponding applets) in the applications. An applet is an application that runs in dependence on a host program. An applet is an application that provides a runtime environment using a host program. Similar to the applet, there is a fast application, in which the applet is a web application that provides a running environment using a host program, and the fast application is a web application that provides a running environment using an operating system.
To facilitate understanding of the mechanism by which the host program and the applet operate, reference is made in conjunction 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 for implementing various basic services and for processing hardware-based tasks. The operating system 251 may be any of various operating systems, and the specific type of operating system is not limited. A host program 252 runs in the operating system 251.
The host program 252 is used to provide an applet running environment, and one or more applets, such as applet 1 and applet 2, are run in the host program 252. Regardless of the car machine operating system, as long as the host program 252 is run in the car machine operating system, the applet can run by depending on the host program 252, and the host program 252 is also called an applet engine.
As shown schematically in fig. 2, the host program 252 is an application program carrying an applet and provides a running environment for running the applet. The host program 252 is a native application. A native application is an application that may run directly on the operating system 251. The host program 252 may be a social application, a dedicated application that specifically supports applets, a file management application, a mail application, a game application, a mapping application, a navigation application, and the like. The Social application program includes an instant messaging application, an SNS (Social Network Service) application, or a live application. 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 game application, etc. The host program 252 may be a WeChat program (WeChat) or a QQ program or a pay-for-help program.
The applet logical 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 logical layer unit 252c and at least one applet view layer unit 252 b. The applet view layer element 252b and the applet page may have a one-to-one correspondence.
The applet view layer unit 252b is used to organize and render views of the applet. The applet logic layer unit 252c is used to process the data processing logic of the applet and the corresponding applet page. The units may specifically be processes or threads, the applet view layer unit 252b may be an applet view layer thread, and the applet logic layer unit 252c may be an applet logic layer thread. The applet logical layer unit 252c may run in a virtual machine. The applet view layer unit 252b and the applet logical layer unit 252c may communicate via a host program native unit 252a, where the host program native unit 252a is an interface for the host program 252 to communicate with the applet, and the host program native unit 252a may be a thread or process of the host program 252 itself. The page logic codes of each applet page belonging to the package may be registered by the applet logic layer unit 252c at startup, and the registered page logic codes may be executed when the page logic codes are needed to process data.
Fig. 3 shows a flowchart of a message pushing method according to an exemplary embodiment of the present application. The present 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 a host program. The method optionally comprises the steps of:
step 302: monitoring a first custom message from a message pushing path;
the message pushing path is a pushing path between the message pushing SDK and the cloud communication system. The message push path may be constructed based on a message push system. In the embodiment of the application, the online pushing service can adopt a third-party online pushing service provided by a third-party pushing service provider; the offline push service may employ a host system notification service.
The message pushing SDK is registered with a self-defined message template list corresponding to the small program. Illustratively, the list of custom message templates includes one or more custom message templates that may be specific to the applet, common to both the applet and other applets, or a mixture of both.
The first custom message is a message that conforms to the first custom message template. The first custom message is sent to the second applet through a pushing channel between the cloud communication system and the message pushing SDK after the first terminal is sent 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 self-defined message is a user account or an 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 a 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 in the first custom message is 0, the first custom message template is a custom message template 0; if the message type identifier Datatype in the first custom message is 1, the first custom message template is a custom message template 1; if the message type identifier Datatype in the first custom message is 2, 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.
And the message pushing SDK calls a first custom message template to display the first custom message.
In summary, in the method provided in this embodiment, by utilizing the tolerance of the cloud communication to the message format and adopting the combination mechanism of "cloud communication + custom message template", the 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 achieved with less development workload.
The realization of the custom message template is based on the custom message type supported by the cloud communication system. Table one schematically illustrates a custom message template.
Watch 1
Figure BDA0002807586210000081
Figure BDA0002807586210000091
Generally, when the first terminal sends a cloud communication message, the first terminal directly uses a corresponding message type identifier to represent a template type of a custom message template, such as a text message, a picture message, and the like. The message types of all messages can be abstracted into the self-defined message, then different message types are identified in the message body of the self-defined message through the message type identification written in the json schema field, attribute fields of the message types are provided, and message templates used by different types are registered in the program of the message pushing SDK in advance. When the message pushing SDK needs to display the custom message, the message pushing SDK acquires the attribute field in the message body of the custom message, then combines with the custom message template to assemble, and finally renders and displays the attribute field on the small program page.
In one example, the code for the message body of the custom message is illustrated as follows:
Figure BDA0002807586210000092
Figure BDA0002807586210000101
for example: by default, a message with a message type identifier DataType ═ 2 has been defined as a text message, and the message body of the text message contains a text field. When the message pushing SDK monitors that a self-defined message with DataType of 2 is determined to be a text message, the text tag is used for displaying the content in the text field in the message body to the applet page.
In one example, an example of a default message template for a picture message is as follows:
Figure BDA0002807586210000102
for example: by default, a custom message with a message type identifier DataType of 3 is defined as a picture message, and the message content of the picture message includes information such as a picture type, a picture address, and the like. When a user-defined message containing a message type identifier 3 is received, a picture is displayed on a page by using an image tag.
Assuming that a custom message showing both pictures and texts is required, a custom message with DataType of 4 can be customized, and then any required attribute field is put into the message body content "DataContent". Exemplary are as follows:
Figure BDA0002807586210000103
Figure BDA0002807586210000111
the implementation of the custom message needs to go through two stages:
firstly, self-defining a registration process of a message template;
the self-defined message template needs to be registered in advance to the application, and two registration modes are provided:
the first registration mode is as follows: a message template configuration platform is adopted for registration, as shown in FIG. 4;
and a second registration mode: registers with an API that calls a message push SDK, as shown in fig. 5.
And secondly, customizing the using process of the message template.
The registration process for the custom message template:
the first registration mode is as follows:
fig. 4 is a flowchart illustrating a method for registering a message template according to an exemplary embodiment of the present application. The method is applied between a message pushing configuration platform and a message pushing SDK (small program). 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 separately provided on the server side. The server side can be provided by a cloud communication system, or provided by a background server corresponding to the host program, or provided by a background server corresponding to the applet side.
Message template preview interface 63 is an interface for previewing and editing custom message templates. In the message template preview interface, the user can check, modify and delete the registered self-defined message template, and can also edit a new self-defined message template.
On the message template preview interface 63, the user can combine complex custom message templates by dragging the basic message template. For example, a custom message template supported by both text and pictures can be combined based on text message templates and picture message templates.
Optionally, on the message template preview interface 63, the user may also configure a message pushing policy for the custom message. For example, the push time, frequency, targeted crowd, etc. of the custom message are set.
In one example, the custom message template is represented in data in the JSON format. On the message template preview interface, the user can edit the custom message template by adopting various editing modes for editing the data in the JSON format.
Step 402: responding to the editing operation on the message template preview interface, and generating a self-defined message template by the message pushing configuration platform through a message template editor;
illustratively, the custom message template is represented by JSON data. The custom message template also has a corresponding message type identifier.
A message template editor 62 is arranged in the message pushing configuration platform 61, and in response to the 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 self-defined message template to a server;
and the message pushing configuration platform 61 stores the message type identifier and the JSON data of the custom message template to the server. When the self-defined message template is only suitable for certain applets, the message pushing configuration platform stores the message type identifier, the JSON data and the suitable applets identifier of the self-defined message template to a server.
Step 404: the message pushing SDK sends a template acquisition request to a message pushing configuration platform in the server;
the message push SDK65 is also initialized after the applet is started. After the initialization is finished, the message pushing SDK65 sends a template acquisition request to the message pushing configuration platform 61 in the server.
Optionally, the template retrieval request is used to request all custom message templates stored in the server.
Optionally, the template obtaining request carries an applet identifier, so as to obtain a custom message template applicable to the current applet.
Step 405: responding to the template acquisition request, and sending a self-defined message template list to the message pushing SDK by the server;
the server 64 sends the JSON data for all custom message templates to the push message SDK65, or the server 64 sends the JSON data for the custom message template applicable to the current applet to the push message SDK 65.
The custom message template list at least comprises: a first custom message template.
Step 406: the message pushing SDK receives a first self-defined message template replied by the server, wherein the first self-defined message template is a registered template on the message pushing configuration platform;
step 407: the message push SDK registers the first custom message template with the message push SDK (local).
In summary, in the method provided in this embodiment, the configuration of the custom message template is performed through the message pushing configuration platform, and an operator can perform reasonable configuration of the custom message template according to the operation requirement, so as to customize a message pushing scenario of a certain applet, and simultaneously support configuration of different custom message templates for a plurality of different applets. And the message pushing configuration platform supports visual dragging and editing, thereby reducing the programming capability requirement on operators and reducing the customization difficulty of the user-defined message.
And a second registration mode:
fig. 5 is a flowchart illustrating a method for registering a message template according to an exemplary embodiment of the present application. The method is applied between a message pushing configuration platform and a message pushing SDK (small program). The method comprises the following steps:
step 501: the research and development terminal sends a first calling request to the message pushing SDK;
the first call request is used for requesting to call a registration API in the message pushing SDK, and the registration API is an API interface used for registering the custom message template.
Illustratively, the first invocation request carries template data of the custom message template. The developer writes the template character string by a code mode, taking the custom message with DataType 4 as an example, the following description is by a form of pseudo code:
sdk.register({id:4,key:’customMessage’,template:’<text>{{data.text}}</test><image style=”width:data.width”>{{data.url}}</image>})
register is the registration API provided by the message push SDK.
Step 502: the message pushing SDK receives a first calling request of a registration API of the message pushing SDK;
referring to fig. 6 in conjunction, the message pushing SDK65 receives a first call request from the research and development terminal to the registration API 66, and obtains template data of the custom message template from the first call request. Illustratively, this template data is also represented using JSON data.
Step 503: in response to the first invocation request, the message push SDK registers the first custom message template with the message push SDK (local).
The message pushing SDK acquires JSON data of the custom message template and then delivers the JSON data to a rendering engine 67 in the applet for template analysis of the custom message, so that flexible customization of the custom message is realized.
In summary, the method provided in this embodiment provides a fast and efficient way for registering a custom message template for a research and development engineer with a better programming capability by means of registering API calls. Under the registration mode, a message template configuration platform does not need to be specially established, and computing resources, storage resources and network resources of the server are saved.
Aiming at the using process of the custom message template:
fig. 7 shows a flowchart of a message pushing method according to an exemplary embodiment of the present application. The present 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 pushing SDK;
after the applet is started, the applet initializes the message push SDK. Illustratively, the initialization includes: and acquiring the basic configuration to initialize each function interface.
Step 702: establishing a message pushing path 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 a message push system. In the embodiment of the application, the online pushing service can adopt a third-party online pushing service provided by a third-party pushing service provider; the offline push service may employ a host system notification service.
Step 703: monitoring a first custom message from a message pushing path;
the message pushing path is a pushing path 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 a 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 pushing SDK through a third-party online pushing service provided by a third-party service provider.
Step 704: after the first custom message is monitored, analyzing a message type identifier of the first custom message;
after monitoring the first custom message, the message pushing SDK analyzes 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 self-defined message templates are registered in the message pushing SDK, and the self-defined message templates form a self-defined message template list. Each custom message template corresponds to a message type identifier, such as Datatype 2 or 3 or 4.
And the message pushing SDK determines a first self-defined message template corresponding to the message type identifier in the self-defined message template list.
For example, if the message type identifier Datatype in the first custom message is 0, the first custom message template is a custom message template 0; if the message type identifier Datatype in the first custom message is 1, the first custom message template is a custom message template 1; if the message type identifier Datatype in the first custom message is 2, 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 includes: definitions and descriptions of the various fields in the first custom message. And the message pushing SDK calls the 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 that supports multiple message contents. And 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 self-defined message template, rendering and displaying the assembled message contents. Wherein the types of the message content include: at least one of text, picture, audio, video, link, file, location, business card.
Referring to fig. 8, the message push configuration platform is run 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 combining more complicated message template types through a basic message template, for example, different message templates for android and iOS equipment, message pushing time and frequency and the like can be set.
The message informs the SDK to be integrated in the APP or in the applet. The functions of the message notification SDK include: initializing the SDK, registering a self-defined message template, establishing a message access of cloud communication, and monitoring and displaying messages. The method comprises the following steps that an initialization SDK is used for obtaining basic configuration to carry out initialization work of an interface; the registered 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 cannot meet the user requirement, the user can customize the message template, then the interface is called to be registered in the message notification SDK, and then customized message display can be carried out subsequently; the message monitoring and displaying module is mainly used for monitoring messages pushed by the server side, processing the messages, and calling the rendering engine to assemble the message template to be displayed on the user interface.
In summary, in the method provided in this embodiment, by utilizing the tolerance of the cloud communication to the message format and adopting the combination mechanism of "cloud communication + custom message template", the 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 achieved with less development workload.
The method provided by the embodiment also enables the same custom message to support the combination of various different types of message contents by combining a plurality of attribute fields in the custom message. The user can determine the self-defined message needed by the small program according to the actual scene requirement of the small program.
Fig. 9 is a block diagram illustrating a message push system according to an exemplary embodiment of the present application. The system comprises: the system comprises a first applet 112, a cloud communication system 120 and a second applet 142, wherein a message pushing SDK runs in the second applet 142, and a message pushing path is established between the cloud communication system 120 and the message pushing SDK.
The first applet 112 is configured to send a first custom message through the cloud communication system 120, where the first custom message conforms to a first custom message template;
the cloud communication system 120 is configured to send a first custom message to the second applet through a message push path;
the second applet 142 is 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 the embodiment, the message pushing path supports two forms of online pushing and offline pushing. Illustratively, the message push path includes: a third party online pushing system and a host program pushing platform.
And 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. Under the condition that the second applet 142 is in the online state, the first custom message sent by the first applet 112 is pushed to the second applet 142 used by the user through the online push service of the third-party SDK and the third-party IM service by the cloud communication system 120.
And the host program push platform is used for realizing offline push. Under the condition 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 through the host program pushing platform by the cloud communication system 120, and the host program calls the second applet 142 to process the second custom message. In an offline pushing scenario, the second applet 142 receives 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 the host program pushing platform when the second applet is in an offline state. And responding to the second calling request, switching the second small program from the offline state to the online state, and displaying a user interface related to the second custom message.
In some embodiments, the message push system described above also 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 sending 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 calling. 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 is determined according to the calling.
Taking the host program as the wechat program as an example, the wechat program provides 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. After receiving the custom message, the cloud communication system 120 generates a pre-transmission callback and a post-transmission callback to the host program push platform, and the callbacks trigger the host system session service to know whether the second applet is online or not. The host system session service judges whether the second applet of the receiving end is online or not through the cloud communication system 120, and if the second applet of the receiving end is online, the cloud communication system 120 performs online forwarding through a third-party online push service; and if the second applet at the receiving end is not on-line, converting the message into a WeChat service notification provided by the host program push platform, wherein the WeChat service notification is off-line push capability provided by the template notification message. The host program pushing platform sends the user-defined message to the WeChat of the receiver through the template notification message of the WeChat; at the same time, the host session service will store the message (permanently) in a database for viewing historical messages at any time.
In practical application, it can be found that a callback of a cloud communication system often fails, which may cause a part of message push to be lost. The message compensation mechanism includes: the cloud communication system 120 performs callback on the host system session service before sending the custom message, the cloud communication system 120 performs callback on the host system session service after sending the custom message, the cloud communication system 120 performs callback on the host system session service at the successful sending position of the system message, and the offline push capability (namely, host program push platform) of the host system session service is called in all three ways, so that the arrival rate of the message under the offline condition can be ensured to the maximum extent. In one possible example, the host program push platform is configured to determine that there is a message push loss or a message push failure when a pre-transmission callback is received and a post-transmission callback is not received, and send a second custom message to the second applet again in an offline push manner. The message compensation mechanism has the following capabilities: 1. calling offline push capacity at multiple places; 2. ensuring the idempotency of the message; 3. and pressure measurement is carried out, and the data processing capacity is not reduced under the condition of ensuring mass data.
Taking the second applet as an example of a doctor-version applet, the doctor-version applet realizes functions such as on-line inquiry, patient management and the like, and the applet realizes: the doctor can process the inquiry request of the patient, check the state of illness and give suggestions; the patient can establish a long-term communication relationship with the doctor through code scanning, and can conveniently acquire the consultation suggestion of the doctor in time at low cost; physicians can also accumulate high-value cases in small procedures.
In the functions, a large number of scenes of interaction of two ends of doctors and patients exist, and the functions have the following characteristics:
1. the user stays long. Unlike other tool-based applets, doctors and patients may 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 the doctor-patient communication attribute is strong, the patient can evaluate the diagnosis and treatment behaviors of the doctor. So doctor-version applets require extremely high immediate notification of messages.
Due to the characteristics, when a doctor or a patient stays in the small program, the doctor or the patient can receive important information in time so as to create conditions for efficient response of the doctor and the patient.
Based on the above goal, by adopting the technical scheme provided by the application, the instant reminding of important messages such as diagnosis and treatment, reports and the like in the small program can be realized, and a doctor can directly enter the corresponding user interface to respond through the instant reminding. Meanwhile, in the technical mechanism, besides the application scenes, the good message type, the expansibility of covering scenes and the superior performance of message pushing are also ensured.
Illustratively, when the applet displays the first user interface and receives that the first self-defined message belongs to the second user interface, the first self-defined message template is called to render the first self-defined message into a banner message, and the banner message is displayed on the first user interface.
Illustratively, the first user interface is displayed as the second user interface within the applet in response to a trigger 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 prescription application to you" is received. Because the user interface corresponding to the patient xx is focused on is corresponding to the custom message 71, the message pushing SDK displays the custom message 71 above the electronic prescription interface in a banner message mode. After clicking the custom message 71, the user can jump to the user interface corresponding to the focused attention patient xx for processing.
As shown in fig. 12, when the applet displays a doctor-patient chat interface, a custom message 71 "focus on patient xx, initiate a consultation application to you" is received. Because the self-defined message 72 corresponds to the consultation interface corresponding to the patient xx with the emphasis on attention, the message pushing SDK displays the self-defined message 72 above the doctor-patient chat interface in a banner message manner. After clicking the custom message 72, the user can jump to the consultation interface corresponding to the focused attention patient xx for processing.
As shown in FIG. 13, when the applet displays the patient interface, a custom message 73 "focus on patient review prescription New message" is received. Because the custom message 73 corresponds to the prescription order interface corresponding to the patient xx with the emphasis on attention, the message pushing SDK displays the custom message 73 on the patient education material interface in a banner message mode. After the user clicks the custom message 73, the user can jump to a prescription order interface corresponding to the focused attention patient xx for processing.
As shown in fig. 14, when the applet displays the article details interface, a custom message 74 "consultation order for patient xx has new message" is received. Because the self-defined message 74 corresponds to the consultation order interface corresponding to the patient xx with the emphasis on attention, the message pushing SDK displays the self-defined 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 a consult order interface for processing.
As shown in fig. 15, when the applet displays a doctor-patient chat interface, custom message 75 "patient xx reports, please refine the message" is received. Because the custom message 75 corresponds to the message perfection 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 can jump to the message completion interface for processing.
Fig. 16 is a block diagram of a message pushing apparatus provided in an exemplary embodiment of the present application, where the apparatus is applied to an applet, where the applet is a program that runs in dependence on a host program, and a message pushing SDK is run in the applet, and the method includes:
a monitoring module 1220, configured to monitor a first custom message of a message pushing path, where the message pushing path is a pushing path between the message pushing SDK and a cloud communication system, and a custom message template list corresponding to the applet is registered in the message pushing 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;
a displaying module 1260, configured to invoke the first custom message template to display the first custom message.
In an example of the present application, the determining module 1240 is configured to parse the 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 an example of the present application, the presentation 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 different types of message contents are assembled based on the first self-defined message template, rendering and displaying the assembled message contents;
wherein the types include: at least one of text, picture, audio, video, link, file, location, business card.
In one example of the present application, the apparatus further comprises:
an initializing module 1212, configured to initialize the message push SDK;
an establishing module 1214, configured to establish the message pushing path between the message pushing 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 push 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 push configuration platform;
and registering the first custom message template to the message pushing SDK.
In one example of the present application, the apparatus further comprises:
the receiving module 1282 is configured to receive a call request for a registration API of the message push SDK;
the determining module 1240 is configured to register the first custom message template to the message push SDK in response to the invoking 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, in response to the second invocation request, switch the applet from the offline state to the online state, and display a user interface associated with the second custom message.
In an example of the present application, the presentation module 1260 is configured to invoke the first custom message template to render the first custom message into a banner message when the applet displays a first user interface and the first custom message belongs to a second user interface, and display the banner message on the first user interface.
In an example of the present application, the presentation module 1260 is configured to switch and display the first user interface as the second user interface within the applet in response to a trigger 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 video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Computer device 1300 may also be referred to by other names such as user device, portable computer device, laptop computer device, desktop computer device, and so forth.
Generally, 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. The processor 1301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1301 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, processor 1301 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The 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 push method provided by method embodiments herein.
In some embodiments, computer device 1300 may also optionally include: a peripheral interface 1303 and at least one peripheral. Processor 1301, memory 1302, and peripheral interface 1303 may be connected by a bus or signal line. Each peripheral device may be connected to the peripheral device interface 1303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1304, display screen 1305, camera assembly 1306, audio circuitry 1307, positioning assembly 1308, and power supply 1309.
Peripheral interface 1303 may be used to connect at least one peripheral associated with I/O (Input/Output) to processor 1301 and 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, any one or two of the processor 1301, the memory 1302, and the peripheral device interface 1303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1304 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 1304 may communicate with other computer devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, 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 screen 1305 is a touch display screen, the display screen 1305 also has the ability to capture touch signals on or over the surface of the display screen 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 1305 may be one, providing the front panel of the computer device 1300; in other embodiments, the display 1305 may be at least two, respectively disposed on different surfaces of the computer device 1300 or in a folded design; in still other embodiments, the display 1305 may be a flexible display disposed on a curved surface or on a folded surface of the computer device 1300. Even further, the display 1305 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display 1305 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 1306 is used to capture images or video. Optionally, camera assembly 1306 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of a computer apparatus, and a rear camera is disposed on a rear surface of the computer apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1306 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1307 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, 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 realizing voice communication. The microphones may be multiple and placed at different locations on the computer device 1300 for stereo sound acquisition or noise reduction purposes. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1301 or the radio frequency circuitry 1304 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 1307 may also include a headphone jack.
The Location component 1308 is used to locate the current geographic Location of the computer device 1300 for navigation or LBS (Location Based Service). The Positioning component 1308 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 1309 is used to supply power to the various components in the computer device 1300. The power source 1309 may be alternating current, direct current, disposable or rechargeable. When the power source 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, gyro sensor 1312, pressure sensor 1313, fingerprint sensor 1314, optical sensor 1315, and proximity sensor 1316.
The acceleration sensor 1311 may detect the magnitude of acceleration in 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. The processor 1301 may control the touch display screen 1305 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1311. The acceleration sensor 1311 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1312 may detect a body direction and a rotation angle of the computer device 1300, and the gyro sensor 1312 may cooperate with the acceleration sensor 1311 to collect a 3D motion of the user with respect to the computer device 1300. Processor 1301, based on the data collected by gyroscope sensor 1312, may perform the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 1313 may be disposed on the side bezel of the computer device 1300 and/or underneath the touch display 1305. When the pressure sensor 1313 is disposed on the side frame of the computer device 1300, a user's holding signal to the computer device 1300 may be detected, and the processor 1301 performs left-right hand recognition or shortcut operation according to the holding signal acquired by the pressure sensor 1313. When the pressure sensor 1313 is disposed at a lower layer of the touch display screen 1305, the processor 1301 controls an operability control on the UI interface according to a pressure operation of the user on the touch display screen 1305. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1314 is used for collecting the fingerprint of the user, and the processor 1301 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 1314, or the fingerprint sensor 1314 identifies the identity of the user according to the collected fingerprint. When the identity of the user is identified as a trusted identity, the processor 1301 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 1314 may be disposed 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 the ambient light intensity. In one embodiment, the processor 1301 can control the display brightness of the touch display screen 1305 according to the intensity of the ambient light collected by the optical sensor 1315. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1305 is increased; when the ambient light intensity is low, the display brightness of the touch display 1305 is turned down. In another embodiment, the processor 1301 can also dynamically adjust the shooting parameters of the camera assembly 1306 according to the ambient light intensity collected by the optical sensor 1315.
The proximity sensor 1316, also known as a distance sensor, is typically disposed on a front panel of the computer device 1300. The proximity sensor 1316 is used to capture the distance between the user and the front face of the computer device 1300. In one embodiment, the touch display 1305 is controlled by the processor 1301 to switch from the bright screen state to the dark screen state when the proximity sensor 1316 detects that the distance between the user and the front face of the computer device 1300 gradually decreases; the touch display 1305 is controlled by the processor 1301 to switch from the breath-screen state to the light-screen state when the proximity sensor 1316 detects that the distance between the user and the front surface of the computer device 1300 is gradually increasing.
Those skilled in the art will appreciate that the architecture shown in FIG. 17 is not intended to be limiting of the computer device 1300, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The present application further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the message pushing method provided by the above method embodiment.
Optionally, the present application also provides a computer program product containing instructions, which when run on a computer device, causes the computer device to execute the message pushing method of the above aspects.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits 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 instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A message pushing method is applied to an applet, wherein the applet is an application which provides a running environment by using a host program, and a message pushing Software Development Kit (SDK) runs in the applet, and the method comprises the following steps:
monitoring a first custom message from a message pushing path, wherein the message pushing path is a pushing path between the message pushing SDK and a cloud communication system, 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.
2. The method of claim 1, wherein determining a first custom message template corresponding to the first custom message in a list of custom message templates when the first custom message is monitored comprises:
when the first self-defined message is monitored, analyzing a message type identifier of the first self-defined message;
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 said 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 different types of message contents are assembled based on the first self-defined message template, rendering and displaying the assembled message contents;
wherein the types include: at least one of text, picture, audio, video, link, file, location, business card.
4. The method of any of claims 1 to 3, further comprising:
initializing the message push SDK;
and establishing the message pushing path between the message pushing SDK and the cloud communication system.
5. The method of any of claims 1 to 3, further comprising:
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 push configuration platform;
and registering the first custom message template to the message pushing SDK.
6. The method of any of claims 1 to 3, further comprising:
receiving a call request of a registered Application Program Interface (API) of the message pushing SDK;
and responding to the calling request, and registering the first custom message template to the message pushing SDK.
7. The method of any of claims 1 to 3, further comprising:
receiving a second call request of the host program, wherein the second call request is generated by the host program after a second self-defined message is triggered, and the second self-defined message is pushed to the host program by a host program push platform when the applet is in an offline state;
and responding to the second calling request, switching the small program from the offline state to the online state, and displaying a user interface related to the second custom message.
8. The method of claim 1, wherein said invoking the first custom message template to expose the first custom message comprises:
and when the small program displays a first user interface and the first self-defined message belongs to a second user interface, calling the first self-defined message template to render the first self-defined message into a banner message, and displaying the banner message on the first user interface.
9. A message pushing apparatus, wherein the apparatus runs in an applet, the applet is an application that provides a running environment by using a host program, and a message pushing software development kit SDK runs in the applet, and the method comprises:
the monitoring module is used for monitoring a first custom message of a message pushing path, wherein the message pushing path is a pushing path between the message pushing SDK and a 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, characterized in that the computer device comprises: a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the message pushing method according to any one of claims 1 to 8.
11. A message push system, the system comprising: the system comprises a first small program, a cloud communication system and a second small program, wherein a message pushing Software Development Kit (SDK) is operated in the second small program, and a message pushing channel is established between the cloud communication system and the message pushing SDK;
the first applet is used for sending a first custom message through the cloud communication system, and 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 access, 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 push platform;
the cloud communication system is also 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 calling.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is loaded and executed by a processor to implement the message pushing method according to any one of claims 1 to 8.
CN202011377809.8A 2020-11-30 2020-11-30 Message pushing method, device, equipment and storage medium Active CN112420217B (en)

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 true CN112420217A (en) 2021-02-26
CN112420217B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113271250A (en) * 2021-04-20 2021-08-17 长沙市到家悠享家政服务有限公司 Multi-channel multi-format instant message forwarding method, system and computer equipment
CN114125047A (en) * 2021-11-10 2022-03-01 携程商旅信息服务(上海)有限公司 Message pushing method, system, equipment and storage medium based on third-party system
CN115208846A (en) * 2022-07-08 2022-10-18 武汉联影医疗科技有限公司 Session interaction method and system
CN116582585A (en) * 2023-07-07 2023-08-11 Tcl通讯科技(成都)有限公司 Message pushing method, device, medium and equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198365A1 (en) * 2003-11-19 2005-09-08 Wei Coach K. System and method for stateful web-based computing
US20060240851A1 (en) * 2003-03-21 2006-10-26 Vocel, Inc. Interactive messaging system
US20130084896A1 (en) * 2011-09-29 2013-04-04 International Business Machines Corporation Pushing Secure Notifications to Mobile Computing Devices
US20150106456A1 (en) * 2013-10-10 2015-04-16 Jvl Ventures, Llc Systems, methods, and computer program products for managing communications
WO2015101357A1 (en) * 2014-01-06 2015-07-09 Tencent Technology (Shenzhen) Company Limited Method and system for pushing web application message
US20160087925A1 (en) * 2014-09-24 2016-03-24 Yahoo! Inc. System and method for auto-formatting messages based on learned message templates
US20170093998A1 (en) * 2015-09-28 2017-03-30 Facebook, Inc. Providing notifications on online social networks
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

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060240851A1 (en) * 2003-03-21 2006-10-26 Vocel, Inc. Interactive messaging system
US20050198365A1 (en) * 2003-11-19 2005-09-08 Wei Coach K. System and method for stateful web-based computing
US20130084896A1 (en) * 2011-09-29 2013-04-04 International Business Machines Corporation Pushing Secure Notifications to Mobile Computing Devices
US20150106456A1 (en) * 2013-10-10 2015-04-16 Jvl Ventures, Llc Systems, methods, and computer program products for managing communications
WO2015101357A1 (en) * 2014-01-06 2015-07-09 Tencent Technology (Shenzhen) Company Limited Method and system for pushing web application message
US20160087925A1 (en) * 2014-09-24 2016-03-24 Yahoo! Inc. System and method for auto-formatting messages based on learned message templates
US20170093998A1 (en) * 2015-09-28 2017-03-30 Facebook, Inc. Providing notifications on online social networks
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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113271250A (en) * 2021-04-20 2021-08-17 长沙市到家悠享家政服务有限公司 Multi-channel multi-format instant message forwarding method, system and computer equipment
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 pushing method, system, equipment and storage medium based on third-party system
CN115208846A (en) * 2022-07-08 2022-10-18 武汉联影医疗科技有限公司 Session interaction method and system
CN115208846B (en) * 2022-07-08 2023-06-09 武汉联影医疗科技有限公司 Session interaction method and system
CN116582585A (en) * 2023-07-07 2023-08-11 Tcl通讯科技(成都)有限公司 Message pushing method, device, medium and equipment
CN116582585B (en) * 2023-07-07 2023-11-14 Tcl通讯科技(成都)有限公司 Message pushing method, device, medium and equipment

Also Published As

Publication number Publication date
CN112420217B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN112947823B (en) Session processing method, device, equipment and storage medium
CN108845856B (en) Object-based synchronous updating method and device, storage medium and equipment
CN112420217B (en) Message pushing method, device, equipment and storage medium
CN108874496B (en) Application management 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
CN113204298A (en) Method and device for displaying release progress, electronic 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
CN112163406A (en) Interactive message display method and device, computer equipment and storage medium
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN112749362A (en) Control creating method, device, equipment and storage medium
CN113747199A (en) Video editing method, video editing apparatus, electronic device, storage medium, and program product
CN112988254A (en) Method, device and equipment for managing hardware equipment
CN112148499A (en) Data reporting method and device, computer equipment and medium
CN112311661B (en) Message processing method, device, equipment and storage medium
CN109995804B (en) Target resource information display method, information providing method and device
CN113837709A (en) Online processing method and device of business process, terminal and readable storage medium
CN111399717B (en) Method, device, equipment and storage medium for publishing contents
CN113485596A (en) Virtual model processing method and device, electronic equipment and storage medium
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN113064981A (en) Group head portrait generation method, device, equipment and storage medium
CN113204724A (en) Method and device for creating interactive information, electronic equipment and storage medium
CN115248939A (en) Data verification method, device, equipment and storage medium
CN112860522A (en) Program operation monitoring method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
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