CN115114044A - Message pushing method, device, equipment and medium - Google Patents

Message pushing method, device, equipment and medium Download PDF

Info

Publication number
CN115114044A
CN115114044A CN202110574237.0A CN202110574237A CN115114044A CN 115114044 A CN115114044 A CN 115114044A CN 202110574237 A CN202110574237 A CN 202110574237A CN 115114044 A CN115114044 A CN 115114044A
Authority
CN
China
Prior art keywords
message
service
channel
pushing
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110574237.0A
Other languages
Chinese (zh)
Inventor
董超峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to US17/539,488 priority Critical patent/US11799982B2/en
Publication of CN115114044A publication Critical patent/CN115114044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message pushing method, a message pushing device and a message pushing medium, wherein the message pushing method comprises the steps of receiving a message pushing request, wherein the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal for receiving the target message and a channel identifier of a service channel for pushing the target message; and pushing the target message to the target terminal according to the channel identifier so as to realize a multi-protocol extensible message pushing method.

Description

Message pushing method, device, equipment and medium
Technical Field
The present disclosure relates generally to the field of message processing technologies, and in particular, to a message pushing method, apparatus, device, and medium.
Background
In a corporate governance framework, message pushing is already very popular, and it is timeliness that message pushing is taught to a receiver, and accuracy and correctness of data statistics are required for a pusher.
In the related art, the message push platform is generally limited in that the number of push protocols can only carry out message push through a fixed protocol channel, and the compatibility is poor, or when a push protocol mode is added, secondary development is required to bring use difficulty to an application layer.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a message pushing method, apparatus, device and medium to implement a multiprotocol extensible message pushing method.
In a first aspect, the present application provides a message pushing method, including:
receiving a message pushing request, wherein the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message and a channel identifier of a service channel for pushing the target message;
and pushing the target message to the target terminal according to the channel identifier.
In some embodiments, a communication interface corresponding to the service channel is queried according to the channel identifier, where the communication interface is a message transmission path established when the service channel and a service unit establish a binding relationship;
and pushing the target message to the target terminal through the communication interface.
In some embodiments, the pushing the target message to the target terminal through the communication interface includes:
extracting message data to be pushed from a stored message queue according to the message identification;
identifying validity of the message data when the push time is reached;
if the message data is valid, pushing the target message to the target terminal through the communication interface;
and if the message data is invalid, deleting the message data from the message queue.
In some embodiments, before the receiving a message push request, the method further includes:
receiving a binding request for binding the service channel, wherein the binding request carries interface information of the communication interface and a service identifier of the service unit;
and establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier.
In some embodiments, the method further comprises:
acquiring a channel identifier of the server channel and configuration information corresponding to the channel identifier;
generating an interface frame of the service channel according to the channel identifier and the configuration information;
and configuring the interface information corresponding to the service channel based on the interface framework.
In some embodiments, the service identifier includes an item identifier, the service channel establishes a binding relationship with each service unit, and the establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier includes:
inquiring and acquiring at least one service unit conforming to the project identification from a service unit list according to the project identification;
and for each service unit, establishing a message transmission channel between the service channel and the service unit by using the interface information so as to establish a binding relationship between the service channel and the service unit.
In some embodiments, the service identifier includes an item identifier, the service channel establishes a binding relationship with any one of the service units, and the establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier includes:
inquiring and acquiring at least one service unit conforming to the project identification from a service unit list according to the project identification;
identifying a first service unit from at least one of the service units for which a binding relationship is not established;
and establishing a message transmission channel between the service channel and the first service unit by using the interface information so as to establish a binding relationship between the service channel and the first service unit.
In some embodiments, the pushing request further includes an item identifier, and the querying a communication interface corresponding to the service channel according to the channel identifier includes:
according to the item identification, inquiring a second service unit which is consistent with the item identification from a service unit list;
acquiring a first channel identifier of the service channel having a binding relationship with the second service unit;
and inquiring a first service channel conforming to the channel identifier from the first channel identifier, and acquiring a communication interface corresponding to the first service channel.
In some embodiments, when there is a binding relationship between the service channel and each service unit, the pushing the target message to the target terminal through the communication interface includes:
aiming at each second service unit, acquiring a message pushing task stock of the second service unit;
and sending the message pushing request to the second service unit with the minimum message pushing task stock so as to push the target message to the target terminal through a communication interface corresponding to the service channel bound with the second service unit.
In a second aspect, an embodiment of the present application provides a message pushing method, including:
calling a configuration interface for message pushing, wherein the configuration interface comprises a strategy control for configuring a message pushing strategy;
monitoring the strategy control, and acquiring a message identifier of a target message to be pushed, a terminal identifier of a target terminal for receiving the target message and a channel identifier of a service channel for pushing the target message;
generating a message pushing request according to the message identifier, the terminal identifier and the channel identifier;
and sending the message pushing request to a server so that the server queries a communication interface corresponding to the service channel according to the channel identifier in the pushing request, and pushes the target message to the target terminal through the communication interface, wherein the communication interface is a message transmission path established when the service channel and a service unit establish a binding relationship.
In some embodiments, the configuration interface further comprises a binding control of the service channel, the server comprises at least one service unit, and the method further comprises:
monitoring the binding control to acquire interface information of the communication interface and a service identifier of a service unit;
generating a binding request according to the interface information and the service identifier;
and sending the binding request to the server so that the server establishes a binding relationship between the service channel and the service unit according to the binding request.
In some embodiments, receiving statistical information sent by the server, wherein the statistical information is generated by the server according to a pushing result of the target information;
and when a statistical query instruction is received, generating and displaying a statistical information display interface according to the statistical information.
In a third aspect, an embodiment of the present application provides a message pushing apparatus, including:
a receiving module, configured to receive a message pushing request, where the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal that receives the target message, and a channel identifier of a service channel used for pushing the target message;
the query module is used for querying a communication interface corresponding to the service channel according to the channel identifier, wherein the communication interface is a message transmission path established when the service channel and a service unit establish a binding relationship;
and the pushing module is used for pushing the target message to the target terminal through the communication interface.
In a fourth aspect, an embodiment of the present application provides a message pushing system, including:
a display device;
an electronic device in communication with the display device, the electronic device being configured to perform the method of the first aspect and/or the method of the second aspect.
In a fifth aspect, embodiments of the present application provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method described in the embodiments of the first aspect or the second aspect of the present application is implemented.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a method as described in embodiments of the first or second aspect of the present application.
According to the embodiment of the application, the target message can be pushed to the target terminal according to the binding relationship between the service channel and the service unit which are established in advance after the message pushing request is received. The method and the system for pushing the messages package the protocol services of various message pushing in the server in advance, and the users can directly realize message pushing through message pushing requests after binding the service units to the corresponding service channels, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic view of an application scenario of a message pushing method according to an embodiment of the present application;
fig. 2 is a flowchart of a message pushing method according to an embodiment of the present application, which is applied to a server side;
fig. 3 is a flowchart of another message pushing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a connection relationship between a service channel and a service unit according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating another connection relationship between a service channel and a service unit in the embodiment of the present application;
fig. 6 is a schematic diagram illustrating a message pushing method according to an embodiment of the present application;
fig. 7 is a signaling interaction diagram of a message pushing method according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating a processing principle of message data according to an embodiment of the present application;
fig. 9 is a flowchart of another message pushing method proposed in the embodiment of the present application, applied to a background server side;
fig. 10 is a schematic structural diagram of a message pushing apparatus according to an embodiment of the present application, applied to a server side;
fig. 11 is a schematic structural diagram of a message pushing apparatus according to an embodiment of the present application, which is applied to a background server side;
fig. 12 is a schematic block diagram of a computer system suitable for implementing an electronic device or a server according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
A specific implementation environment of the message pushing method provided in the present application is shown in fig. 1. Fig. 1 shows a schematic view of an application scenario of a message pushing method provided in an embodiment of the present application, as shown in fig. 1, an electronic device 3, a backend server 1 of the electronic device, and a server 2 are involved in the application scenario of the embodiment, where the backend server 1 of the electronic device is configured to control display content of the electronic device 3 and receive an instruction or information input by a user through the electronic device 3, and the server 2 communicates with the backend server 1, receives a message pushing request sent by the backend server 1, and issues the received message pushing request to a dynamically configured service unit Broker, so that the service unit Broker executes the message pushing request, and feeds back an executed statistical result to the backend server 1. For example, the display interface of the electronic device 3 shows a message pushing management system, through which a user wants to send a target message to a target terminal, for example, the user configures a pushing policy of the target message to be pushed in the interface of the message pushing management system, then performs a "message pushing" operation by clicking with a mouse or a finger, triggers a pushing request of the user for the target message, where the pushing request carries the pushing policy of the target message, then the background server 1 sends the pushing request of the user for the target message to the server 2, after the server 2 receives the pushing request of the user for the target message, the server 2 executes a message pushing method provided in the embodiment of the present application, pushes the target message to the target terminal according to a service channel interface in the pushing policy, and according to a pushing result of the target message, and generating statistical information, sending the statistical information to the background server 1, pushing the statistical information to the electronic equipment 3 by the background server 1, and then displaying a message pushing result of the user by the electronic equipment 3.
The background server 1 and the server 2 may be integrated or separately configured, and the present application is not limited herein. For example, when the cloud server is separately configured, the background server 1 may be a control device of a local computer of a user, and the server 2 may be a cloud server remotely configured; for another example, in the integrated setting, the background server 1 communicates with the electronic device (display device) 3 to control the electronic device, and the background server 1 and the server 2 realize data transmission through internal signal transmission.
It should be noted that the application scenario shown in fig. 1 is only an example, and the present invention is not limited to this.
In order to further explain the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide the following embodiments or steps of the method operation instructions shown in the drawings, more or less steps of the operation instructions may be included in the method based on the conventional or non-inventive labor. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method may be executed in sequence or in parallel according to the method shown in the embodiment or the figures when the method is executed in an actual processing procedure or an apparatus.
Fig. 2 is a flowchart of a message pushing method according to an embodiment of the present disclosure. It should be noted that, an execution main body of the message pushing method of this embodiment is a message pushing device, the message pushing device may be implemented by software and/or hardware, and the message pushing device in this embodiment is configured in a server.
As shown in fig. 2, a message pushing method provided in the embodiment of the present application includes the following steps:
step 101, receiving a message pushing request, where the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message, and a channel identifier of a service channel for pushing the target message.
It should be noted that, a background server of the electronic device monitors an interactive interface of the electronic device, obtains a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message, and a channel identifier of a service channel for pushing the target message, which are input by a user in the interactive interface, and generates a message pushing request according to the message identifier, the terminal identifier, and the channel identifier, and the background server sends the message pushing request to the server, and the server receives the message pushing request.
The service channel is used for providing a service of a message push protocol, the service channel is bound with the service unit through the communication interface, and the State, the message push message format, the data statistics and the like of the channel are encapsulated inside the service channel and provided in a REST (REpresentational State Transfer) service mode.
And step 102, pushing the target message to the target terminal according to the channel identifier.
In some embodiments, pushing the target message to the target terminal according to the channel identifier includes: and inquiring a communication interface corresponding to the service channel according to the channel identifier, wherein the communication interface is a message transmission path established when the service channel and the service unit establish a binding relationship, and the target message is pushed to the target terminal through the communication interface.
That is, the binding relationship between the service tunnel and the service unit may be established in advance, and the message transmission path between the service unit and the service tunnel may be established through the communication interface when the binding relationship is established. After the message pushing request is obtained, a communication interface corresponding to the service channel can be inquired according to the binding relationship between the service channel and the service unit by the channel identifier.
Specifically, the server receives a message pushing request sent by the background server, then analyzes the message pushing request to obtain a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message and a channel identifier of a service channel used for pushing the target message, queries a communication interface corresponding to the service channel in a binding relationship between the service channel and a service unit according to the channel identifier, and pushes the target message to the target terminal through the queried communication interface.
Therefore, after receiving the message pushing request, the embodiment of the application can push the target message to the target terminal according to the binding relationship between the service channel and the service unit established in advance. The method and the system for pushing the messages package the protocol services of various message pushing in the server in advance, and the users can directly realize message pushing through message pushing requests after binding the service units to the corresponding service channels, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
In this embodiment of the present application, as shown in fig. 3, before receiving the message push request, the method further includes:
step 201, receiving a binding request for binding the service channel, where the binding request carries interface information of the communication interface and a service identifier of the service unit.
Step 202, according to the interface information and the service identifier, a binding relationship between the service channel and the service unit is established.
Specifically, before the background server sends a message pushing request to the server, the background server sends a binding request to the server, the background server acquires interface information of a communication interface used for binding a service channel and a service identifier of a service unit through monitoring of the electronic device, then generates the binding request according to the interface information and the service identifier, and sends the binding request to the server, so that the server establishes a binding relationship between the service channel and the service unit according to the interface information and the service identifier in the binding request.
Therefore, the method and the device have the advantages that the expansion capacity of the server for realizing message pushing is increased by expanding the service channel bound with the service unit through the binding request, the secondary development is not needed by a user, and the protocol service of the message pushing can be increased only by inputting the corresponding binding request.
It should be noted that, the interface information of the communication interface for service channel binding may be obtained in advance according to the following method, and then provided to the user through the interactive interface of the electronic device, so that the user may describe the binding request according to the interface information provided in the interactive interface.
Optionally, the channel identifier of the service channel and the configuration information corresponding to the channel identifier are obtained, an interface frame of the service channel is generated according to the channel identifier and the configuration information, and the interface information corresponding to the service channel is configured based on the interface frame.
The channel identifier may include a type and a provider of the channel, for example, an ariloc sms push service channel, a 163 mailbox push service channel, and the like. In order to obtain the configuration information corresponding to the channel identifier, the configuration information such as the server component, the gateway template and the like of the service channel can be obtained by looking up the access specification of the relevant service channel.
Wherein, can use the scaffold tool according to channel identification and configuration information, generate the interface frame of the service channel, the interface frame obtained contains the complete functional information of the same type channel, for example:
a. unified HTTP foreign services: managing external service capability of the system and integrating an API interface;
b. the channel docking protocol is various: the diversity of user requirements and the diversity of a third-party platform require that channel access must have access capability of various protocols;
c. non-functional requirements such as uniform deployment, dependence and the like: uniformly defining a dependence definition document of a system library, an automation script of a system, a compiling script and the like;
swagger UI: the UI is tested through the unified interface, so that quick test and function verification are facilitated;
f. version management: managing versions of access platforms, versions of systems themselves, dependent versions of compilation environments, and the like;
g. description documents: including architecture description documents, API description documents, operation manuals, etc.;
API: generic API interfaces such as:
(1) registering: registering templates, server address information, identity information and the like with a Broker;
(2) the channel state is as follows: basic attribute information of the channel, ID, type, version, address, maintainer information, starting time, issuing message interface, platform registration interface, compiling information and the like;
(3) message pushing: receiving a message pushed by an access party, carrying out validity detection, and then pushing the message to a target terminal;
(4) statistical analysis: uniformly packaging the platform statistical information butted by the channels, and then synchronizing access parties;
(5) health examination: the system is used for detecting whether the channel service is on line or not and whether the operation is abnormal or not;
(6) system monitoring: the method supports mainstream Prometous monitoring and can be directly accessed to a monitoring platform;
it should be noted that the content is the content of the common module of the interface of the service channel, that is, when the service channel and the server establish a binding relationship, the API part needs to perform necessary conversion, encapsulate the accessed platform or service, and get through the whole service flow. The content of the public module can be stored in the server Broker, and when the binding relationship between the service unit and the service channel needs to be established, the public module information is called and personalized conversion is carried out according to the corresponding service channel information.
Specifically, after the channel identifier and configuration information of the service channel are obtained, necessary parameters for generating the service channel are input to a scaffold tool (an automatic tool for creating a project basic file, such as a basic structure for creating a project, a specification and an order for providing a project, and the like), an interface frame of the service channel is generated, the interface frame includes a common module of the service channel, and then the interface frame is utilized to obtain final interface information of the service channel through fine tuning. And performing interface bootstrap on an interactive interface of the electronic equipment through displaying interface information, wherein the interface bootstrap is that the channel interface displays interface parameters in the interactive interface, and preferably, the interface displays personalized interface parameters in the interactive interface. Among other things, interface bootstrapping may use the JSON architecture.
Examples are:
Figure BDA0003083696960000101
Figure BDA0003083696960000111
preferably, the binding request may further include a customized service channel access specification, which may adopt a JSON format and mainly include the following interface definitions:
1. state (/ status): defining self state data of the channel and a data interface format of the push message;
2. push (/ publish): a message push interface;
3. statistics (/ statistics): pushing result data statistics;
4. query (/ config): issuing a configuration query;
the uniform interface information abstraction may be:
type ChannelService interface{
Status()string
Metrics()
Register()string
Statistics()string
Publish(string)error
Keepalive()error
}
therefore, the method and the device have the advantages that the interface definition is carried out when the service channel and the service unit are bound, the problem of service channel expansion and the condition of single protocol are solved, and meanwhile the problem of inconsistent message formats of different service channels is also solved. Further, when the traffic volume of message pushing of the user is huge, the server will generally increase the parallel processing capability by dynamically configuring corresponding service units. There are several options for performing the binding of the extended service channel.
In some embodiments, the service identifier includes an item identifier, and the service channel establishes a binding relationship with each service unit, as shown in fig. 4, and the establishing of the binding relationship between the service channel and the service unit according to the interface information and the service identifier includes: and inquiring and acquiring at least one service unit corresponding to the item identifier from the service unit list according to the item identifier, and establishing a message transmission channel between the service channel and the service unit by utilizing the interface information aiming at each service unit so as to establish a binding relationship between the service channel and the service unit.
Wherein, the item identifier can be the name of the message pushing rule set by the user, such as a campus item, a bank item, a city item, etc.
Specifically, the server provides a plurality of service unit services and the item identifier, at this time, in order to improve the concurrency capability of the service units, a service unit list of the server may be acquired, then at least one service unit corresponding to the item identifier is queried and acquired from the service unit list according to the item identifier, the service channels corresponding to the binding request are respectively bound with each queried service unit by using the interface information, and a message transmission channel is established.
Optionally, when performing message pushing, the server may randomly issue the message pushing request to any one of the plurality of service units corresponding to the item identifier after receiving the message pushing request, and when the service volume of the pushed message is large, the server may issue the terminal identifier carried in the message pushing request to the plurality of service units according to a preset ratio, so that the plurality of service units can perform message pushing simultaneously, and the message pushing efficiency is improved.
Preferably, in the embodiment of the present application, each service unit is bound to the MQTT cluster channel of the online service channel when configured, so as to send the target message to the online terminal device of the network, thereby effectively improving the push efficiency of the target message and ensuring the timeliness of the online terminal device for receiving the target message.
That is, after receiving the message push request, the service unit determines whether the terminal is an online device according to the terminal identifier of the target terminal, for example, whether the target terminal is online may be determined by communicating with an application installed in the target terminal, if the target terminal is online, the target message is pushed to the target terminal through the MQTT cluster channel, and if the target terminal is offline, the target message is pushed to the target terminal according to the channel identifier carried in the message push request. Optionally, the MQTT cluster channel also has a corresponding channel identifier, and the push message request may include the MQTT cluster channel identifier and a channel identifier of at least one offline service channel at the same time, where the offline service identifier includes an X system channel, a Y system channel, and a Z system channel shown in fig. 6, where the X system channel, the Y system channel, and the Z system channel may be a vendor service channel, a short message channel, a mail channel, and the like.
Therefore, the method and the device can provide more message pushing mode selectivity for the user by setting multiple channels, for example, the user can select to use a mail channel to push messages during working hours, so that the enterprise user can conveniently push messages to employees, the user can select to use a short message channel to push messages during working hours, the receiving rate of the message pushing can be further ensured, and an MQTT channel and a manufacturer channel can be selected for product promotion enterprises so as to ensure that the messages can be received by the users related to the enterprises to obtain effective information.
In other embodiments, the service identifier includes an item identifier, and the service channel establishes a binding relationship with any service unit, as shown in fig. 5, the establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier includes: inquiring and acquiring at least one service unit corresponding to the item identifier from the service unit list according to the item identifier, identifying a first service unit without establishing a binding relationship from the at least one service unit, and establishing a message transmission channel between the service channel and the first service unit by using the interface information so as to establish the binding relationship between the service channel and the first service unit.
Wherein, the item identifier can be the name of the message pushing rule set by the user, such as a campus item, a bank item, a city item, etc.
Specifically, the server provides a plurality of service unit services and the item identifier, at this time, in order to improve the concurrency capability of the service units, a service unit list of the server may be acquired, then at least one service unit corresponding to the item identifier is queried and acquired from the service unit list according to the item identifier, then a first service unit not establishing a binding relationship is identified from the queried at least one service unit, at this time, it is determined that the service unit is a new service unit established by the server in response to the binding request, a service channel corresponding to the binding request and the queried first service unit not establishing the binding relationship are bound by using the interface information, and a message transmission channel is established.
Optionally, when performing message pushing, after receiving the message pushing request, the server may classify the terminal identifier according to the channel identifier of the service channel, and then issue the terminal identifier to the service unit corresponding to the channel identifier according to the classification result, so that the plurality of service units can simultaneously push messages executing multiple different protocols, thereby improving the message pushing efficiency.
Specifically, the push request further includes an item identifier, and queries a communication interface corresponding to the service channel according to the channel identifier, including: and according to the item identifier, inquiring a second service unit which is consistent with the item identifier from the service unit list, acquiring a first channel identifier of a service channel which has a binding relationship with the second service unit, inquiring a first service channel which is consistent with the channel identifier from the first channel identifier, and acquiring a communication interface corresponding to the first service channel.
That is to say, after the server receives the message push request, the server parses the message push request, obtains an item identifier for performing a current message push task, then queries, from a service unit list of the server, second service units corresponding to the item identifier according to the item identifier, that is, the second service units all serve the current item identifier, can execute the message push task issued by the item, then obtains a first channel identifier of a service channel having a binding relationship with the second service units, queries, from the first channel identifier, a first service channel corresponding to the channel identifier in the message push request, and obtains a communication interface corresponding to the first service channel.
It should be understood that, when the service channel is bound to the service unit according to the type, that is, when one service unit is bound to one service channel, the unique communication interface capable of executing the message pushing request can be directly obtained through the above steps, and the message pushing can be directly performed through the communication interface.
Optionally, when a binding relationship exists between the service channel and each service unit, the method for pushing the target message to the target terminal through the communication interface includes: and aiming at each second service unit, acquiring the message pushing task stock of the second service unit, and sending a message pushing request to the second service unit with the minimum message pushing task stock so as to push the target message to the target terminal through the communication interface corresponding to the service channel bound with the second service unit.
That is to say, when the binding relationships between the service units and the service channels are the same, the service units are in a parallel state, and at this time, the message push task inventory of the service units, that is, the unfinished message push task, can be obtained, and then the message push request is sent to the service unit with the smallest message push task inventory, so that the server can perform the current message push task as soon as possible after the message push task inventory is finished, thereby effectively improving the message push efficiency, and avoiding the problems of accumulation of the message push tasks, or long message push time and the like.
Furthermore, the server of the present application further stores a target message queue, and pushes a target message to a target terminal through a communication interface, including: extracting message data to be pushed from a stored message queue according to the message identification, identifying the validity of the message data when the pushing time is up, pushing a target message to a target terminal through a communication interface if the message data is valid, and deleting the message data from the message queue if the message data is invalid.
As shown in fig. 6, under the message pushing framework, a user may add message data to the message queue at any time, optionally, the message data may be message content that is repeatedly used, and when pushing a message, the message data to be submitted may be extracted from the message queue according to a message identifier in a message pushing request, so that the user does not need to re-enter the message data each time the user pushes a message, and the complexity of the user in pushing a message is effectively reduced.
Specifically, when the Message of the Message data is pushed for the first time, the Message data may be stored in the Message queue and assigned with a corresponding Message identifier, for example, a Message label such as Message1, Message2, etc., and then, when the Message data needs to be used in a later period, the user configures a Message pushing request according to the Message identifier and the pushing time, where the Message pushing time may be 0s in the pushing task and may be set according to the reserved time in the timing task, the server starts to time after receiving the Message pushing request, extracts the Message data to be pushed from the stored Message queue according to the Message identifier, identifies the validity of the Message data when the timing time reaches the pushing time, pushes the target Message to the target terminal through the communication interface if the Message data is valid, deletes the Message data from the Message queue if the Message data is invalid, and feeding back the reminding information of the message failure to the background server.
Therefore, the validity of the message data pushed by the message pushing task can be ensured, and poor reading experience brought to the terminal user by pushing invalid information is avoided.
The technical solution of the present application is described in detail below with reference to fig. 6 to 8.
The User configures the name of a project, such as Garden, an online service channel MQTT and a data storage unit PGSQL, through an interactive Interface (UI) provided by the electronic device, and binds the configured information with a service unit Broker named Garden, thereby establishing a framework for pushing the project by the message. And the data source of the interactive interface UI is provided for the background server Admin. Configuration information set by a user through an interactive interface UI is stored in a data storage unit PGSQL and/or a Broker through data of a dictionary structure for caching, and meanwhile, an independent coroutine is started to establish connection and heartbeat with each configuration server.
Specifically, a configuration interface pushed by a message is called by a background server Admin and displayed on a display device, a user inputs content information to be configured, such as an item name, on the display interface by using a keyboard, a mouse or touch operation, the background server monitors the content input on the display interface, acquires the configuration information of the item name of the user, then sends the item name to the server, the server receives the item name, inquires whether a service unit matched with the item name is currently configured, if so, continues to receive other information sent by the background server, if not, at least one service unit matched with the item name is configured, for example, when one service unit is established, the service unit can be Garden, when two service units are established, the two service units are respectively Garden1 and Garden2, so that a binding relationship exists between the service unit and the item name, the bound service unit is used for executing a message push request sent by the item bound with the service unit.
It should be understood that, when monitoring that a user configures a new project name on a display interface, the background server Admin also sends the configured project name to the ETCD for registration, where the ETCD is a reliable distributed KV storage, and a bottom layer of the ETCD uses a Raft algorithm to ensure consistency, and the background server Admin is mainly used for shared configuration and service discovery, that is, registering a newly-built project name in the ETCD, and correspondingly, after configuring a service unit corresponding to the project name, sending information of the service unit to the ETCD for registration, so that the ETCD binds the server Admin and the service unit Broker according to the project name.
Further, the user may also configure a data storage unit (e.g., PGSQL) on the display device, where the data storage unit is responsible for storing the message pushing result, the terminal registration information, the message pushing information, and the like. For example, backup storage of issued messages, management of user identity information and authority information, configuration information of an online service channel MQTT configured by a user through a display interface, storage of statistical analysis data fed back by a server to a background server, operation records sent by the background server to the server, and the like.
Furthermore, the user continues to configure interface information of the service channel through the interactive interface, the background server generates a binding request according to the interface information and sends the binding request to the server, so that the server binds the service channel with the service unit named Garden according to the interface information, wherein the service channel can include but is not limited to Huawei channel, millet channel, apple channel, mail channel, short message channel, Web channel, android channel and the like.
The encapsulation service of each service channel needs to register in the background server Admin, that is, interface information used for binding the service channel with the service unit is sent to the background server Admin, so that a user can bind the service unit with the service channel as required, the service channel is bound with a service unit Broker by adopting a GRPC protocol, waits for the service unit to issue a message, and sends the message to a target terminal according to a preset rule after receiving the message.
It should be understood that the service channels may also include service platforms, such as mail, HTTPS/HTTP, text messages, etc., each of which is independent of the service, actively registering with the ETCD.
Specifically, as shown in fig. 6, the service unit Broker includes a plurality of functional modules, such as a configuration management module, an MQTT management module, a general method module, a statistical analysis module, a message receiving end, a message sending end, and a message queue module. The message queue module receives message data through a message receiving end (independent thread), detects the validity of a message and stores the message into a message queue, so that the message sending end is used for pushing the message data to a target terminal when the message is required to be pushed. The configuration management module is used for maintaining a channel binding relationship issued by the background server and keeping heartbeat detection on the service channel, the MQTT management module is used for carrying out state detection and the like on the online equipment, the statistical analysis module is used for counting pushed message data, cached message number, online terminal number, offline terminal number, bound service channel data, system resource occupation and the like, and the universal method module is used for encapsulating some universal methods, such as a method for sending storage data to the sql, a method for connecting with the service channel, a method for heartbeat detection, a method for connecting with the MQTT, an external debugging interface and the like.
After the user configures a project framework for message pushing, the service unit collects registration information, heartbeat information and real-time message receipt of online equipment from an online service channel MQTT and performs statistics. The service unit statistical information may include, but is not limited to, the following:
1. the number of the terminals is counted from dimensions of manufacturers, online states, platform types, terminal types and the like;
2. maximum and minimum time-consuming durations for message pushing, total number of messages, message data, expired message number, cache message number and the like which are currently pushed;
3. the number of service channels, the number of service channels bound under the item identifier, the number of parallel service units and the like;
and 4, identifying the online time length of the corresponding service unit, the number of items, the total number of message pushing requests and the like by each item.
It should be understood that the server statistical information may be sent to the background server according to a preset frequency, so as to display the statistical interface generated by the server according to the statistics to the user, so that the user can know the execution condition of the message pushing task.
When a user needs to perform message pushing, the user logs in the message pushing system through the electronic device, and then configures conditions for pushing messages on the interactive interface, such as a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message, a channel identifier of a service channel for pushing the target message, and the like. The background server monitors an interactive interface provided by the electronic equipment, acquires configured message pushing information and generates a message pushing request, sends the message pushing request to the server, and simultaneously sends the message pushing request to a data storage unit PGSQL for backup.
The method comprises the steps that after a message pushing request sent by a background server is received by a server, the message pushing request is analyzed, message data to be pushed are extracted from a message queue for storing messages according to message identification, then the validity of the message data is identified when the pushing time is up, if the message data is valid, a target message is pushed to a target terminal through a communication interface, and if the message data is invalid, the message data is deleted from the message queue.
The server further sends the message data to be sent, the terminal identification and the channel identification to corresponding service identifications according to the binding condition of the service units and the service channels, then each service identification inquires the online terminal according to the terminal identification, sends the message data to the online target terminal through the online service channel MQTT, and then for the offline target terminal, the service units push the message data to the target terminal through the communication interface according to manufacturers of the target terminal, the terminal types and the like.
Preferably, in the embodiment of the present application, it needs to be ensured that any target terminal cannot be pushed repeatedly when message pushing is performed. For example, the target terminal is in an online state at an early stage of message pushing, and is switched to an offline state later, so that message pushing can be performed only once on the target terminal, and repeated message pushing in the online state and the offline state is avoided.
After the service unit pushes the message to the target terminal, the server further counts the message pushing result, and sends the counted pushing result to the background server according to the preset frequency so as to generate and display a counting interface through the background server.
Further, if a user needs to add new message pushing, for example, the user does not establish an apple channel when establishing a message pushing frame, and at this time, the user needs to add the apple channel, the user can configure interface information of the apple channel and service unit information for binding the apple channel through a display interface, and the background server generates a binding request according to the interface information and the service unit information and sends the binding request to the server, so that the service unit can add the bound apple channel, and thus, the message can be pushed to a mobile terminal produced by an apple manufacturer according to the apple channel.
As a specific embodiment, after the user completes configuration of the service unit Broker and the service channel (the service channel includes an MQTT cluster, a huaji channel, and a short message channel), when there is a message push requirement, the user configures a target message identifier and a target terminal identifier to be pushed in an interactive interface UI (the target terminal identifier can reflect that the target terminal belongs to the huaji brand), and simultaneously configures the service channel for message push:
if the push mode configured by the user is pushing only through the target application program APP, the service unit Broker selects a message push mode according to the online information of the target terminal acquired by the MQTT cluster service:
(1) if a target application program APP installed on the target terminal is in an online state, pushing a target message to the target terminal by using an MQTT cluster channel;
(2) if the target application program APP installed on the target terminal is in an offline state, acquiring an application ID of the application program in an application mall of a manufacturer to which the target terminal belongs, namely the application ID registered in the Hua-applied mall by the target application program APP, and then awakening the target application program APP by using the Hua-applied channel and sending a target message to the target terminal, or directly sending the target message to the target terminal by using the Hua-applied channel in an offline message manner;
if the push mode configured by the user comprises a target application program APP mode and a short message mode, the service unit Broker selects a message push mode according to the online information of the target terminal acquired by the MQTT cluster service:
(1) if the target application program APP installed on the target terminal is in an online state, pushing a target message to the target terminal by using an MQTT cluster channel;
(2) if a target application program APP installed on the target terminal is in an off-line state, pushing a target message to the target terminal by using a short message channel;
if the pushing mode configured by the user comprises a short message channel, directly pushing the target message to the target terminal by using the short message channel;
if the push mode configured by the user comprises a Huaqi channel and a short message channel, the service unit Broker determines whether the target terminal belongs to a Huaqi manufacturer according to the target terminal identification, if so, further judges whether the target terminal is provided with a target application program APP according to the MQTT cluster service, if the target terminal is provided with the target application program APP, the Huaqi channel is used for pushing the target message to the target terminal, and if the target terminal is not provided with the target application program APP, the short message channel is used for pushing the target message to the target terminal;
it should be noted that the manner in which the target terminal can receive the target message may be configured by way of a database table through the interactive interface UI. To sum up, the embodiment of the application can push the target message to the target terminal according to the binding relationship between the service channel and the service unit established in advance after receiving the message pushing request. According to the method and the system, multiple protocol services for message pushing are packaged in the server in advance, and the user can directly realize message pushing through the message pushing request after binding the corresponding service channel by the binding service unit, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
Fig. 9 is a flowchart of a message pushing method according to an embodiment of the present application. It should be noted that an execution main body of the message pushing method of this embodiment is a message pushing device, and the message pushing device may be implemented in a software and/or hardware manner, and the message pushing device in this embodiment is configured in the electronic device, and may also be configured in a background server for controlling the electronic device, where the background server communicates with the electronic device to further control the electronic device.
As shown in fig. 9, a message pushing method according to an embodiment of the present application includes the following steps:
step 301, a configuration interface for message pushing is called, and the configuration interface includes a policy control for configuring a message pushing policy.
Step 302, monitoring the policy control, and acquiring a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message, and a channel identifier of a service channel for pushing the target message;
step 303, generating a message pushing request according to the message identifier, the terminal identifier and the channel identifier.
Step 304, sending the message pushing request to the server, so that the server queries a communication interface corresponding to the service channel according to the channel identifier in the pushing request, and pushes the target message to the target terminal through the communication interface, where the communication interface is a message transmission path established when the service channel and the service unit establish a binding relationship.
In some embodiments, the configuration interface further comprises a binding control of the service channel, the server comprises at least one service unit, and the method further comprises: monitoring the binding control, and acquiring interface information of a communication interface and a service identifier of a service unit; generating a binding request according to the interface information and the service identifier; and sending the binding request to the server so that the server establishes the binding relationship between the service channel and the service unit according to the binding request.
In some embodiments, receiving statistical information sent by the server, wherein the statistical information is generated by the server according to a pushing result of the target information; and when a statistical query instruction is received, generating and displaying a statistical information display interface according to the statistical information.
It should be noted that details that are not disclosed in the message pushing method in the embodiment of the present application refer to details disclosed in the above embodiments of the present application, and are not described herein again.
To sum up, the embodiment of the present application can push the target message to the target terminal according to the binding relationship between the service channel and the service unit established in advance after receiving the message push request. According to the method and the system, multiple protocol services for message pushing are packaged in the server in advance, and the user can directly realize message pushing through the message pushing request after binding the corresponding service channel by the binding service unit, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
Fig. 10 is a schematic structural diagram of a message pushing apparatus according to an embodiment of the present application. It should be noted that the message pushing device in the embodiment of the present application is configured in a server, and the server communicates with a background server to receive a request sent by the background server and feed back a statistical result to the background server.
As shown in fig. 10, the message pushing apparatus 10 according to the embodiment of the present application includes:
a receiving module 11, configured to receive a message push request, where the message push request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal that receives the target message, and a channel identifier of a service channel used for pushing the target message;
and the pushing module 13 is configured to push the target message to the target terminal according to the channel identifier.
In some embodiments, the pushing module 13 is further configured to:
inquiring a communication interface corresponding to the service channel according to the channel identifier, wherein the communication interface is a message transmission channel established when the service channel and the service unit establish a binding relationship;
and pushing the target message to the target terminal through the communication interface.
Extracting message data to be pushed from a stored message queue according to the message identifier;
identifying validity of message data when push time is reached;
if the message data is valid, pushing the target message to the target terminal through the communication interface;
and if the message data is invalid, deleting the message data from the message queue.
In some embodiments, the receiving module 11 is further configured to:
receiving a binding request for binding the service channel, wherein the binding request carries interface information of the communication interface and a service identifier of the service unit;
and establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier.
In some embodiments, the service identifier includes an item identifier, the service channel establishes a binding relationship with each service unit, and the receiving module 11 is further configured to:
inquiring and acquiring at least one service unit corresponding to the item identifier from the service unit list according to the item identifier;
and establishing a message transmission channel between the service channel and the service unit by using the interface information aiming at each service unit so as to establish a binding relationship between the service channel and the service unit.
In some embodiments, the service identifier includes an item identifier, the service channel establishes a binding relationship with any service unit, and the receiving module 11 is further configured to:
inquiring and acquiring at least one service unit which is consistent with the item identifier from the service unit list according to the item identifier;
identifying a first service unit from the at least one service unit for which a binding relationship is not established;
and establishing a message transmission channel between the service channel and the first service unit by using the interface information so as to establish a binding relationship between the service channel and the first service unit.
In some embodiments, the query module 12 is further configured to:
according to the item identification, inquiring a second service unit which is consistent with the item identification from the service unit list;
acquiring a first channel identifier of a service channel having a binding relationship with a second service unit;
and querying a first service channel which is consistent with the channel identifier from the first channel identifier, and acquiring a communication interface corresponding to the first service channel.
In some embodiments, when there is a binding relationship between the service channel and each service unit, the pushing module 13 is further configured to:
aiming at each second service unit, acquiring a message pushing task stock of the second service unit;
and sending the message pushing request to a second service unit with the minimum message pushing task stock so as to push the target message to the target terminal through a communication interface corresponding to a service channel bound with the second service unit.
It should be noted that details that are not disclosed in the message pushing method in the embodiment of the present application refer to details disclosed in the above embodiments of the present application, and are not described herein again.
It should be understood that the units or modules recited in the message pushing device 10 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations and features described above for the method are also applicable to the message pushing device 10 and the units included therein, and are not described herein again. The message pushing apparatus 10 may be implemented in a browser or other security applications of the electronic device in advance, or may be loaded into the browser or other security applications of the electronic device by downloading or the like. Corresponding units in the message pushing apparatus 10 may cooperate with units in the electronic device to implement the solution of the embodiment of the present application.
The division into several modules or units mentioned in the above detailed description is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
To sum up, the embodiment of the application can push the target message to the target terminal according to the binding relationship between the service channel and the service unit established in advance after receiving the message pushing request. The method and the system for pushing the messages package the protocol services of various message pushing in the server in advance, and the users can directly realize message pushing through message pushing requests after binding the service units to the corresponding service channels, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
Fig. 11 is a schematic structural diagram of a message pushing apparatus according to an embodiment of the present application. It should be noted that, the message pushing apparatus in the embodiment of the present application is configured in a background server, and the background server communicates with the electronic device to control the electronic device.
As shown in fig. 11, the message pushing apparatus 20 according to the embodiment of the present application includes:
the calling module 21 is configured to call a configuration interface for message pushing, where the configuration interface includes a policy control for configuring a message pushing policy;
an obtaining module 22, configured to monitor the policy control, and obtain a message identifier of a target message to be pushed, a terminal identifier of a target terminal that receives the target message, and a channel identifier of a service channel used for pushing the target message;
a generating module 23, configured to generate a message pushing request according to the message identifier, the terminal identifier, and the channel identifier;
the sending module 24 is configured to send the message pushing request to the server, so that the server queries a communication interface corresponding to the service channel according to the channel identifier in the pushing request, and pushes the target message to the target terminal through the communication interface, where the communication interface is a message transmission path established when the service channel and the service unit establish a binding relationship.
In some embodiments, the configuration interface further comprises a binding control for the service channel, the server comprises at least one service unit,
an obtaining module 22, further configured to: monitoring the binding control, and acquiring interface information of a communication interface and a service identifier of a service unit;
the generating module 23 is further configured to generate a binding request according to the interface information and the service identifier;
the sending module 24 is further configured to send the binding request to the server, so that the server establishes a binding relationship between the service channel and the service unit according to the binding request.
In some embodiments, the invoking module 21 is further configured to:
receiving statistical information sent by a server, wherein the statistical information is generated by the server according to a pushing result of target information;
and when a statistical query instruction is received, generating and displaying a statistical information display interface according to the statistical information.
It should be noted that details that are not disclosed in the message pushing method in the embodiment of the present application refer to details disclosed in the above embodiments of the present application, and are not described herein again.
It should be understood that the units or modules recited in the message pushing device 20 correspond to the respective steps in the method described with reference to fig. 2. Thus, the operations and features described above for the method are also applicable to the message pushing device 20 and the units included therein, and are not described herein again. The message pushing apparatus 20 may be implemented in a browser or other security applications of the electronic device in advance, or may be loaded into the browser or other security applications of the electronic device by downloading or the like. The corresponding units in the message pushing apparatus 20 may cooperate with units in the electronic device to implement the solution of the embodiment of the present application.
The division into several modules or units mentioned in the above detailed description is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
To sum up, the embodiment of the application can push the target message to the target terminal according to the binding relationship between the service channel and the service unit established in advance after receiving the message pushing request. The method and the system for pushing the messages package the protocol services of various message pushing in the server in advance, and the users can directly realize message pushing through message pushing requests after binding the service units to the corresponding service channels, so that the compatibility of message pushing is effectively improved, and diversified message pushing requirements of different users can be met.
Referring now to fig. 12, fig. 12 illustrates a schematic diagram of a computer system suitable for use in implementing an electronic device or server according to embodiments of the present application,
as shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU)1201, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. The RAM1203 stores various programs and data necessary for operation instructions of the system. The CPU1201, ROM1202, and RAM1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205; an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, according to embodiments of the present application, the process described above with reference to the flowchart of fig. 2 may be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program comprises program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program performs the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a receiving module, a querying module, and a pushing module. The names of these units or modules do not form a limitation on the units or modules themselves in some cases, for example, a receiving module may also be described as "receiving a message push request, where the message push request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message, and a channel identifier of a service channel for pushing the target message".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist separately without being assembled into the electronic device. The computer-readable storage medium stores one or more programs which, when executed by one or more processors, perform the message push methods described herein.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or their equivalents without departing from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (17)

