CN111131368A - Message pushing method and device - Google Patents

Message pushing method and device Download PDF

Info

Publication number
CN111131368A
CN111131368A CN201811295453.6A CN201811295453A CN111131368A CN 111131368 A CN111131368 A CN 111131368A CN 201811295453 A CN201811295453 A CN 201811295453A CN 111131368 A CN111131368 A CN 111131368A
Authority
CN
China
Prior art keywords
message
pushed
pushing
channel
account
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
CN201811295453.6A
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang 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 China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811295453.6A priority Critical patent/CN111131368A/en
Publication of CN111131368A publication Critical patent/CN111131368A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding

Abstract

The embodiment of the invention provides a message pushing method and device. The message pushing method comprises the following steps: acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file; and pushing the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed. According to the message pushing method and device provided by the embodiment of the invention, the priority of the message to be pushed is obtained, and the content of the message to be pushed is pushed to the channel account of the message receiving object through each message pushing channel according to the priority of the message to be pushed, so that the message with high priority can be pushed timely and quickly when the unified pushing of multiple message pushing channels is carried out.

Description

Message pushing method and device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a message pushing method and device.
Background
As the business of electronic channels expands, communication carriers have to cope with various challenges from the internet. Driven by economic benefits, various attacks become organized, industrialized and centralized, thus threatening the property safety of operators and users and damaging the basic benefits of normal users. In addition, malicious attacks and arbitrage during the popularization of various marketing activities bring huge pressure to the servers of various service platforms of communication operators, and cause direct economic loss and inconvenience to users in severe cases.
In the prior art, when message pushing is performed through multiple channels, messages with different importance are sampled in the same pushing mode, so that messages with high priority cannot reach a user timely and quickly. In addition, in the prior art, in order to ensure normal access of users and stable operation of each service platform of a communication operator, a method of performing flow limitation in a service peak period is adopted, and fundamental prevention and control are not performed on such behaviors.
Disclosure of Invention
Aiming at the problem that the prior art cannot push the high-priority message in time, the embodiment of the invention provides a message pushing method and a message pushing device.
In a first aspect, an embodiment of the present invention provides a message pushing method, including:
acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file;
and pushing the content of each message to be pushed to a channel account of the message pushing channel of the message receiving object through each message pushing channel according to the priority of the message to be pushed.
In a second aspect, an embodiment of the present invention provides a message pushing apparatus, including:
the message analysis module is used for acquiring the content of the message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing the message pushing task file;
and the message pushing module is used for pushing the content of each message to be pushed to a channel account of the message pushing channel of the message receiving object through each message pushing channel according to the priority of the message to be pushed.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the message push method provided by any of the various possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a message pushing method provided in any one of various possible implementations of the first aspect.
According to the message pushing method and device provided by the embodiment of the invention, the content of the message to be pushed is pushed to the channel account of the message receiving object through each message pushing channel by acquiring the priority of the message to be pushed and according to the priority of the message to be pushed, so that the message with high priority can be pushed first and then the message with low priority can be pushed when the unified pushing of multiple message pushing channels is carried out, the message with high priority can be pushed timely and quickly, and the problem that the user cannot receive the message with high priority due to the fact that the message with low priority is pushed first is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a message pushing method according to an embodiment of the present invention;
fig. 2 is a functional block diagram of a message pushing apparatus provided according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The embodiments of the present invention, and all other embodiments obtained by a person of ordinary skill in the art without any inventive step, are within the scope of the present invention.
In order to overcome the above problems in the prior art, an embodiment of the present invention provides a message pushing method, which includes determining a priority of a message to be pushed, performing control processing according to the priority, pushing a message to be pushed with a high priority first, and then pushing a message to be pushed with a low priority, thereby ensuring timeliness of message sending.
Fig. 1 is a flowchart illustrating a message pushing method according to an embodiment of the present invention. As shown in fig. 1, a message pushing method includes: step S101, acquiring the content of the message to be pushed, the priority of the message to be pushed and each channel account of the message receiving object by analyzing the message pushing task file.
It should be noted that the message pushing method provided in the embodiment of the present invention is suitable for uniformly pushing messages through a plurality of message pushing channels.
And the message pushing task file carries information of the message to be pushed and information of the message receiving object. The information of the message to be pushed at least comprises the content of the message to be pushed.
A message recipient object refers to a recipient of a message, typically a user. A user receives a message via an electronic device.
For each message pushing task file, the information of the message to be pushed and the information of the message receiving object can be obtained through analyzing the message pushing task file, the content of the message to be pushed and the priority of the message to be pushed can be obtained according to the information of the message to be pushed, and each channel account of the message receiving object can be obtained according to the information of the message receiving object.
The priority of the message to be pushed is used for representing the importance degree of the message to be pushed. More important messages, with higher priority.
The specific level of priority can be pre-classified according to actual needs. For example, the priority may be divided from high to low into 4 levels of urgent, high, medium, low, or the like, or 3 levels of high, medium, low, or the like, or 2 levels of high, low. The embodiment of the present invention does not specifically limit the ranking of the priorities.
The channel account refers to an account of a message receiving object in a message push channel.
The message pushing channel refers to a channel for pushing the content of the message to be pushed. For example, the application programs such as the short message, the email, and the instant messaging software, and accordingly, the channel account is a mobile phone number for receiving the short message, a mailbox for receiving the email, or an account of the instant messaging software.
And S102, pushing the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed.
When the message is pushed, according to the priority of the message to be pushed, the message is pushed in sequence from high to low in priority.
After the content of the message to be pushed, the priority of the message to be pushed and the channel account numbers of the message receiving objects are obtained, the content of the message to be pushed and the channel account numbers of the message receiving objects can be used as the information of the message to be pushed and are placed in a message queue corresponding to the priority of the message to be pushed according to the priority of the message to be pushed. The number of message queues is the same as the number of priority levels.
For example, when the priority is divided into 4 levels, i.e., urgent, high, medium, and low, there are correspondingly 4 message queues, and the information of the message to be pushed with the priority of urgent, high, medium, and low is respectively put into the corresponding message queues.
When the message is pushed, the message to be pushed in the message queue corresponding to the urgent, high, medium and low priorities is pushed respectively according to the priority of the message to be pushed.
When the message to be pushed with the emergency priority exists, the message to be pushed with the emergency priority is pushed preferentially, and the message to be pushed with other priorities is not pushed. For messages to be pushed with other priorities, the messages can be pushed in sequence according to the sequence of the priorities from high to low; different single pushing amounts can be allocated according to different priorities, according to the single pushing amount, the higher the priority is, the higher the single pushing amount is, and in a cycle, the messages of the single pushing amount corresponding to each priority are pushed according to the sequence of the priority from high to low.
For example, after pushing the message to be pushed in the message queue corresponding to the message queue with the high priority, the message to be pushed in the message queue corresponding to the message queue with the high priority is pushed; after pushing the message to be pushed in the message queue corresponding to the high priority, pushing the message to be pushed in the message queue corresponding to the medium priority; after the message to be pushed in the message queue corresponding to the medium priority is pushed, the message to be pushed in the message queue corresponding to the low priority is pushed again until the message to be pushed in the message queue corresponding to the low priority is pushed.
For another example, the single pushing amount corresponding to the priority being high, medium and low is 100, 50 and 10; in each circulation, firstly pushing 100 messages to be pushed in the message queue corresponding to the high priority, then pushing 50 messages to be pushed in the message queue corresponding to the medium priority, and finally pushing 10 messages to be pushed in the message queue corresponding to the low priority; and circularly pushing until the messages to be pushed in each message queue are pushed.
When any message to be pushed is pushed, pushing the content of the message to be pushed through each message pushing channel; and for any message pushing channel, pushing the content of the message to be pushed to a channel account of the message pushing channel of a message receiving object according to an interface protocol corresponding to the message pushing channel.
It can be understood that a new message push channel can be flexibly added by adding a definition of an interface protocol corresponding to the new message push channel, so as to realize secondary development.
And for any message pushing channel, formatting the content of the message to be pushed, and converting the content of the message to be pushed into a format corresponding to the message pushing channel.
Due to the fact that the pushing capabilities of different message pushing channels are different, namely the maximum number of messages pushed each time is different, during pushing, the content of the formatted message to be pushed is pushed in a batch processing mode according to the maximum number of messages pushed by the message pushing channel at one time.
The maximum number of messages that can be pushed by a message pushing channel at a time can be set by defining an interface protocol of the message pushing channel.
Through the process, all messages to be pushed in all message queues can be pushed.
It can be understood that, for messages to be pushed with the same priority, the pushing order may be determined according to other conditions, and this is not particularly limited in the embodiment of the present invention. For example, the time sequence of the messages to be pushed being put into the message queue where the messages are located, and the like.
According to the embodiment of the invention, by acquiring the priority of the message to be pushed and pushing the content of the message to be pushed to the channel account of the message receiving object through each message pushing channel according to the priority of the message to be pushed, when the unified pushing of a plurality of message pushing channels is carried out, the message with high priority can be pushed firstly, and then the message with low priority can be pushed, so that the message with high priority can be pushed timely and quickly, and the problem that the user cannot receive the message with high priority due to the fact that the message with low priority is pushed firstly is avoided.
Based on the content of the above embodiment, the specific steps of step S101, obtaining the content of the message to be pushed, the priority of the message to be pushed, and each channel account of the message receiving object by parsing the message pushing task file include: step S1011, parsing the message pushing task file, and obtaining the content of the message to be pushed, the type of the message to be pushed, and the basic account of the message receiving object.
Specifically, the message pushing task file carries information of a message to be pushed and information of a message receiving object, the information of the message to be pushed at least comprises content of the message to be pushed and type of the message to be pushed, and the information of the message receiving object at least comprises a basic account of the message receiving object.
The type of the message to be pushed refers to what type of message the message to be pushed is, such as a prompt type, an advertisement type, a news type, and the like.
The basic account of the message receiving object refers to an account used by the message pushing object in a service system of a message pushing party.
For example, for a communication carrier, the basic account number of a message receiving object may refer to a mobile phone number of the message receiving object; for a bank, the basic account number of the message receiving object may refer to a bank card number of the message receiving object.
It should be noted that, after the content of the message to be pushed is acquired by analyzing the message pushing task file, the message to be pushed including the content prohibited from being pushed in the content of the message to be pushed may also be filtered. Filtering can be performed through keywords and the like, and the embodiment of the present invention does not limit the specific rule of filtering.
The contents to be pushed are prohibited, and at least the contents in violation of the laws and regulations are included.
Step S1012, determining the priority of the message to be pushed according to the type of the message to be pushed based on the preset corresponding relationship between the type and the priority of the message, and acquiring each channel account of the message receiving object associated with the basic account according to the basic account of the message receiving object.
Different types of messages to be pushed have different degrees of importance and thus different priorities. For example, advertisement-like messages are generally not important nor urgent, with a lower priority; the prompting messages for prompting weather, road conditions and the like are more important and have higher priority. The correspondence between the type and priority of the message may be set in advance.
Therefore, based on the preset corresponding relation between the type and the priority of the message, the priority of the message to be pushed can be determined according to the type of the message to be pushed. For example, the priority of the advertisement message is determined to be low, the priority of the prompt message such as weather forecast is determined to be medium, and the priority of the early warning message such as natural disaster early warning is determined to be urgent.
Because the message is pushed through multiple channels, according to the incidence relation (or called corresponding relation) between the basic account of the message receiving object and the channel accounts in each message pushing channel, each channel account of the message receiving object can be obtained.
For example, the basic account number of the message receiving object is a mobile phone number, the mobile phone number is bound to the message receiving object when the message receiving object uses an email, instant messaging software, an online bank and video playing software, corresponding relations exist between the mobile phone number and channel account numbers of the email, the instant messaging software, the online bank and the video playing software respectively, and account numbers of the email, the instant messaging software, the online bank and the video playing software of the message receiving object can be obtained through the corresponding relations; and for the short message channel, the mobile phone number is also the channel account number of the short message channel.
Generally, the association relationship between the basic account and the channel account is stored in the database of the channel. And querying a database of channels according to the basic account number to obtain a channel account number associated with the basic account number.
According to the embodiment of the invention, the priority of the message to be pushed is determined by acquiring the type of the message to be pushed, the priority of the message can be rapidly determined, the channel account number associated with the basic account number is acquired according to the basic account number of the message receiving object, and the analysis and the channel account number can be rapidly completed.
Based on the content of the above embodiment, the specific step of acquiring the account numbers of the channels of the message receiving object according to the basic account number of the message receiving object includes: inquiring local cache, and acquiring each channel account related to the basic account of each message receiving object; the local cache is used for storing the association relationship between the basic account and the channel account of each message push channel.
It should be noted that, before acquiring the account numbers of the channels of the message receiving object according to the basic account number of the message receiving object, acquiring the association relationship between the basic account number and the channel account number from the database of each channel, and storing the association relationship between the basic account number and each channel account number in the local cache.
After the basic account number of the message receiving object is obtained, the local cache is directly inquired to carry out account number matching, and account numbers of all channels corresponding to the basic account number are obtained.
According to the embodiment of the invention, the channel account corresponding to the basic account of the message receiving object is obtained by inquiring the local cache, and the matching is only carried out in the local cache without reading the database of the message pushing channel in real time during processing, so that the processing performance can be effectively improved, and the speed and the efficiency of obtaining the channel account are improved.
Based on the content of the above embodiment, the specific step of parsing the message push task file includes: acquiring the total line number of the content of the message pushing task file; and determining the thread number for analyzing the message pushing task file according to the total number of the threads, and distributing and reading the starting position and the ending position of the message pushing task file for each thread.
It should be noted that, when there are a large number of message receiving objects of the message to be pushed, there are a large number of lines of contents of the message pushing task file.
Before analyzing the message pushing task file, the total line number of the content of the message pushing task file is obtained.
After the total line number of the content of the message pushing task file is obtained, the number of threads required for analyzing the message pushing task file is calculated according to the total line number of the content of the message pushing task file and the capacity of hardware resources.
And determining the starting position and the ending position of each thread for distributing and reading the message pushing task file according to the number of the threads required for analyzing the message pushing task file, and distributing the determined starting position and the determined ending position to each thread.
And for each thread, reading the message push task file according to the distributed starting position and the distributed ending position, and analyzing the message push task file. And reading and analyzing the message pushing task file by each thread in parallel.
For each thread, reading the content of the message pushing task file from the distributed starting position until the distributed ending position is read, so as to obtain the content of the message pushing task file from the distributed starting position to the distributed ending position; and after the content of the message push task file from the starting position to the ending position is read, analyzing the read content.
Through the parallel reading and analysis of all the threads, the content of the message to be pushed, the type of the message to be pushed and the basic account of the message receiving object can be obtained.
The embodiment of the invention can improve the speed of file analysis and more quickly obtain the content of the message to be pushed, the type of the message to be pushed and the basic account number of the message receiving object by reading and analyzing the file content in parallel through the multi-point and multi-thread reading technology.
Based on the content of the above embodiment, after obtaining each channel account corresponding to the basic account of each message receiving object, the method further includes: and for each message pushing channel, if judging that the channel account number of the message receiving object does not exist in the storage space, storing the channel account number of the message receiving object.
It should be noted that, in the message pushing process, a phenomenon of a repeated channel account may occur, so that the same message receiving object receives messages through the same message pushing channel for multiple times, which causes user's dislike and complaint, and user experience is poor. For this reason, channel accounts need to be deduplicated.
The specific steps of removing the channel account are as follows:
for each message pushing channel, after acquiring a channel account of each message receiving object in the message pushing channel, inquiring the stored channel account;
if the stored channel account is inquired to obtain the channel account without a message receiving object in the stored channel accounts, which indicates that the channel account is not the same as the channel account and the channel account is stored without causing repeated channel accounts, adding the channel account into the stored channel account; if the stored channel account is inquired to obtain the channel account of the stored channel account which has the message receiving object, the channel account which is the same as the channel account is obtained, the channel account is stored to cause repeated channel accounts and repeatedly push messages to the channel account, the stored channel account is not operated, and the phenomenon that the repeated channel accounts cause repeated message pushing to the same channel account is avoided.
When storing the acquired channel account, a channel account management file may be created, in which the channel account is stored. The Hash value of the channel account can be stored in the file by adopting a B + Tree, so that the channel account can be stored. Since the result of the Hash operation is unique, the Hash value of each channel account is also unique.
The Hash value of the channel account refers to an operation result obtained by performing Hash operation on the channel account.
Correspondingly, when the storage space is inquired, carrying out Hash operation on the acquired channel account to obtain a Hash value of the channel account, and inquiring whether the storage space has the Hash value; if the Hash value exists, indicating that a channel account of a message receiving object exists in the storage space; if the Hash value does not exist, the channel account of the message receiving object does not exist in the storage space.
The search for any keyword in the B + Tree must follow a path from the root node to the leaf node, and the path lengths of all keyword queries are the same, so that the query efficiency of each data is equivalent, and the query efficiency is not reduced when the data amount is increased. Because the number of bytes stored by the B + Tree is small, the requirement on the storage space is low, the I/O read-write times are reduced, and the read-write speed is improved. And independent file storage is carried out on each message pushing task through the B + Tree, so that independent duplicate removal comparison is conveniently carried out on each message pushing task, and a storage space is cleaned after the message pushing task is completed.
It should be noted that before the channel account is deduplicated, the channel accounts in the pre-established blacklist may also be filtered, and the channel accounts in the blacklist are not stored in the message queue, so that the content to be pushed is not pushed to the channel accounts in the blacklist.
According to the embodiment of the invention, only one record is reserved in the storage space for the same channel account number by removing the duplicate of the repeated channel account number, so that the user complaint caused by repeated message pushing can be avoided, the user experience can be improved, and the waste of software and hardware resources can be avoided.
Based on the content of the above embodiment, the specific step of pushing the content of each message to be pushed to all channel accounts of the message receiving object includes: before the content of each message to be pushed is pushed, acquiring the times of pushing the message to a channel account of a message pushing channel through the message pushing channel in the period for each message pushing channel, and judging whether the times reach the preset maximum times; if not, pushing the content of the message to be pushed to a channel account of a message receiving object corresponding to the message pushing channel through the message pushing channel; and if so, not pushing the content of the message to be pushed.
It should be noted that, in the process of pushing a message, a phenomenon that a message is pushed to a message receiving object multiple times within a period may occur, which causes a sense of disagreement and complaint of a user, and the user experience is poor. Therefore, the frequency of pushing messages by each channel account through the same message pushing channel in one period needs to be controlled.
And when the content of the message to be pushed is pushed to the channel account of the message receiving object corresponding to each message pushing channel through each message pushing channel, taking out the content of each message to be pushed and the channel account of the message receiving object from the message queue according to the priority of the message to be pushed.
And for each taken-out content of the message to be pushed, acquiring the number of times that the message is pushed to a channel account of the message pushing channel through the message pushing channel in the period for each message pushing channel before the content of the message to be pushed is pushed.
A push frequency management file may be created, and the number of times that messages have been pushed through each message push channel in this period is stored in the push frequency management file.
And for each channel account, pushing the frequency management file by inquiring the pushing frequency management file, and acquiring the pushing times of each message receiving object through the message pushing channel corresponding to the channel account in the period.
The period is a preset time period, which may be a day, a week, a month, and the like, and the time period of the period is not particularly limited in the embodiment of the present invention.
When the pushed times in the period are stored, the pushed times in the period corresponding to the Hash value of the channel account can be stored by adopting a B + Tree. When the number of times of message pushing is inquired, the number of times of pushing in the period is obtained by inquiring the Hash value of the channel account.
And judging whether the obtained pushed times in the period reach the maximum times preset by the message pushing channel.
It can be understood that the maximum times of pushing messages in one period by different message pushing channels can be preset respectively. For example, the SMS channel is 3 times per week and the email channel is 1 time per month. For the same message pushing channel, the period unit may not be limited to one, for example, the short message channel may be set to push at most 2 times per week and at most 5 times per month.
For each message pushing channel, if judging that the number of times of pushing messages to the channel account in the period reaches the preset maximum number of times, not pushing messages in the period; if the number of times of pushing the message to the channel account in the period is judged and known to be less than the preset maximum number of times, pushing can be carried out in the period, the number of times of pushing in the period in the pushing frequency management file is added to 1, the content of the message to be pushed is pushed through a message pushing channel, and the message is pushed to the channel account through the message pushing channel.
It can be understood that, after the present period is ended, the stored number of times that have been pushed in the present period is cleared, so that at the beginning of the next period, the stored number of times that have been pushed in the next period is cleared.
It should be noted that, for different cycle units, the pushed times in the cycle may be stored separately.
For example, for each message push channel, file storage may be performed for each week and month, the number of times that each week and month has been pushed is stored, new files are generated for a new week and a new month, and files of a previous week and a previous month are deleted.
The embodiment of the invention controls the number of the messages received by the message pushing object in one period by setting the maximum number of times of pushing in one period, can prevent the message pushing object from receiving too many same messages in one period, can reduce user complaints, improve user experience and avoid waste of software and hardware resources.
Based on the content of the embodiment, the specific steps of pushing the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed include: before the content of each message to be pushed is pushed, the sending state setting of the content of each message to be pushed is obtained, if the sending state is set to be the sending waiting state, the content of the message to be pushed is pushed to the channel account number of the message receiving object corresponding to each message pushing channel through each message pushing channel; and if the sending state is set to be a suspended sending state or a cancelled sending state, not pushing the content of the message to be pushed.
Specifically, when the content of the message to be pushed is pushed to the channel account of the message receiving object corresponding to each message pushing channel through each message pushing channel, the content of each message to be pushed and the channel account of the message receiving object are taken out from the message queue according to the priority of the message to be pushed.
And for each content of the taken out message to be pushed, acquiring the sending state setting of the content of the message to be pushed before pushing the content of the message to be pushed.
And setting a sending state, wherein the sending state is preset by a message pushing party. The sending state of the content of the message to be pushed can be set to a waiting sending state, a suspending sending state and a cancelling sending state. The embodiment of the present invention does not specifically limit the specific type of the transmission status.
It can be understood that, when not set, the sending state of the content of the message to be pushed is defaulted to the waiting sending state, and the waiting sending state can be modified into a suspended sending state or a cancelled sending state through setting; when the sending state of the content of the message to be pushed is the sending pause state, the sending pause state can be recovered through setting, and the sending pause state is modified into a sending waiting state.
After the sending state of the content of the message to be pushed is acquired, if the sending state is set as a waiting sending state, pushing the content of the message to be pushed to a channel account number of a message receiving object corresponding to each message pushing channel through each message pushing channel; and if the sending state is set to be a suspended sending state or a cancelled sending state, not pushing the content of the message to be pushed.
It can be understood that, it may be determined whether the number of times that the message has been pushed to the channel account of the message pushing channel through the message pushing channel in the period reaches a preset maximum number of times, and if not, it may be determined whether the sending state of the content of each message to be pushed is set.
According to the embodiment of the invention, the preset sending state setting is obtained, the manual pausing, recovering and canceling processing of the message pushing is supported, the frequency of sending the message pushing can be further limited according to the requirement, so that the message pushing object is prevented from receiving too many messages, the complaint of the user can be reduced, the user experience is improved, and the waste of software and hardware resources is avoided.
Fig. 2 is a functional block diagram of a message pushing apparatus according to an embodiment of the present invention. Based on the content of the foregoing embodiment, as shown in fig. 2, a message pushing apparatus includes a message parsing module 201 and a message pushing module 202, where:
the message analysis module 201 is configured to obtain the content of the message to be pushed, the priority of the message to be pushed, and each channel account of the message receiving object by analyzing the message pushing task file; the message pushing module 202 is configured to push the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed.
Specifically, for each message push task file, the message parsing module 201 may obtain information of a message to be pushed and information of a message receiving object by parsing the message push task file, may obtain content of the message to be pushed and priority of the message to be pushed according to the information of the message to be pushed, and may obtain each channel account of the message receiving object according to the information of the message receiving object.
The message pushing module 202 sequentially pushes the messages according to the priority of the messages to be pushed and the sequence of the priority from high to low. When the message pushing module 202 pushes any message to be pushed, the content of the message to be pushed is pushed through each message pushing channel; and for any message pushing channel, pushing the content of the message to be pushed to a channel account of the message pushing channel of a message receiving object according to an interface protocol corresponding to the message pushing channel.
The specific method and flow for implementing the corresponding function by each module included in the message pushing apparatus are described in the above embodiment of the message pushing method, and details are not described herein again.
The message pushing device is used for the message pushing method of the foregoing embodiments. Therefore, the description and definition in the message pushing method in the foregoing embodiments may be used for understanding the execution modules in the embodiments of the present invention.
According to the embodiment of the invention, by acquiring the priority of the message to be pushed and pushing the content of the message to be pushed to the channel account of the message receiving object through each message pushing channel according to the priority of the message to be pushed, when the unified pushing of a plurality of message pushing channels is carried out, the message with high priority can be pushed firstly, and then the message with low priority can be pushed, so that the message with high priority can be pushed timely and quickly, and the problem that the user cannot receive the message with high priority due to the fact that the message with low priority is pushed firstly is avoided.
Fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention. Based on the content of the above-described embodiment, as shown in fig. 3, an electronic apparatus includes: a processor (processor)301, a memory (memory)302, and a bus 303; wherein, the processor 301 and the memory 302 complete the communication with each other through the bus 303; processor 301 is configured to call program instructions in memory 302 to perform the methods provided by the various method embodiments described above, including, for example: acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file; and pushing the content of each message to be pushed to a channel account of a message pushing channel of the message receiving object through each message pushing channel according to the priority of the message to be pushed.
Another embodiment of the present invention discloses a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-mentioned method embodiments, for example, including: acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file; and pushing the content of each message to be pushed to a channel account of a message pushing channel of the message receiving object through each message pushing channel according to the priority of the message to be pushed.
Another embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the methods provided by the above method embodiments, for example, including: acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file; and pushing the content of each message to be pushed to a channel account of a message pushing channel of the message receiving object through each message pushing channel according to the priority of the message to be pushed.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. It is understood that the above-described technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the above-described embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A message pushing method, comprising:
acquiring the content of a message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing a message pushing task file;
and pushing the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed.
2. The message pushing method according to claim 1, wherein the specific step of obtaining the content of the message to be pushed, the priority of the message to be pushed, and the account number of each channel of the message receiving object by parsing the message pushing task file comprises:
analyzing the message pushing task file to obtain the content of the message to be pushed, the type of the message to be pushed and a basic account number of a message receiving object;
determining the priority of the message to be pushed according to the type of the message to be pushed based on the preset corresponding relation between the type and the priority of the message, and acquiring each channel account of the message receiving object associated with the basic account according to the basic account of the message receiving object.
3. The message pushing method according to claim 2, wherein the specific step of acquiring, according to the basic account of the message receiving object, the account of each channel of the message receiving object includes:
inquiring local cache, and acquiring each channel account related to the basic account of each message receiving object;
the local cache is used for storing the association relationship between the basic account and the channel account of each message push channel.
4. The message pushing method according to claim 2, wherein the specific step of parsing the message pushing task file comprises:
acquiring the total line number of the content of the message pushing task file;
determining and analyzing the thread number of the message pushing task file according to the total number of the rows, and distributing and reading the starting position and the ending position of the message pushing task file for each thread;
and for each thread, reading the message push task file and analyzing according to the distributed starting position and the distributed ending position.
5. The message pushing method according to claim 3, wherein after acquiring the channel account corresponding to the primary account of each message receiving object, the method further comprises:
and for each message pushing channel, if judging that the channel account of the message receiving object does not exist in the storage space, storing the channel account of the message receiving object.
6. The message pushing method according to any one of claims 1 to 5, wherein the specific step of pushing the content of each message to be pushed to all channel accounts of the message receiving object includes:
before the content of each message to be pushed is pushed, acquiring the times of pushing the message to a channel account of the message pushing channel through the message pushing channel in the period for each message pushing channel, and judging whether the times reach the preset maximum times;
if not, pushing the content of the message to be pushed to a channel account of a message receiving object corresponding to the message pushing channel through the message pushing channel; and if so, not pushing the content of the message to be pushed.
7. The message pushing method according to any one of claims 1 to 5, wherein the specific step of pushing the content of each message to be pushed to all channel accounts of the message receiving object includes:
before the content of each message to be pushed is pushed, acquiring the sending state setting of the content of each message to be pushed, if the sending state setting is a waiting sending state, pushing the content of the message to be pushed to a channel account of a message receiving object corresponding to each message pushing channel through each message pushing channel; and if the sending state is set to be a sending pause state or a sending cancel state, not pushing the content of the message to be pushed.
8. A message push apparatus, comprising:
the message analysis module is used for acquiring the content of the message to be pushed, the priority of the message to be pushed and each channel account of a message receiving object by analyzing the message pushing task file;
and the message pushing module is used for pushing the content of each message to be pushed to all channel accounts of the message receiving object according to the priority of the message to be pushed.
9. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 7.
CN201811295453.6A 2018-11-01 2018-11-01 Message pushing method and device Pending CN111131368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811295453.6A CN111131368A (en) 2018-11-01 2018-11-01 Message pushing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811295453.6A CN111131368A (en) 2018-11-01 2018-11-01 Message pushing method and device

