Disclosure of Invention
However, in some technologies, on one hand, each merchant or business party directly interfaces basic service of information push, and each function is realized by each merchant or business party, so that technical schemes are different, most functions are not perfect, and repeated development exists; on the other hand, the actual requirements of the user are not considered, so that the unreasonable setting of parameters such as an information sending mode, sending time and the like is easily caused, and the user experience is influenced; on the other hand, it is also easy to cause waste of data or resources.
Therefore, in the prior art, the standardized operation of sending the merchant information cannot be realized, which is very annoying.
For this reason, an improved message pushing method and apparatus, a storage medium, and an electronic device are needed to achieve standardized transmission of information.
In this context, embodiments of the present invention are intended to provide a message pushing method and apparatus, a storage medium, and an electronic device.
According to an aspect of the present disclosure, there is provided a message pushing method, including:
responding to a data pushing request of a service side, and extracting data to be pushed in the data pushing request; the data to be pushed comprises a message to be pushed, a corresponding mark field and an information receiver;
reading the corresponding sending state of the message to be pushed from a database according to the mark field;
and when the sending state of the message to be pushed is unsent, calling an information sending path corresponding to the application service side to send the message to be pushed.
In an exemplary embodiment of the present disclosure, when the sending status of the message to be pushed is read as unsent, the method further includes:
and writing the message to be pushed into the database, and establishing an index according to the mark field when the writing is successful.
In an exemplary embodiment of the present disclosure, when writing the message to be pushed into the database, the method further includes:
and when the writing of the message to be pushed fails, generating prompt information and sending the prompt information to a preset object.
In an exemplary embodiment of the present disclosure, the data to be pushed further includes a pushing time corresponding to the message to be pushed;
when the sending state of the message to be pushed is read as unsent, the method further comprises:
and reading the current time to judge whether the pushing time is met or not so as to send the message to be pushed when the pushing time is met.
In an exemplary embodiment of the present disclosure, the data to be pushed further includes: a mode of information transmission;
the invoking the information sending path corresponding to the service side to send the message to be pushed includes:
and sending the message to be pushed to the information receiver in the information sending path in the information transmission mode.
In an exemplary embodiment of the present disclosure, the invoking an information sending path corresponding to the service side to send the message to be pushed includes:
and reading a preset information sending mode corresponding to the information sending path, and sending the message to be pushed according to the preset information sending mode.
In an exemplary embodiment of the present disclosure, the preset information transmission manner includes a combined transmission mode;
the sending the message to be pushed according to the preset information sending mode comprises:
and respectively sending the message to be pushed by utilizing each information sending mode in the combined sending mode.
In an exemplary embodiment of the present disclosure, the preset information sending manner includes priority data of an information sending manner corresponding to the information sending path;
the sending the message to be pushed according to the preset information sending mode comprises:
extracting an available information sending mode corresponding to the information receiver;
and configuring the information sending mode with the highest priority in the available information sending modes as the information sending mode of the message to be pushed according to the priority data.
In an exemplary embodiment of the present disclosure, the information sending method includes: any one or any combination of a plurality of mails, short messages, APP push, public number push, applet service notification and information receiver associated social account push.
In an exemplary embodiment of the present disclosure, after sending the message to be pushed, the method further includes:
and reading a sending result of the data to be pushed in the information sending path so as to call a candidate sending mode for transmission when the sending fails.
In an exemplary embodiment of the present disclosure, the method further comprises:
and reading the messages to be pushed which are failed to be sent in the message sending path, and generating alarm information and sending the alarm information to a preset object when the number of the messages to be pushed which are failed to be sent is larger than a preset threshold value.
In an exemplary embodiment of the disclosure, an information transmission path is allocated to the service side in response to a registration request of the service side.
According to an aspect of the present disclosure, there is provided a message pushing apparatus including:
the request receiving module is used for responding to a data pushing request of a service side and extracting data to be pushed in the data pushing request; the data to be pushed comprises a message to be pushed and a corresponding mark field;
the message state reading module is used for reading the corresponding sending state of the message to be pushed from a database according to the mark field;
and the sending execution module is used for calling a sending path corresponding to the application service side to send the message to be pushed when the sending state is unsent.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
and the index establishing module is used for writing the message to be pushed into the database when the sending state of the message to be pushed is read as unsent, and establishing an index according to the mark field when the writing is successful.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
and the prompt information generating module is used for generating prompt information and sending the prompt information to a preset object when the writing of the message to be pushed fails.
In an exemplary embodiment of the present disclosure, the data to be pushed further includes a pushing time corresponding to the message to be pushed; the device further comprises:
and the pushing time identification module is used for reading the current time to judge whether the pushing time is met or not when the sending state of the message to be pushed is read as unsent, so that the message to be pushed is sent when the pushing time is met.
In an exemplary embodiment of the present disclosure, the data to be pushed further includes: a mode of information transmission; the transmission execution module includes:
and the transmission mode selection module is used for transmitting the message to be pushed to the information receiver in the information transmission mode in the information transmission path.
In an exemplary embodiment of the present disclosure, the transmission execution module includes:
and the transmission mode reading module is used for reading a preset information sending mode corresponding to the information sending path and sending the message to be pushed according to the preset information sending mode.
In an exemplary embodiment of the present disclosure, the preset information transmission manner includes a combined transmission mode; the transmission mode reading module comprises:
and the combined mode transmission module is used for respectively transmitting the messages to be pushed by utilizing each information transmission mode in the combined transmission mode.
In an exemplary embodiment of the present disclosure, the preset information sending manner includes priority data of an information sending manner corresponding to the information sending path; the transmission mode reading module includes:
and the priority mode transmission module is used for extracting the available information sending modes corresponding to the information receivers and configuring the information sending mode with the highest priority in the available information sending modes as the information sending mode of the message to be pushed according to the priority data.
In an exemplary embodiment of the present disclosure, the information sending method includes: any one or any combination of a plurality of mails, short messages, APP push, public number push, applet service notification and information receiver associated social account push.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
and the transmission result identification module is used for reading the transmission result of the data to be pushed in the information transmission path after the message to be pushed is transmitted so as to call a candidate transmission mode for transmission when the transmission fails.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
and the alarm module is used for reading the messages to be pushed which are failed to be sent in the information sending path, generating alarm information and sending the alarm information to a preset object when the number of the messages to be pushed which are failed to be sent is greater than a preset threshold value.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
and the registration module is used for responding to the registration request of the service side so as to allocate an information sending path to the service side.
According to an aspect of the present disclosure, a storage medium is provided, on which a computer program is stored, which when executed by a processor, is the above message push method.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any of the message push methods described above via execution of the executable instructions.
According to the message pushing method provided by the embodiment of the invention, data pushing requests of different service sides can be responded, so that a standardized message pushing interface is provided for the service sides, and different services can be accessed more conveniently and simply. Each service side only needs to determine the message content of the message to be sent and the corresponding parameters of the receiver and the like in advance, and repeated development work of basic services among all service platforms is avoided. In addition, by adding the mark field in the data to be pushed and verifying the sending state in the database according to the mark field, the sending state of each message to be pushed can be accurately judged, and the repeated sending or missing sending of the message is avoided.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the invention, a message pushing method, a message pushing device, a storage medium and an electronic device are provided.
In this document, any number of elements in the drawings is by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Summary of The Invention
The inventor finds that, in the prior art, each upper-layer service, such as each e-commerce platform, shopping website, social networking website, and the like, needs to push a message such as service information or promotion information to a user. Each business party needs to directly connect basic service for message pushing, but due to different technical schemes of each business party and different levels of the technical schemes, the message pushing is not timely, the message cannot be accurately delivered, or the pushing mode is not appropriate, so that the user experience is poor, abnormal conditions of the message pushing cannot be timely found and processed, and the like. In addition, since each service needs to separately develop a basic service for message pushing, a situation of repeated development occurs.
In view of the above, the basic idea of the present invention is: according to the message pushing method and the message pushing device, the data pushing requests of different service sides are responded, so that a standardized message pushing interface is provided for the service side, and different services are accessed more conveniently and simply. Each service side only needs to determine the message content of the message to be sent and the corresponding parameters of the receiver and the like in advance, and repeated development work of basic services among all service platforms is avoided. And further, a message pushing platform is provided, different business scenes can be adapted, and standardized information pushing service is provided.
Having described the general principles of the invention, various non-limiting embodiments of the invention are described in detail below.
Exemplary method
A message push method according to an exemplary embodiment of the present invention is described below with reference to fig. 1.
Referring to fig. 1, the message push method may include the steps of:
s1, responding to a data push request of a service side, and extracting data to be pushed in the data push request; the data to be pushed comprises a message to be pushed, a corresponding mark field and an information receiver;
s2, reading the sending state of the corresponding message to be pushed from a database according to the mark field;
and S3, when the sending state of the message to be pushed is unsent, calling an information sending path corresponding to the application service side to send the message to be pushed.
In the message pushing method of the embodiment of the invention, the data pushing requests of different service sides are responded, so that a standardized message pushing interface is provided for the service side, and the access of different services is more convenient and simpler. Each service side only needs to determine the message content of the message to be sent and the corresponding parameters of the receiver and the like in advance, and repeated development work of basic services among all service platforms is avoided. In addition, by adding the mark field in the data to be pushed and verifying the sending state in the database according to the mark field, the sending state of each message to be pushed can be accurately judged, the repeated sending or missing sending of the message is avoided, and the message can be guaranteed to be sent to the user to the maximum extent.
In step S0, in response to the registration request of the service side, an information transmission path is allocated to the service side.
In an exemplary embodiment of the present disclosure, referring to fig. 2, various business entities, such as e-commerce websites, shopping platforms, social networking websites, etc., may first register with the message push platform. For example, the registration content may include parameters such as a service name and a service content description of each service end. After receiving the registration request of the service side, the message push platform can pre-allocate a message sending path for each service side. Furthermore, an information transmission mode corresponding to each information transmission path may be configured, and one or more information transmission modes may be provided corresponding to each information transmission path. Therefore, the situation that the message to be pushed cannot be sent in time or is sent wrongly due to the fact that the information sending path is occupied, or the information sending path is unstable in communication, the system is abnormal and the like when the message is pushed to each service side is avoided. For example, the registration of a shopping website on the message pushing platform may include: and (4) service name: the commodity is taken free at cut price; service description: the user cuts the price of the commodity for the friend by sharing the commodity, and when the commodity is cut into 0 yuan, the message is pushed to the user according to the appointed information sending mode.
In step S1, in response to a data push request from a service side, extracting data to be pushed in the data push request; the data to be pushed comprises a message to be pushed, a corresponding mark field and an information receiver.
In an exemplary embodiment of the present disclosure, each service side may send a data push request to the message push platform. The data pushing request comprises data to be pushed, and the data to be pushed at least comprises specific message content of the message to be pushed, a corresponding information receiver and a mark field of the message to be pushed. After receiving a data push request from a service side, the message push platform can extract and verify various parameters in the request.
For example, the service side may determine specific parameters of data to be pushed according to content to be sent and other actual requirements. For example, when the specific content of the message to be pushed is a promotional advertisement, a marketing campaign or a website campaign, the corresponding information receiver may be a designated group of users, for example, users with a common user or diamond user rank, or users in all. When the message to be pushed is a logistics distribution message, an express sign-in message or a message of other specified information receivers, the corresponding information receiver can be a specified user or a plurality of users related to each other.
In an exemplary embodiment of the present disclosure, for a tag field of a message to be pushed, an idempotent tag field may be used to tag the message to be pushed. And the structure of the idempotent flags field can be preconfigured. For example, the field structure may include an order ID + idempotent flag bits + status bits, or an order ID + service ID; and so on. Of course, in other exemplary embodiments of the present disclosure, structures such as a verification bit, a time bit, and the like may also be set for the field structure, which is not limited in particular by the present disclosure.
In some exemplary embodiments of the present disclosure, the data to be pushed may further include a pushing time corresponding to the message to be pushed. For example, the service side may preset a push time period of a message to be pushed, for example, setting 9: 00-17: 00, or 12: 00-14: 00; alternatively, the push may be performed at a certain time, for example, the push time is set to 10: 00 or 19: 00, and so on; alternatively, the message may be set to be sent immediately, for example, for logistics information, order status information, and the like. The specific push time may be determined according to the actual service scenario or message content.
In addition, in some exemplary embodiments of the present disclosure, the data to be pushed may also not set the pushing time, and the message pushing platform classifies the specific content of each message to be pushed after extracting the specific content, and then sends the message according to the preset pushing time rule. For example, according to the classification result, it is determined that the message to be pushed is an instant message, promotion information, or service information, etc., and the push time rule may include for instant messaging, the promotion information 10: 00-12: 00 transmission, service information 11: 00-14: 00 transmission, etc.
In some exemplary embodiments of the present disclosure, further, the data pushing request sent by the service side may further include one or more information transmission modes, which are used to determine in advance by which mode the message to be pushed is sent to the information receiver. For example, the information transmission method may be: any one or any combination of a plurality of mails, short messages, APP push, public number push, applet service notification and information receiver associated social account push.
For the service side, only one information transmission mode may be configured in advance for the message to be pushed, for example, APP pushing is configured for order logistics information, public number pushing is set for promotion information, and the like. Or, a mode of a combination mode of multiple sending modes may also be set, for example, a combination mode of short message, APP push, and applet service notification may be configured for the refund information; and setting APP push, public number push, applet service notification, mail combined push modes and the like for the promotion advertisement. The specific message pushing mode may be determined according to the content of the message to be pushed, or the attribute or parameter such as the information receiver. The present disclosure is not limited thereto.
Alternatively, in other exemplary embodiments of the present disclosure, the service side may also only pre-configure the priority of each information push service, and then the message push platform determines the specific information sending method according to the priority order. For example, the priority levels can be preconfigured to be, in order from high to low: APP pushing, short messages, applet service notification, public number pushing, mail social account pushing and the like. The specific priority order may be determined according to the related content of the message to be sent and the sending time, which is not particularly limited by this disclosure.
In step S2, the sending status of the corresponding message to be pushed is read from the database according to the tag field.
In an exemplary embodiment of the present disclosure, after extracting each specific parameter of the data to be pushed, the message pushing platform may first extract a sending state of the corresponding message to be pushed to the database by using the tag field, so as to verify the sending state. Specifically, whether the data of the idempotent fields are contained in the database or not can be queried from a preset database, such as a MySQL database or a cloud storage unit, according to the contents of the idempotent flag fields. If the same idempotent field exists, it indicates that the message to be pushed has already been sent, and its status is sent. If the queried database has no same idempotent field, it indicates that the message to be pushed has not been sent, and the state is not sent.
When the sending status of the message to be pushed is unsent, referring to fig. 3, the step S2 may further include:
and step S210, writing the message to be pushed into the database, and establishing an index according to the mark field when the writing is successful.
In the exemplary embodiment of the disclosure, when it is determined that a message to be pushed is sent, the message to be pushed may be written into the database first, and when the writing is successful, a unique index is established in the data according to the idempotent flag field, so as to ensure that only one piece of data can be successfully written when a plurality of pieces of data with the same idempotent field are written into the database under the condition that the message to be sent is sent concurrently, and avoid that a user receives a plurality of pieces of message data with repeated contents.
And step S220, when the writing of the message to be pushed fails, generating prompt information and sending the prompt information to a preset object.
Based on the above, in the exemplary embodiment of the present disclosure, if the message to be pushed fails to be written, the corresponding prompt information may be generated and sent to an administrator or a designated user or address of the service side, so as to facilitate an attempt to rewrite the message to be pushed, and avoid missing sending of the message.
In step S3, when the sending status of the message to be pushed is unsent, the information sending path corresponding to the application service side is called to send the message to be pushed.
In an exemplary embodiment of the present disclosure, when it is determined that a message to be transmitted is not transmitted, a transmission operation may be performed thereon. Specifically, as shown in fig. 4, the method may include:
step S310, reading the current time to determine whether the push time is met, so as to execute sending the message to be pushed when the push time is met.
Before the sending operation is executed on the message to be sent, the pushing time and the current time can be read firstly, whether the message to be pushed exceeds the preset pushing time or not is judged, and if the message to be pushed does not exceed the preset pushing time, the corresponding sending operation can be executed. And if the preset pushing time is exceeded, the message to be pushed is not sent. By setting the sending time of the message, the limited sending and the punctual sending of the message to be pushed are realized, and the disturbance to the user caused by improper sending time can be avoided.
Step S320, the information to be pushed is sent to the information receiver in the information sending path in the information transmission mode.
In the exemplary embodiment of the present disclosure, as shown in fig. 4, the data to be pushed may not include an information sending manner, and an information sending manner pre-associated with an information sending path of each service side is used to send a message to be sent. The message push platform may send the message to be pushed by using the associated information transmission mode on the pre-configured information sending path after determining that the message to be pushed does not exceed the preset push time.
Specifically, each service may have one or more information transmission paths, and each transmission path may correspond to a pre-specified information transmission method. For example, when the service end only has one information transmission path, the service end can use the information transmission mode configured in advance in the information transmission path to push messages to the user. Or the information sending path corresponding to the service M comprises a path A, and the corresponding information transmission mode is APP pushing; and in the path B, the corresponding information transmission mode is mail pushing. And when the pushing time is judged not to be exceeded, pushing related promotion information to the user by the aid of the promotion information of the service M in a mail mode on the path B. Or, the order data is sent to the user in the path a in the form of an APP message.
Or, the information transmission mode corresponding to the information sending path may also be a mode of a combination of a plurality of information transmission modes specified in advance, and is suitable for a service or an application scenario with a high information reaching rate. For example, the information transmission path C corresponding to the service N includes the following information transmission modes: APP propelling movement, public number propelling movement and mail propelling movement's combination mode. When the message pushing platform judges that the pushing time is not exceeded, the message pushing platform can simultaneously send messages to users in modes of APP pushing, public number pushing and mail pushing respectively. Therefore, the user can be ensured to receive the corresponding message, and omission is avoided.
The information transmission mode corresponding to the information transmission path may be a priority order of a plurality of information transmission methods determined in advance. For example, the priority order of the information transmission modes corresponding to the information transmission path D corresponding to the service P from high to low includes: short messages, mails, APP push, public number push, small program service notification and mail social account push. The message pushing platform can extract the available information sending modes of all the information receivers when judging that the pushing time is not exceeded, and then select the information sending mode with the highest priority from the available information sending modes of all the information receivers to send according to the preset priority sequence. For example, if the available information sending mode of the information receiver 1 is read to include public number push and applet service notification, the information transmission mode of the information receiver 1 is the public number push according to the priority sequence; if the available information sending mode of the information receiver 2 is read to comprise mail, short message and APP pushing, the information transmission mode of the information receiver 2 is short message pushing according to the priority sequence.
Alternatively, the priority order of the information transmission modes can be defined according to the service scene. For example, a user participates in commodity price chopping activities on a small program, a business side expects to preferentially notify a touch user through a small program service, when the small program service notification cannot be touched due to exhaustion of formmid (form identification), the user is touched through a short message, and if no mobile phone number of the user exists, the user is pushed to the user through a public number, so that the user can be ensured to know the latest progress of the price chopping activities, but the user is not disturbed too much due to messages. Then the priority order corresponding to the service instance may be set as applet service notification, short message, public number push.
Further, in some exemplary embodiments of the present disclosure, as illustrated with reference to fig. 5, the method described above may further include:
step S330, reading a preset information sending mode corresponding to the information sending path, and sending the message to be pushed according to the preset information sending mode.
In an exemplary embodiment of the present disclosure, as shown in fig. 5, the data to be pushed may also include an information transmission mode specified by the message to be pushed. And when the message pushing platform judges that the pushing time is not exceeded, the corresponding information sending path can be called according to the specified information transmission mode, so that the pushing message is sent to the user in the specified information transmission mode.
For example, the information transmission mode specified in the data to be pushed may be different information transmission modes configured according to different information receivers, or different information transmission modes configured according to different message contents. For example, when the designated information transmission mode is a short message, the data to be pushed should include the phone number of the information receiver; if the designated information transmission mode is mail, the push data should contain the mailbox address of the information receiver. Of course, in other exemplary embodiments of the present disclosure, the data to be pushed may also only include an information transmission manner, and after the information pushing platform reads the designated information transmission manner corresponding to each message to be pushed, the information pushing platform extracts corresponding data, such as an IP address, a telephone number, or a mailbox address, from a preset user database.
For the applet service notification, the user generates corresponding information resources in the process of using the applet, for example, login operation, adding goods into a shopping cart, submitting an order, paying for the goods, inquiring and the like can all generate the information resources. The information resources correspond to the users one by one and are bound with the users, and the information resources have a certain life cycle. The resource pool can be established by utilizing the information resources, the residual life cycle of each information resource is marked, and the user behavior corresponding to the resource information is generated. When the designated information transmission mode is the applet service notification, a user with a short life cycle can be selected from the resource pool to send preferentially, for example, a user with a life cycle less than 3 days is selected; alternatively, the user with the designated operation behavior may be selected to send preferentially, for example, the login user or the payment user is selected. And deleting the corresponding information resources in the resource pool after sending the messages to the users. Therefore, when the applet service notification is used, the information resources can be utilized to the maximum extent, and the message to be pushed can be accurately sent to each user.
Alternatively, in other exemplary embodiments of the present disclosure, the information transmission manner specified in the data to be pushed may also be a combination mode of multiple information transmission manners specified in the above embodiments, for example, a combination of email and social account pushing, or a combination mode of email, short message, applet service notification, and the like. After reading the combination of the appointed multiple information transmission modes, calling the corresponding information sending path and sending by using each information transmission mode.
Or, the information transmission mode designated in the data to be pushed may also be priority data of an information sending mode, so that the information pushing platform extracts the available information sending mode of each information receiver from a preset database after reading the priority data, selects the information sending mode with the highest priority, calls the corresponding information sending path, and pushes the information to the user by using the information sending mode. Therefore, the message to be pushed can be sent to the user to the maximum extent, the same information cannot be sent to the user too much, the waste of resources is reduced, and the user is prevented from being harassed.
Based on the above, in some exemplary embodiments of the present disclosure, referring to fig. 2, the method described above may further include:
in step S4, the sending result of the data to be pushed in the information sending path is read, so as to invoke the candidate sending method for transmission when sending fails.
In the exemplary embodiment of the present disclosure, after the message to be pushed is sent through the information sending path, the sending result may also be read, and whether the message to be sent is sent successfully is determined. If the message is successfully sent, the message can not be operated; if the message transmission fails, a standby information transmission mode can be used or a standby information transmission path can be called to retransmit the message.
Further, in some exemplary embodiments of the present disclosure, as shown with reference to fig. 2, the method may further include:
in step S5, the message to be pushed that is sent in the message sending path in a failure is read, and when the number of the message to be pushed that is sent in a failure is greater than a preset threshold, alarm information is generated and sent to a preset object.
In the exemplary embodiment of the disclosure, for each information sending path, the number of messages to be pushed, which are failed to be sent, can be counted in real time, and corresponding relevant parameters are extracted. And when the number of the messages failed to be sent reaches a preset threshold value, alarm information is generated. And the alarm information and the related parameters corresponding to the message to be pushed can be sent to an administrator of the message pushing platform or a specified object at a service side. The method is convenient for processing the abnormity in the system in time and analyzing the reason of the message which fails to be sent. The sending mode can be mail, short message and the like.
In summary, the method provided by the present disclosure may allocate a corresponding information sending path when each service side registers, may interface a plurality of different upper layer services, and provides a standard information pushing interface for the upper layer services, so that different service sides may only provide the content of the message to be sent, the information receiver, the sending time and/or the sending mode, and may push the message to the corresponding user through the message pushing platform. The data processing pressure of the service side is reduced, and the user experience can be effectively improved. By adding the mark field in the data to be pushed, the sending state of the corresponding message to be sent can be accurately judged in the database, and repeated sending is avoided. Due to the fact that the pushing time is added to the data to be pushed, the information to be pushed can be sent to the user at the appointed time, and disturbance to the user due to the fact that the sending time is not appropriate is avoided. In addition, different information transmission modes are set, so that the requirements of various service message scenes of upper-layer services can be met, the messages can be accurately sent, and the messages can be guaranteed to be sent to users to the maximum extent.
Exemplary devices
Having introduced the message push method according to an exemplary embodiment of the present invention, a message push apparatus according to an exemplary embodiment of the present invention will be described next with reference to fig. 6.
Referring to fig. 6, the message pushing apparatus 10 according to the exemplary embodiment of the present invention may include: a request receiving module 101, a message state reading module 102 and a sending execution module 103, wherein:
the request receiving module 101 may be configured to, in response to a data push request from a service side, extract data to be pushed in the data push request; the data to be pushed comprises a message to be pushed and a corresponding mark field
The message status reading module 102 may be configured to read a sending status of the corresponding message to be pushed from a database according to the tag field.
The sending execution module 103 may be configured to, when the sending status is unsent, invoke a sending path corresponding to the application service side to send the message to be pushed.
According to an exemplary embodiment of the present disclosure, the apparatus further comprises: an index building module (not shown).
The index establishing module may be configured to write the message to be pushed into the database when the sending status of the message to be pushed is read as unsent, and establish an index according to the tag field when the writing is successful.
According to an exemplary embodiment of the present disclosure, the apparatus further comprises: and a prompt message generation module (not shown in the figure).
The prompt information generating module may be configured to generate prompt information and send the prompt information to a preset object when the writing of the message to be pushed fails.
According to an exemplary embodiment of the present disclosure, the data to be pushed further includes a pushing time corresponding to the message to be pushed; the device further comprises: a push time recognition module (not shown in the figure).
The push time identification module may be configured to, when the sending state of the message to be pushed is read as unsent, read the current time to determine whether the push time is satisfied, so as to execute sending of the message to be pushed when the push time is satisfied.
According to an exemplary embodiment of the present disclosure, the data to be pushed further includes: a mode of information transmission; the sending execution module comprises: a transmission mode selection module (not shown).
The transmission mode selection module can be used for sending the message to be pushed to the information receiver in the information sending path in the information transmission mode.
According to an exemplary embodiment of the present disclosure, the transmission execution module includes: a transmission mode reading module (not shown).
The transmission mode reading module may be configured to read a preset information sending mode corresponding to the information sending path, and send the message to be pushed according to the preset information sending mode.
According to an exemplary embodiment of the present disclosure, the preset information transmission manner includes a combined transmission mode; the transmission mode reading module includes: a combined mode transfer module (not shown).
The combined mode transmission module may be configured to send the message to be pushed by using each information sending mode in the combined sending mode, respectively.
According to an exemplary embodiment of the present disclosure, the preset information sending manner includes priority data of an information sending manner corresponding to the information sending path; the transmission mode reading module includes:
and the priority mode transmission module is used for extracting the available information sending modes corresponding to the information receivers and configuring the information sending mode with the highest priority in the available information sending modes as the information sending mode of the message to be pushed according to the priority data.
According to an exemplary embodiment of the present disclosure, the information transmission manner includes: any one or any combination of multiple of mails, short messages, APP push, public number push, applet service notification and information receiver associated social account push.
According to an exemplary embodiment of the present disclosure, the apparatus further comprises: and a transmission result identification module (not shown in the figure).
The transmission result identification module may be configured to, after the to-be-pushed message is sent, read a sending result of the to-be-pushed data in the information sending path, so as to invoke a candidate sending method to perform transmission when sending fails.
According to an exemplary embodiment of the present disclosure, the apparatus further comprises: an alarm module (not shown).
The alarm module can be used for reading the messages to be pushed which are failed to be sent in the information sending path, and generating alarm information and sending the alarm information to a preset object when the number of the messages to be pushed which are failed to be sent is larger than a preset threshold value.
According to an exemplary embodiment of the present disclosure, the apparatus further comprises: a registration module (not shown).
The registration module may be configured to respond to a registration request of the service side to allocate an information sending path to the service side.
Since each functional module of the message pushing apparatus in the embodiment of the present invention is the same as that in the embodiment of the message pushing method in the present invention, further description is omitted here.
Exemplary storage Medium
Having described the audio playing method and apparatus, the audio sharing method and apparatus according to the exemplary embodiments of the present invention, the storage medium according to the exemplary embodiment of the present invention will be described with reference to fig. 7.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Exemplary electronic device
Having described the storage medium of an exemplary embodiment of the present invention, next, an electronic device of an exemplary embodiment of the present invention will be described with reference to fig. 8.
The electronic device 800 shown in fig. 8 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, a bus 830 connecting different system components (including the memory unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 to cause the processing unit 810 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 810 may perform steps S1 to S3 as shown in fig. 1, or the processing unit 810 may perform steps S0 to S5 as shown in fig. 2.
The memory unit 820 may include volatile memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
Storage unit 820 may also include a program/utility module 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may include a data bus, an address bus, and a control bus.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.) via an input/output (I/O) interface 850. The electronic device 800 further comprises a display unit 840 connected to the input/output (I/O) interface 850 for displaying. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that although in the above detailed description several modules or sub-modules of the audio playback device and the audio sharing device are mentioned, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects cannot be combined to advantage. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.