1. A message pushing method is characterized by comprising the following steps:
receiving a message pushing request, wherein the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal receiving the target message and a channel identifier of a service channel for pushing the target message;
and pushing the target message to the target terminal according to the channel identifier.
2. The method of claim 1, wherein the pushing the target message to the target terminal according to the channel identifier comprises:
inquiring a communication interface corresponding to the service channel according to the channel identifier, wherein the communication interface is a message transmission path established when the service channel and a service unit establish a binding relationship;
and pushing the target message to the target terminal through the communication interface.
3. The message pushing method according to claim 2, wherein the pushing the target message to the target terminal through the communication interface comprises:
extracting message data to be pushed from a stored message queue according to the message identifier;
identifying validity of the message data when the push time is reached;
if the message data is valid, pushing the target message to the target terminal through the communication interface;
and if the message data is invalid, deleting the message data from the message queue.
4. The message pushing method according to claim 1, further comprising, before the receiving the message pushing request:
receiving a binding request for binding the service channel, wherein the binding request carries interface information of the communication interface and a service identifier of the service unit;
and establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier.
5. The message pushing method according to claim 4, wherein the method further comprises:
acquiring a channel identifier of the server channel and configuration information corresponding to the channel identifier;
generating an interface frame of the service channel according to the channel identifier and the configuration information;
and configuring the interface information corresponding to the service channel based on the interface framework.
6. The message pushing method according to claim 4, wherein the service identifier includes an item identifier, the service channel establishes a binding relationship with each of the service units, and the establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier includes:
inquiring and acquiring at least one service unit conforming to the project identifier from a service unit list according to the project identifier;
and for each service unit, establishing a message transmission channel between the service channel and the service unit by using the interface information so as to establish a binding relationship between the service channel and the service unit.
7. The message pushing method according to claim 4, wherein the service identifier includes an item identifier, the service channel establishes a binding relationship with any of the service units, and the establishing a binding relationship between the service channel and the service unit according to the interface information and the service identifier includes:
inquiring and acquiring at least one service unit conforming to the project identification from a service unit list according to the project identification;
identifying a first service unit from at least one of the service units for which a binding relationship is not established;
and establishing a message transmission channel between the service channel and the first service unit by using the interface information so as to establish a binding relationship between the service channel and the first service unit.
8. The message pushing method according to claim 1, wherein the pushing request further includes an item identifier, and the querying a communication interface corresponding to the service channel according to the channel identifier includes:
according to the item identification, inquiring a second service unit which is consistent with the item identification from a service unit list;
acquiring a first channel identifier of the service channel having a binding relationship with the second service unit;
and inquiring a first service channel conforming to the channel identifier from the first channel identifier, and acquiring a communication interface corresponding to the first service channel.
9. The message pushing method according to claim 8, wherein when there is a binding relationship between the service channel and each of the service units, the pushing the target message to the target terminal through the communication interface includes:
aiming at each second service unit, acquiring a message pushing task stock of the second service unit;
and sending the message pushing request to the second service unit with the minimum message pushing task stock so as to push the target message to the target terminal through a communication interface corresponding to the service channel bound with the second service unit.
10. A message pushing method, comprising:
calling a configuration interface for message pushing, wherein the configuration interface comprises a strategy control for configuring a message pushing strategy;
monitoring the strategy control to acquire a message identifier of a target message to be pushed, a terminal identifier of a target terminal for receiving the target message and a channel identifier of a service channel for pushing the target message;
generating a message pushing request according to the message identifier, the terminal identifier and the channel identifier;
and sending the message pushing request to a server so that the server pushes the target message to the target terminal according to the channel identifier.
11. The message pushing method according to claim 10, wherein the method further comprises:
and the server inquires a communication interface corresponding to the service channel according to the channel identifier in the pushing request, and pushes the target message to the target terminal through the communication interface, wherein the communication interface is a message transmission path established when the binding relationship between the service channel and a service unit is established.
12. The message pushing method according to claim 11, wherein the configuration interface further includes a binding control of the service channel, the server includes at least one service unit, and the method further includes:
monitoring the binding control to acquire interface information of the communication interface and a service identifier of a service unit;
generating a binding request according to the interface information and the service identifier;
and sending the binding request to the server so that the server establishes a binding relationship between the service channel and the service unit according to the binding request.
13. The message pushing method according to claim 11, further comprising:
receiving statistical information sent by the server, wherein the statistical information is generated by the server according to a pushing result of the target information;
and when a statistical query instruction is received, generating and displaying a statistical information display interface according to the statistical information.
14. A message push apparatus, comprising:
a receiving module, configured to receive a message pushing request, where the message pushing request carries a message identifier of a target message to be pushed, a terminal identifier of a target terminal that receives the target message, and a channel identifier of a service channel used for pushing the target message;
the query module is used for querying a communication interface corresponding to the service channel according to the channel identifier, wherein the communication interface is a message transmission path established when the service channel and a service unit establish a binding relationship;
and the pushing module is used for pushing the target message to the target terminal according to the channel identifier.
15. A message push system, comprising:
a display device;
an electronic device in communication with the display device, the electronic device being configured to perform the method of any of claims 10-13 and/or the method of any of claims 1-9.
16. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the message push method as claimed in any one of claims 1 to 9, or the message push method as claimed in any one of claims 10 to 13 when executing the program.
17. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the message push method according to any one of claims 1 to 9, or the message push method according to any one of claims 10 to 13.
CN202110574237.0A 2021-03-19 2021-05-25 Message pushing method, device, equipment and medium Pending CN115114044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/539,488 US11799982B2 (en) 2021-03-19 2021-12-01 Message push method, apparatus, device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021102961639 2021-03-19
CN202110296163 2021-03-19