Publications (1)

Publication Number Publication Date
CN111131368A true CN111131368A (en) 2020-05-08

Family

ID=70494911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811295453.6A Pending CN111131368A (en) 2018-11-01 2018-11-01 Message pushing method and device

Country Status (1)

Country Link
CN (1) CN111131368A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614548A (en) * 2020-05-20 2020-09-01 广州平云小匠科技有限公司 Message pushing method and device, computer equipment and storage medium
CN111651287A (en) * 2020-05-31 2020-09-11 成都新潮传媒集团有限公司 Message notification method, device and computer readable storage medium
CN112565405A (en) * 2020-12-01 2021-03-26 彩讯科技股份有限公司 Unified message pushing method, system, equipment and computer readable storage medium
CN113014475A (en) * 2021-03-12 2021-06-22 中国平安财产保险股份有限公司 Message pushing integration method and device
CN113596150A (en) * 2021-07-28 2021-11-02 南方电网数字电网研究院有限公司 Message pushing method and device, computer equipment and storage medium
CN114339627A (en) * 2021-12-07 2022-04-12 联奕科技股份有限公司 Message centralized control forwarding method
CN114448922A (en) * 2022-02-08 2022-05-06 北京百度网讯科技有限公司 Message grading processing method, device, equipment and storage medium
CN114567695A (en) * 2020-11-27 2022-05-31 成都鼎桥通信技术有限公司 Message reminding method, device, equipment, storage medium and computer program product
WO2023103419A1 (en) * 2021-12-09 2023-06-15 上海帜讯信息技术股份有限公司 Message queue-based method and apparatus for sending 5g messages in batches, and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104591A (en) * 2014-08-06 2014-10-15 携程计算机技术(上海)有限公司 Message pushing method and system
WO2016192244A1 (en) * 2015-05-29 2016-12-08 中兴通讯股份有限公司 Message management method and device, mobile terminal and storage medium
CN107872483A (en) * 2016-09-27 2018-04-03 腾讯科技(北京)有限公司 Method for pushing, the apparatus and system of media content
CN108400927A (en) * 2018-01-22 2018-08-14 广州欧赛斯信息科技有限公司 A kind of information push method and device for high concurrent message
CN108696858A (en) * 2018-07-27 2018-10-23 国政通科技有限公司 A kind of method and system for establishing social networks based on phone number

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104591A (en) * 2014-08-06 2014-10-15 携程计算机技术(上海)有限公司 Message pushing method and system
WO2016192244A1 (en) * 2015-05-29 2016-12-08 中兴通讯股份有限公司 Message management method and device, mobile terminal and storage medium
CN107872483A (en) * 2016-09-27 2018-04-03 腾讯科技(北京)有限公司 Method for pushing, the apparatus and system of media content
CN108400927A (en) * 2018-01-22 2018-08-14 广州欧赛斯信息科技有限公司 A kind of information push method and device for high concurrent message
CN108696858A (en) * 2018-07-27 2018-10-23 国政通科技有限公司 A kind of method and system for establishing social networks based on phone number

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614548A (en) * 2020-05-20 2020-09-01 广州平云小匠科技有限公司 Message pushing method and device, computer equipment and storage medium
CN111651287A (en) * 2020-05-31 2020-09-11 成都新潮传媒集团有限公司 Message notification method, device and computer readable storage medium
CN114567695A (en) * 2020-11-27 2022-05-31 成都鼎桥通信技术有限公司 Message reminding method, device, equipment, storage medium and computer program product
CN114567695B (en) * 2020-11-27 2023-08-22 成都鼎桥通信技术有限公司 Message reminding method, device, equipment, storage medium and computer program product
CN112565405A (en) * 2020-12-01 2021-03-26 彩讯科技股份有限公司 Unified message pushing method, system, equipment and computer readable storage medium
CN112565405B (en) * 2020-12-01 2023-07-18 彩讯科技股份有限公司 Unified message pushing method, system, equipment and computer readable storage medium
CN113014475A (en) * 2021-03-12 2021-06-22 中国平安财产保险股份有限公司 Message pushing integration method and device
CN113596150A (en) * 2021-07-28 2021-11-02 南方电网数字电网研究院有限公司 Message pushing method and device, computer equipment and storage medium
CN113596150B (en) * 2021-07-28 2024-04-30 南方电网数字电网科技(广东)有限公司 Message pushing method, device, computer equipment and storage medium
CN114339627A (en) * 2021-12-07 2022-04-12 联奕科技股份有限公司 Message centralized control forwarding method
WO2023103419A1 (en) * 2021-12-09 2023-06-15 上海帜讯信息技术股份有限公司 Message queue-based method and apparatus for sending 5g messages in batches, and electronic device
CN114448922A (en) * 2022-02-08 2022-05-06 北京百度网讯科技有限公司 Message grading processing method, device, equipment and storage medium
CN114448922B (en) * 2022-02-08 2024-04-09 北京百度网讯科技有限公司 Message hierarchical processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111131368A (en) Message pushing method and device
CN106470149B (en) Message sending method and device
US20150207771A1 (en) Outgoing communications inventory
US10735590B2 (en) Framework for predictive customer care support
CN111953776A (en) Application service message pushing method and device, computer equipment and computer storage medium
CN109656700A (en) Distributed link tracking, system, equipment and storage medium under multi-tenant
CN111371672B (en) Message pushing method and device
CN112020024A (en) Short message sending management method, system and electronic equipment
CN104461742A (en) Method and device for optimizing computing equipment
CN104035941A (en) Information screening method and device
CN103796207A (en) Method and device for identifying false subscriber number
CN103888919A (en) Short message monitoring method and device thereof
CN111224814B (en) Message processing method and device
CN107612882B (en) User behavior identification method and device based on intermediate log
CN110972086A (en) Short message processing method and device, electronic equipment and computer readable storage medium
CN114090409A (en) Message processing method and device
CN107193721B (en) Method and device for generating log
CN113765871B (en) Method and device for managing fort machine
CN111274203B (en) System and method for storing telephone bill
CN115080504A (en) File management method, terminal and storage medium
CN113779017A (en) Method and apparatus for data asset management
CN111953583A (en) Information processing system and method, electronic device, and computer-readable storage medium
CN111291127A (en) Data synchronization method, device, server and storage medium
CN113141403B (en) Log transmission method and device
CN116017742B (en) Data processing method, system and storage medium based on multistage NWDAF

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508