Publications (1)

Publication Number Publication Date
CN115114044A true CN115114044A (en) 2022-09-27

Family

ID=83324273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110574237.0A Pending CN115114044A (en) 2021-03-19 2021-05-25 Message pushing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115114044A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294741A (en) * 2022-10-10 2022-11-04 深圳曼顿科技有限公司 Alarm message pushing method and device, terminal equipment and storage medium
CN116112547A (en) * 2022-12-28 2023-05-12 广州市玄武无线科技股份有限公司 Message pushing method, system, device and storage medium
CN117097793A (en) * 2023-10-19 2023-11-21 荣耀终端有限公司 Message pushing method, terminal and server

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505275A (en) * 2019-07-16 2019-11-26 北京奇艺世纪科技有限公司 Data transmission method, system, server and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505275A (en) * 2019-07-16 2019-11-26 北京奇艺世纪科技有限公司 Data transmission method, system, server and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294741A (en) * 2022-10-10 2022-11-04 深圳曼顿科技有限公司 Alarm message pushing method and device, terminal equipment and storage medium
CN116112547A (en) * 2022-12-28 2023-05-12 广州市玄武无线科技股份有限公司 Message pushing method, system, device and storage medium
CN117097793A (en) * 2023-10-19 2023-11-21 荣耀终端有限公司 Message pushing method, terminal and server
CN117097793B (en) * 2023-10-19 2023-12-15 荣耀终端有限公司 Message pushing method, terminal and server

Similar Documents

Publication Publication Date Title
CN115114044A (en) Message pushing method, device, equipment and medium
CN110601952A (en) Multi-channel message notification sending method and device
CN110413418B (en) Cache synchronization device and method, cache synchronization system and electronic equipment
CN111737270A (en) Data processing method and system, computer system and computer readable medium
US20060235970A1 (en) System and method for exposing synchronous web services as notification style web services
CN108259533B (en) Data transmission method and device
US20200226326A1 (en) Electronic message translation management
US20200228478A1 (en) Electronic message control
CN109828830B (en) Method and apparatus for managing containers
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
CN109981546B (en) Method and device for acquiring remote call relation between application modules
US11245567B2 (en) Electronic message adaptation
CN114726789A (en) Method, device, equipment and medium for traffic management and traffic management policy configuration
KR20120017619A (en) Apparatus and method for providing device management package and method to be provided the device management package
CN109144864B (en) Method and device for testing window
CN110730197B (en) Service discovery method and system
CN113127335A (en) System testing method and device
CN107347024B (en) Method, equipment and system for storing operation log
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
US11799982B2 (en) Message push method, apparatus, device and medium
CN112187916B (en) Cross-system data synchronization method and device
CN112860292A (en) Configuration management method and device based on application
CN113821430A (en) Multi-service testing method and device
US10516767B2 (en) Unifying realtime and static data for presenting over a web service
CN113268417B (en) Task execution method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination