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

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

Info

Publication number
CN108460115B
CN108460115B CN201810138040.0A CN201810138040A CN108460115B CN 108460115 B CN108460115 B CN 108460115B CN 201810138040 A CN201810138040 A CN 201810138040A CN 108460115 B CN108460115 B CN 108460115B
Authority
CN
China
Prior art keywords
message
task
pushing
user
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810138040.0A
Other languages
Chinese (zh)
Other versions
CN108460115A (en
Inventor
王强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201810138040.0A priority Critical patent/CN108460115B/en
Publication of CN108460115A publication Critical patent/CN108460115A/en
Application granted granted Critical
Publication of CN108460115B publication Critical patent/CN108460115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The invention discloses a message pushing method, a message pushing device, computer equipment and a storage medium. The method comprises the following steps: acquiring a message pushing task, wherein the message pushing task comprises a message pushing task ID and at least one user ID; inquiring a database based on the message pushing task ID to acquire target message task data with a task state to be pushed; verifying the target message task data by adopting at least one verification rule to obtain a verification result; and if the verification result is that the verification is passed, pushing the target message task data to at least one client corresponding to the user ID, and updating the task state of the target message task data to be a pushing success state. The message pushing method can send the target message task data in the state to be pushed to the client of the corresponding user ID, so that repeated messages or ineffective messages are prevented from being pushed.

Description

Message pushing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of message processing, and in particular, to a message pushing method and apparatus, a computer device, and a storage medium.
Background
The message pushing platform is used for pushing messages, can be connected with a plurality of APPs and is used for pushing corresponding messages for users of the APPs. Because the message pushing platform serves a plurality of APPs, when a server of the message pushing platform pushes messages in a peak sending period, the number of the messages is large, and database reading and writing are frequent. Because the functions of the message pushing platform are continuously optimized and some new functions are developed, the server corresponding to the message pushing platform needs to be restarted, or the server needs to be restarted due to the fact that the server is down. When the server is restarted, because the server of the message pushing platform does not store the message which is being pushed before the restart but is not successfully pushed, the server cannot continuously send the message after the restart, so that the user cannot receive the message which is being received before the restart. Moreover, in the process of pushing the message, the current message pushing platform is easy to push the message which has been pushed or is out of date and invalid to the user, so that the user receives repeated messages or invalid messages, and the impression of the accuracy and timeliness of the message pushed by the message pushing platform by the user is influenced.
Disclosure of Invention
The embodiment of the invention provides a message pushing method, a message pushing device, computer equipment and a storage medium, and aims to solve the problem that a current message pushing platform is easy to push repeated messages or ineffective messages.
In a first aspect, an embodiment of the present invention provides a message pushing method, including:
acquiring a message pushing task, wherein the message pushing task comprises a message pushing task ID and at least one user ID;
inquiring a database based on the message pushing task ID to acquire target message task data with a task state to be pushed;
verifying the target message task data by adopting at least one verification rule to obtain a verification result;
and if the verification result is that the verification is passed, pushing the target message task data to at least one client corresponding to the user ID, and updating the task state of the target message task data to be a pushing success state.
In a second aspect, an embodiment of the present invention provides a message pushing apparatus, including:
the message pushing task acquiring module is used for acquiring a message pushing task, and the message pushing task comprises a message pushing task ID and at least one user ID;
the target message task data acquisition module is used for inquiring a database based on the message pushing task ID and acquiring target message task data with a task state to be pushed;
the verification processing module is used for verifying the target message task data by adopting at least one verification rule to obtain a verification result;
and the target message task sending module is used for pushing the target message task data to at least one client corresponding to the user ID if the verification result is that the verification is passed, and updating the task state of the target message task data into a pushing success state.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the message pushing method when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the message pushing method are implemented.
According to the message pushing method and device, the computer equipment and the storage medium provided by the embodiment of the invention, the database is inquired based on the message pushing task ID, and the target message task data with the task state to be pushed is obtained, so that the message in the target message task data can not be repeatedly sent to the user; and then, verifying the target message task data by adopting at least one verification rule, pushing the target message task data with the verification result of passing the verification to a client corresponding to at least one user ID, and updating the task state of the target message task data into a successful pushing state so as to ensure that the messages with the same content are not repeatedly pushed to the client corresponding to the same user ID in the next pushing. The message pushing method, the message pushing device, the computer equipment and the storage medium can realize the purpose of sending the target message task data in the state to be pushed to the client of the corresponding user ID, and avoid pushing repeated messages or invalid messages.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a message pushing method in embodiment 1 of the present invention.
Fig. 2 is another flowchart of a message pushing method in embodiment 1 of the present invention.
Fig. 3 is a specific diagram of step S30 in fig. 1.
Fig. 4 is a specific diagram of step S40 in fig. 1.
Fig. 5 is another specific diagram of step S40 in fig. 1.
Fig. 6 is a schematic block diagram of a message pushing apparatus in embodiment 2 of the present invention.
Fig. 7 is a schematic diagram of a computer device in embodiment 4 of the present invention.
Detailed Description
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, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Fig. 1 shows a flowchart of a message push method in the present embodiment. The message pushing method is applied to a message pushing platform, and is particularly applied to a server of the message pushing platform. The message pushing platform is used for recording the state corresponding to the message which needs to be pushed through the message pushing platform and pushing the message according to the state so as to avoid repeated pushing or invalid pushing and further avoid pushing the repeated message or the invalid message to the client corresponding to the user. The client can be a terminal such as a smart phone and a PAD adopted by a user. As shown in fig. 1, the message pushing method includes the following steps:
s10: and acquiring a message pushing task, wherein the message pushing task comprises a message pushing task ID and at least one user ID.
And the server of the message pushing platform acquires at least one message pushing task sent by the service platform. The service platform is an APP platform corresponding to the message pushing platform. A platform administrator can send a message pushing task to a server of a message pushing platform through a service platform, so that the server pushes a corresponding message to a specific user after receiving the message pushing task, wherein the specific user refers to a user to which the message is pushed. Each message push task carries a unique corresponding message push task ID. The message pushing task ID is an identifier corresponding to the message pushing task, and can be used for uniquely identifying the message pushing task. The message pushing task refers to a task of pushing a message to a specific user by a service platform. The message pushing task also comprises a user ID, wherein the user ID refers to a user identification stored in a service platform by a user, and the user ID can be used for identifying each user registered in the service platform. The user ID includes, but is not limited to, a user account stored by the user in a service platform.
S20: and inquiring a database based on the ID of the message pushing task to acquire target message task data with a task state to be pushed.
The target message task data refers to message task data which is searched in a database, has a task state to be pushed and corresponds to the message pushing task ID. The message push task ID refers to a message task identifier stored in message task data in a database connected to the service platform. The database is a storage space used for storing the message task data, and the database is connected with the server of the message pushing platform so that the server can obtain the corresponding target message task data from the database. The database may be a database built in the server or an external database connected to the server.
Specifically, a message state data table is arranged in the database and used for storing an original push task ID and a corresponding task state of each message in the database, wherein the task state refers to a state corresponding to a message of a message push task, and the task state includes a non-push state, a push success state and a push failure state. The non-pushing state refers to a state in which pushing is not performed yet, the pushing success state refers to a state in which pushing is performed and the pushing is smoothly performed to a specific user, and the pushing failure state refers to a state in which pushing is performed but the pushing is not performed to the specific user. There are various reasons for the message being in the push failure state, and the message may be not smoothly pushed to a specific user due to the server being down or restarted in the push process.
In this embodiment, the database is specifically a Redis database, and the Redis database is a database storing key value data. The Redis is a key-value storage system, and supports storage of data of multiple value types, where the value types include string, list, set, zset, and hash. Redis supports master-slave machine synchronization, data can be synchronized from a master server to any number of slave servers, data can also be synchronized to master servers corresponding to other slave servers related to each slave server, and the storage efficiency of stored data is high.
The Redis database stores a push log table for recording the task state of each message pushed to the corresponding user. The push log table is a log table for recording key value pairs in the database. The push log table may record the serial number of each user ID and the task status of the message in detail. The serial number corresponding to the user ID in each message task is a key for pushing a log table in a Redis database, and a user can be uniquely determined by the key of the serial number of each user ID. The task state of the message corresponding to the user ID is a value of a push log table in a Redis database and is used for recording the task state of the message corresponding to each user ID. In this embodiment, the Redis database records the task state by using a specific digital identifier, and if the task state is an un-pushed state, the value in the push log table is 0; when the task state is a push success state, the value in the push log table is 1; and when the task state is the pushing failure state, the value in the pushing log table is 2, so that the corresponding task state can be determined according to the data identification.
Specifically, a server of the message push platform queries a message state data table in a database connected with the server, obtains message task data of which the task state is a to-be-pushed state, and then obtains target message task data based on a message push task ID. The state to be pushed comprises a non-pushing state and a pushing failure state. It can be understood that, when acquiring message push tasks of different service platforms, the server firstly queries a message state data table in the database, acquires message task data of which all task states are non-push states and/or push failure states, and acquires data corresponding to an original push task ID from the acquired message task data as target message task data. The target message task data is data to be pushed to the user by the message pushing task.
Further, the message task data further includes a message push type, a message template, and an application ID corresponding to a message to be pushed.
The message pushing type refers to a pushing type preset by the service platform and used for limiting message task data to be pushed. The message push type corresponds to its data type. The message push type includes a personal message push type and an advertisement message push type. The personal message pushing type refers to a message pushing type for pushing a message pushing task to a specific certain user, namely, the data type of the personal message pushing type is a special pushing type. For example, a user uses a bank card to perform consumption once at a certain time, after the consumption is completed, the bank platform pushes a bank card consumption message to the user through the message pushing platform, and a message pushing type corresponding to the bank card consumption message is a personal message pushing type, that is, a data type of the bank card consumption message is a special pushing type. The announcement message pushing type refers to a message pushing type of pushing a message pushing task to a certain group of specific users. For example, a certain service platform needs to push a member benefit message to a group of users handling members in the service platform through a message push platform, and a message push type corresponding to the member benefit message is an announcement message push type, that is, a data type of the member benefit message is a general push type.
The message template refers to a template containing different message contents in message task data, and each message pushing task ID has a corresponding message template. For example, when a bank card consumption message is pushed to a user, the consumption time and the consumption amount of the user only need to be supplemented based on a message template corresponding to the bank card consumption message. The message template can shorten the generation time of the message and is convenient for sending the message to the corresponding user in time.
The application ID refers to an identifier corresponding to the service platform, and specifically refers to an identifier of an APP corresponding to the service platform. The application ID may be used to identify a service platform to determine which service platform is to send the message push task.
S30: and verifying the target message task data by adopting at least one verification rule to obtain a verification result.
The check rule is a rule for detecting whether the target message task data meets a preset check standard, and the check rule may include a check rule for judging whether the target message task data has an associated terminal ID corresponding to the message push task ID, a check rule for judging whether the current time of the system is within the valid time, or both the two check rules. The associated terminal ID is associated with the user ID, and may refer to a user mobile phone number corresponding to the user ID. Whether the associated terminal ID corresponding to the message pushing task ID exists in the target message task data is judged through the check rule, so that the target message task data is ensured to have corresponding receiving equipment, namely a mobile phone corresponding to the associated terminal ID, and the validity of message pushing is ensured. The effective time refers to a pushing time period for pushing target message task data, which is preset by the service platform, and the effective time includes a pushing start time and a pushing end time, and the message pushing platform can push the target message task data to at least one corresponding user between the pushing start time and the pushing end time so as to ensure timeliness of message pushing.
After the target message task data is obtained, at least one preset verification rule is adopted to verify the target message task data, and a verification result is obtained. The verification result comprises verification passing and verification failure. Specifically, when it is determined that the message push task ID in the target message task data has the corresponding associated terminal ID and the current time of the system of the message push platform is within the valid time preset by the service platform, the verification result obtained by verifying the target message task data by using the verification rule is that the verification is passed. Otherwise, the verification fails.
S40: and if the verification result is that the verification is passed, pushing the target message task data to the client corresponding to the at least one user ID, and updating the task state of the target message task data into a pushing success state.
And when the verification result is that the verification is passed, the message pushing platform pushes the target message task data to the client corresponding to the at least one user ID. Because the user ID refers to a user account number stored in the service platform by the user, and the user account number can be associated with a user mobile phone number or an electronic mailbox, the target message task data can be sent to the client corresponding to the user ID based on the user ID, so that the user can check the target message task data through a mobile phone corresponding to the user mobile phone number, or the user logs in the corresponding user account number or electronic mailbox to check the target message task data by adopting a computer or a mobile phone and other clients.
Further, after the target message task data is sent to the client corresponding to the user ID, the task state of the target message task data is updated to a push success state, which indicates that the target message task data has been sent to the client corresponding to the user ID. The task state of the target message task data is updated to be the push success state, and the service platform can be helped to know the task state of the target message task data in real time.
S10-S40, acquiring target message task data with a task state to be pushed by querying a database based on a message pushing task ID so as to ensure that messages in the target message task data are not repeatedly sent to a user; then, at least one check rule is adopted to check the target message task data to obtain a check result so as to ensure the effectiveness and timeliness of the target message task data pushing; when the verification result is that the verification is passed, pushing the target message task data to a client corresponding to at least one user ID so as to ensure the pertinence of pushing the target message task data; and updating the task state of the target message task data into a pushing success state to update the state of the message in the target message task data, so as to ensure that the message with the same content is not repeatedly pushed to the client corresponding to the same user ID in the next pushing. The message pushing method can ensure that target message task data with each task state being a to-be-pushed state can be sent to the client corresponding to the user ID, and because the to-be-pushed state comprises a non-pushed state and a pushing failure state, messages which are not pushed yet and messages which are pushed but failed to be pushed can be used as target message task data to be pushed to the client corresponding to at least one user ID, so that the situation that the target message task data cannot be pushed to the user due to loss in the message pushing process can be avoided.
In a specific embodiment, as shown in fig. 2, before the step of verifying the target message task data by using at least one verification rule and obtaining the verification result in step S30, the message pushing further includes the following steps:
s301: and if the target message task data is in a pushing failure state, pushing the target message task data to a client corresponding to at least one user ID, and updating the task state of the target message task data to be in a pushing success state.
The state to be pushed comprises a non-pushed state and a pushing failure state. When the message pushing platform pushes the target message task data to the client corresponding to the at least one user ID each time, there may be a situation of pushing failure, and the reasons for the pushing failure include but are not limited to that, in the message pushing process, a server is down or the message pushing platform needs to perform system upgrade. And if the pushing fails, changing the task state of the message corresponding to the target message task data into a pushing failure state. When the task state is the push failure state, the target message task data corresponding to the push failure state is not pushed to the specific user, so that the push needs to be performed again. Correspondingly, when the message pushing platform acquires a message to be pushed to a specific user, the task state corresponding to the message pushing platform needs to be set to be an un-pushed state in advance, so that the target message task data corresponding to the un-pushed state is the message task data which needs to be pushed but is not pushed to the client corresponding to the user ID.
In this embodiment, when the task state corresponding to the target message task data is the push failure state, the target message task data corresponding to the push failure state needs to be pushed to the client of the corresponding user ID again, so as to ensure that the corresponding user can receive the content of the target message task data sent by the message push platform on the client. After the push is successful, the task state corresponding to the target message task data needs to be updated to a push success state, so as to avoid repeatedly pushing the target message task data subsequently.
Because the target message task data corresponding to the push failure state has been sent to the client corresponding to the user ID once but the client corresponding to the user ID does not successfully receive the target message task data, step S30 has been executed before sending to the client corresponding to the user ID, that is, the step of verifying the target message task data by using at least one verification rule is performed, therefore, the target message task data corresponding to the push failure state does not need to be verified, the step of pushing the target message task data to the client corresponding to the at least one user ID can be directly performed, and the task state of the target message task data is updated to the push success state, so as to achieve the purpose of saving verification time.
S302: and if the target message task data is in a non-pushing state, verifying the target message task data by adopting at least one verification rule to obtain a verification result.
When the task state in the target message task data is a non-pushed state, which indicates that the target message task data is not pushed to a corresponding user, the target message task data corresponding to the non-pushed state should be checked by adopting a preset check rule, and when the message pushing task ID in the target message task data has a corresponding associated terminal ID (namely, the check rule of the validity of the message pushing user is met), and the current time of the system is within the preset valid time (namely, the check rule of the timeliness of message pushing is met), a check result that the check is passed is obtained.
If the message pushing task ID in the target message task data does not have a corresponding associated terminal (namely, does not meet the verification rule of the validity of the message pushing user) or the current time of the system exceeds the preset valid time, the target message task data is represented to be not in accordance with the verification rule (namely, does not meet the verification rule of the timeliness of message pushing), and the corresponding verification result is verification failure, the target message task data is deleted, so that repeated verification of the target message task data is avoided, and the storage space in a database is saved.
In a specific embodiment, as shown in fig. 3, in step S30, verifying the target message task data by using at least one verification rule to obtain a verification result, specifically including the following steps:
s31: and inquiring a database based on the ID of the message pushing task, and judging whether an associated terminal ID corresponding to the ID of the message pushing task exists or not.
And inquiring a database based on the message pushing task ID, acquiring target message task data corresponding to the message pushing task ID, and judging whether the target message task data has the associated terminal ID. If the associated terminal ID exists in the target message task data, step S32 is executed. If the associated terminal ID does not exist in the target message task data, step S34 is executed.
S32: and obtaining the valid time corresponding to the ID of the message pushing task, and judging whether the current time of the system is within the valid time.
Based on the message push task ID, obtaining an effective time corresponding to the message push task ID, where the effective time is a preset effective time associated with the message push sending task ID, and one message push task ID corresponds to one effective time, and when the message push platform pushes the message corresponding to the message push task ID, if the current time of the system exceeds the preset effective time, executing step S34. When the message push platform pushes the message corresponding to the message push task ID and the corresponding system current time is within the preset valid time, step S33 is executed.
In this embodiment, the valid time may be accurate to every second, so as to ensure the time accuracy of pushing the target message task data in the valid time to the client corresponding to the user ID. For example, at a specific holiday time, different service platforms want to catch up before the end of the holiday time, and the related service promotion message is pushed to the corresponding user through the message pushing platform; that is, when the message push type of the target message task data is the announcement message push type (i.e., the general push type), the number of corresponding users may be large. When different service platforms all want to send the message of the corresponding activity to the corresponding user before the current time of the holiday is finished, if the message is not sent to the corresponding user after the effective time of the current time of the holiday is finished, the message is the target message task data which exceeds the effective time, and no retransmission is needed because the activity related to the current time of the holiday is finished. Therefore, when pushing a message in the target message task data corresponding to the message pushing task ID, it is necessary to determine whether the current time of the system is within the valid time, so as to avoid that the message pushing platform pushes a message exceeding the valid time to a corresponding user, and the impression of the timeliness of the message pushing of the user on the message pushing platform or the service platform is influenced instead of achieving the purpose of message pushing.
S33: and if the associated terminal ID corresponding to the message pushing task ID exists and the current time of the system is within the valid time, acquiring a verification result passing the verification.
When the associated terminal ID corresponding to the message pushing task ID exists in the target message task data, the target message task data is ensured to have corresponding receiving equipment, namely a mobile phone corresponding to the associated terminal ID, so that the message pushing effectiveness is ensured; when the message pushing platform pushes the message in the target message task data, the corresponding system current time is within the preset effective time corresponding to the message pushing task ID so as to ensure the timeliness of message pushing; when the two conditions are simultaneously met, the message board in the target message task data is shown to meet a preset check rule, after the check is completed, the corresponding check result is that the check is passed, and the message pushing platform pushes the message template in the target message task data to the client corresponding to at least one user ID based on the check result that the check is passed.
S34: and if the associated terminal ID corresponding to the message pushing task ID does not exist or the current time of the system is not within the valid time, acquiring a verification result of verification failure.
And when the terminal equipment associated with the user ID does not exist in the target message task data, the message in the target message task data indicates that no user capable of receiving the message exists, and the verification result is verification failure. Or when the message pushing platform pushes the message in the target message task data, if the current time of the system is not within the valid time, the message is invalid, and pushing is not required, if a verification result obtained based on the verification rule is verification failure, the message in the target message task data does not need to be sent to the corresponding user, so that the sending amount of the service platform is reduced, and the subsequent continuous pushing of the message in the target message task data to the corresponding user can be avoided.
In a specific embodiment, the target message task data includes a general message template, where the general message template is a message template that is stored in advance by the message push platform and is not required to be changed, and can be directly sent to the client corresponding to the user ID. As shown in fig. 4, step S40, pushing the target message task data to the client corresponding to at least one user ID includes the following steps:
s411: and if the data type of the target message task data is a universal pushing type, pushing a universal message template to a client corresponding to at least one user ID.
If the data type of the target message task data is a general push type, the message push type corresponding to the message in the target message task data is a bulletin message push type, and a place needing to be modified does not exist, and the message push platform can directly push the general message template serving as the message to be pushed to a client corresponding to at least one user ID. For example, a service platform needs to send a message of point benefit to a member belonging to the service platform through a message pushing platform, a general message template related to the point benefit may be created in advance, and since the general message template corresponding to the point benefit is pushed for all members of the service platform, the general message template may be directly sent to a client used by each corresponding member (i.e., a user corresponding to a user ID) as a message to be pushed.
S412: and if the data type of the target message task data is a special pushing type, respectively acquiring user information corresponding to at least one user ID, combining each user information with the universal message template to form effective personal messages, and pushing each effective personal message to a client corresponding to the user ID.
If the data type of the target message task data is the special push type, the message push template in the target message task data is the special push type, the modifiable part in the general message template needs to be modified according to the user information of each specific user, so that the modifiable part is modified into the user information of the specific user to form a message to be pushed, and the message to be pushed is pushed to the client corresponding to the user ID. The user information includes, but is not limited to, the name of the user, and specific business information, such as a bank card consumption record, and the like. The message pushing platform pushes the message formed by combining the user information with the universal message template to the client corresponding to the user ID, so that the specific user can know the message content of the specific service of the specific user.
For example, the service platform sends target message task data such as the last month consumption situation and the point situation of the user to each user in the service platform through the message push platform at a fixed time every month, because the user name, the consumption situation, and the point situation corresponding to each user ID are different, user information corresponding to the user ID needs to be obtained in advance, a general message template is obtained based on the message push task ID, and then a modifiable portion is modified into the user information of the user (including but not limited to the user name, the consumption situation, and the user point situation mentioned in this embodiment) in the message template to form a message to be pushed, and the message is sent to the terminal device corresponding to the user ID, so that the user knows the last month consumption situation and the point situation of the user in the service platform.
In a specific embodiment, as shown in fig. 5, step S40, the method for pushing target message task data to a client corresponding to at least one user ID specifically includes the following steps:
s421: and if the user data volume of the target message task data is larger than a preset value, carrying out fragmentation processing on the user data volume of the target message task data according to a preset fragmentation rule to obtain at least two pieces of fragmentation task data.
When the message push type in the target message task data is the announcement message push type, it can be shown that the user data volume to be pushed by the target message task data is relatively large, and therefore, the user data volume of the user to be pushed by the target message task data needs to be obtained first. The preset value is a preset quantity value used for judging whether fragmentation processing is needed or not. The fragmentation rule is a rule for dividing the user data volume corresponding to the user ID in the target message task data into at least two pieces of fragmentation task data. The fragmentation task data refers to data obtained by dividing the target message pushing task data into different task data volumes, so that the user data volume of each fragmentation task data is not greater than a preset value, and the phenomenon that the message pushing process consumes a long time due to the fact that the data volume is too large is avoided.
For example, a target message task data needs to be pushed to 1000 users, the user data volume corresponding to the target message task data is 1000, the preset value of the user data volume that is pushed once by one task process set by the service platform is 200, the user data volume of the target message task data is greater than the preset value, and the message pushing platform performs fragmentation processing on the user data volume of the target message task data according to the user data volume of every 200 batches, so as to divide the target message task data into five corresponding fragmented task data.
S422: and pushing the at least two fragment task data to a client corresponding to at least one user ID through at least two task processes respectively.
After at least two pieces of fragment task data are obtained, a corresponding task process is respectively allocated to each piece of fragment task data, so that target message task data can be processed in parallel through at least two task processes, and the message pushing efficiency is improved. It can be understood that, as to how many fragmented task data the user data amount in the target message task data is divided into, the message pushing platform will give how many corresponding task processes are matched, so as to push the message in the target message task data to the client of each user ID through different task processes.
In this embodiment, if the user data amount in the target message task data is greater than a preset value, fragmentation processing needs to be performed on the user ID in the target task data according to a preset fragmentation rule, so as to fragment the user ID into at least two pieces of fragmentation task data; and then, the plurality of task processes are adopted to process at least two pieces of fragment task data respectively so as to push the messages corresponding to the fragment task data to the client side of the corresponding user ID, so that the message pushing efficiency can be improved, and sufficient time is provided for the follow-up messages in the target message task data corresponding to the task ID to be pushed to the client side of the corresponding user ID within the effective time.
The message pushing method comprises the steps of inquiring a database based on a message pushing task ID to obtain target message task data with a task state to be pushed, wherein the state to be pushed comprises a non-pushing state and a pushing failure state, verifying the target message task data corresponding to the non-pushing state by adopting at least one verification rule, and pushing the target message task data to at least one client corresponding to a user ID when the verification result is that the verification is passed; target message task data corresponding to the pushing failure state is pushed to the client corresponding to at least one user ID again, and the situation that the target message task data cannot be pushed to the user due to loss in the message pushing process can be avoided. Further, after the push is successful, the task state of the target message task data is updated to a push success state, so that the messages with the same content are not repeatedly pushed to the client corresponding to the same user ID in the next push. And if the user data amount corresponding to the user ID in the target message task data is larger than a preset value, the target message task data is subjected to fragmentation processing, so that the pushing speed can be increased.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Example 2
Fig. 6 shows a schematic block diagram of a message push apparatus in one-to-one correspondence with the message push method in embodiment 1. As shown in fig. 6, the message pushing device includes a message pushing task obtaining module 10, a target message task data obtaining module 20, a verification processing module 30 and a target message task sending module 40. The implementation functions of the message pushing task obtaining module 10, the target message task data obtaining module 20, the verification processing module 30, and the target message task sending module 40 correspond to the steps corresponding to the message pushing method in embodiment 1 one to one, and for avoiding repeated descriptions, detailed descriptions are not needed in this embodiment.
The message pushing task obtaining module 10 is configured to obtain a message pushing task, where the message pushing task includes a message pushing task ID and at least one user ID.
And a target message task data obtaining module 20, configured to query the database based on the message pushing task ID, and obtain target message task data whose task state is a to-be-pushed state.
And the verification processing module 30 is configured to verify the target message task data by using at least one verification rule, and obtain a verification result.
And the target message task sending module 40 is configured to, if the verification result is that the verification is passed, push the target message task data to the client corresponding to the at least one user ID, and update the task state of the target message task data to a push success state.
Preferably, the message pushing apparatus further includes a first target message task data processing unit 301 and a second target message task data processing unit 302.
The first target message task data processing unit 301 is configured to, if the target message task data is in a push failure state, execute a step of pushing the target message task data to a client corresponding to at least one user ID, and update a task state of the target message task data to a push success state.
A second target message task data unit 302, configured to, if the target message task data is in an un-pushed state, perform a step of verifying the target message task data by using at least one verification rule, and obtain a verification result.
Preferably, the check processing module 30 includes a first check processing unit 31, a second check processing unit 32, a first check result acquiring unit 33, and a second check result acquiring unit 34.
The first verification processing unit 31 is configured to query the database based on the message push task ID, and determine whether an associated terminal ID corresponding to the message push task ID exists.
The second check processing unit 32 is configured to obtain valid time corresponding to the message pushing task ID, and determine whether the current time of the system is within the valid time.
A first verification result obtaining unit 33, configured to obtain a verification result that the verification passes if there is an associated terminal ID corresponding to the message push task ID and the current system time is within the valid time.
A second verification result obtaining unit 34, configured to obtain a verification result of a verification failure if there is no associated terminal ID corresponding to the message push task ID or the current system time is not within the valid time.
Preferably, the target message task transmitting module 40 includes a first data type processing unit 411 and a second data type processing unit 412.
The first data type processing unit 411 is configured to, if the data type of the target message task data is a general push type, push a general message template to a client corresponding to at least one user ID.
And a second data type processing unit 412, configured to, if the data type of the target message task data is a dedicated push type, respectively obtain user information corresponding to at least one user ID, combine each user information with the general message template to form an effective personal message, and push each effective personal message to a client corresponding to the user ID.
Preferably, the target message task sending module 40 includes a user data amount processing unit 421 and a task progress pushing unit 422.
The user data amount processing unit 421 is configured to, if the user data amount of the target message task data is greater than a preset value, perform fragmentation processing on the user data amount of the target message task data according to a preset fragmentation rule to obtain at least two pieces of fragmentation task data.
The task process pushing unit 422 is configured to push the at least two fragmented task data to the client corresponding to the at least one user ID through the at least two task processes, respectively.
Example 3
This embodiment provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for pushing a message in embodiment 1 is implemented, and details are not described here for avoiding repetition. Alternatively, the computer program, when executed by the processor, implements the functions of each module/unit in the message pushing apparatus in embodiment 2, and is not described herein again to avoid repetition.
It is to be understood that the computer-readable storage medium may include: any entity or device capable of carrying said computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, etc.
Example 4
Fig. 7 is a schematic diagram of a computer device provided by an embodiment of the invention. As shown in fig. 7, the computer device 70 of this embodiment includes: a processor 71, a memory 72, and a computer program 73 stored in the memory 72 and executable on the processor 71. The processor 71, when executing the computer program 73, implements the steps of the message pushing method in the above embodiment 1, such as the steps S10 to S40 shown in fig. 1. Alternatively, the processor 71, when executing the computer program 73, implements the functions of the modules/units in the message pushing apparatus in embodiment 2, such as the functions of the message pushing task acquiring module 10, the target message task data acquiring module 20, the verification processing module 30 and the target message task sending module 40 shown in fig. 6.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; 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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A message pushing method, comprising:
acquiring a message pushing task, wherein the message pushing task comprises a message pushing task ID and at least one user ID;
inquiring a database based on the message pushing task ID to acquire target message task data with a task state to be pushed;
verifying the target message task data by adopting at least one verification rule to obtain a verification result;
if the verification result is that the verification is passed, pushing the target message task data to at least one client corresponding to the user ID, and updating the task state of the target message task data into a successful pushing state;
wherein, the verifying the target message task data by using at least one verification rule to obtain a verification result includes:
inquiring a database based on the ID of the message pushing task, and judging whether an associated terminal ID corresponding to the ID of the message pushing task exists or not;
obtaining effective time corresponding to the ID of the message pushing task, and judging whether the current time of the system is within the effective time;
if the associated terminal ID corresponding to the message pushing task ID exists and the current time of the system is within the effective time, acquiring a verification result passing the verification;
and if the associated terminal ID corresponding to the message pushing task ID does not exist or the current time of the system is not within the valid time, acquiring a verification result of verification failure.
2. The message pushing method according to claim 1, wherein the state to be pushed includes an un-pushed state and a push failed state;
before the step of verifying the target message task data by using at least one verification rule and obtaining a verification result, the message pushing further includes:
if the target message task data is in a pushing failure state, executing the step of pushing the target message task data to at least one client corresponding to the user ID, and updating the task state of the target message task data to be in a pushing success state;
and if the target message task data is in a non-pushing state, the step of verifying the target message task data by adopting at least one verification rule to obtain a verification result is executed.
3. The message pushing method of claim 1, wherein the target message task data comprises a generic message template;
the pushing the target message task data to at least one client corresponding to the user ID includes:
if the data type of the target message task data is a universal pushing type, pushing the universal message template to at least one client corresponding to the user ID;
and if the data type of the target message task data is a special push type, respectively acquiring user information corresponding to at least one user ID, combining each piece of user information with the universal message template to form effective personal messages, and pushing each effective personal message to a client corresponding to the user ID.
4. The message pushing method according to claim 1, wherein the pushing the target message task data to at least one client corresponding to the user ID comprises:
if the user data volume of the target message task data is larger than a preset value, carrying out fragmentation processing on the user data volume of the target message task data according to a preset fragmentation rule to obtain at least two fragmentation task data;
and pushing at least two pieces of fragment task data to at least one client corresponding to the user ID through at least two task processes respectively.
5. A message push apparatus, comprising:
the message pushing task acquiring module is used for acquiring a message pushing task, and the message pushing task comprises a message pushing task ID and at least one user ID;
the target message task data acquisition module is used for inquiring a database based on the message pushing task ID and acquiring target message task data with a task state to be pushed;
the verification processing module is used for verifying the target message task data by adopting at least one verification rule to obtain a verification result;
the target message task sending module is used for pushing the target message task data to at least one client corresponding to the user ID if the verification result is that the verification is passed, and updating the task state of the target message task data into a pushing success state;
wherein, the check processing module comprises:
the first verification processing unit is used for inquiring a database based on the message pushing task ID and judging whether a related terminal ID corresponding to the message pushing task ID exists or not;
the second check processing unit is used for acquiring the valid time corresponding to the message pushing task ID and judging whether the current time of the system is within the valid time or not;
a first verification result obtaining unit, configured to obtain a verification result that passes verification if there is an associated terminal ID corresponding to the message push task ID and the current system time is within the valid time;
and the second verification result acquisition unit is used for acquiring a verification result of verification failure if the associated terminal ID corresponding to the message push task ID does not exist or the current time of the system is not within the valid time.
6. The message pushing apparatus of claim 5, wherein the target message task sending module comprises:
the first data type processing unit is used for pushing the universal message template to at least one client corresponding to the user ID if the data type of the target message task data is a universal pushing type;
and the second data type processing unit is used for respectively acquiring user information corresponding to at least one user ID if the data type of the target message task data is a special push type, combining each piece of user information with the universal message template to form effective personal messages, and pushing each effective personal message to a client corresponding to the user ID.
7. Computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor realizes the steps of the message push method according to any of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the message push method according to any one of claims 1 to 4.
CN201810138040.0A 2018-02-10 2018-02-10 Message pushing method and device, computer equipment and storage medium Active CN108460115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810138040.0A CN108460115B (en) 2018-02-10 2018-02-10 Message pushing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810138040.0A CN108460115B (en) 2018-02-10 2018-02-10 Message pushing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108460115A CN108460115A (en) 2018-08-28
CN108460115B true CN108460115B (en) 2020-06-23

Family

ID=63240059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810138040.0A Active CN108460115B (en) 2018-02-10 2018-02-10 Message pushing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108460115B (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971643B (en) * 2018-09-30 2022-07-29 北京国双科技有限公司 Message pushing method and device, storage medium and processor
CN109660587B (en) * 2018-10-22 2022-07-29 平安科技(深圳)有限公司 Data pushing method and device based on random number, storage medium and server
CN109299387B (en) * 2018-11-13 2024-03-19 平安科技(深圳)有限公司 Message pushing method and device based on intelligent recommendation and terminal equipment
CN109558230A (en) * 2018-11-23 2019-04-02 北京百分点信息科技有限公司 A kind of distributed timing task scheduling system and method
CN109587038A (en) * 2018-11-30 2019-04-05 深圳市买买提信息科技有限公司 Information push method and device
CN109889349B (en) * 2019-03-11 2022-02-25 平安科技(深圳)有限公司 APP broadcast message pushing method and device and readable storage medium
CN110248030B (en) * 2019-05-22 2022-05-17 深圳壹账通智能科技有限公司 Method, device, equipment and storage medium for testing short message compensation mechanism
CN110213380B (en) * 2019-06-11 2021-09-03 深圳市思迪信息技术股份有限公司 Message pushing method and device, computer equipment and storage medium
CN110708360A (en) * 2019-09-17 2020-01-17 Oppo广东移动通信有限公司 Information processing method and system and electronic equipment
CN111049755B (en) * 2019-12-23 2022-01-11 京东科技控股股份有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111885126B (en) * 2020-07-08 2023-09-01 泰康保险集团股份有限公司 Task pushing method and device
CN111917843A (en) * 2020-07-16 2020-11-10 远光软件股份有限公司 Message pushing method, computer equipment and storage medium
CN112187903B (en) * 2020-09-22 2022-08-26 华云工业互联网有限公司 Message pushing method and device and message service system
CN112632375B (en) * 2020-12-18 2023-07-25 深圳市和讯华谷信息技术有限公司 Session information processing method, server and storage medium
CN112988828B (en) * 2021-04-25 2024-03-12 北京致趣科技有限公司 Message pushing method and electronic equipment
CN113596147B (en) * 2021-07-27 2023-10-24 奇安信科技集团股份有限公司 Message pushing method, device, equipment and storage medium
CN113609178A (en) * 2021-08-12 2021-11-05 深圳壹账通智能科技有限公司 Data pushing method, device, equipment and storage medium
CN113836424A (en) * 2021-09-29 2021-12-24 深圳追一科技有限公司 Data acquisition method and device, electronic equipment and storage medium
CN114338792A (en) * 2021-12-29 2022-04-12 掌阅科技股份有限公司 Application message pushing method, electronic equipment and storage medium
CN114900381B (en) * 2022-03-23 2024-03-22 青岛海尔科技有限公司 Message sending method and device, storage medium and electronic device
CN115277836B (en) * 2022-08-03 2023-05-30 四川长虹新网科技有限责任公司 Distributed data pushing platform and method for geomagnetic parking system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102916867A (en) * 2012-10-12 2013-02-06 北京百度网讯科技有限公司 Information push method and system
CN103368992A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Message push method and device
CN103731476A (en) * 2013-12-10 2014-04-16 乐视网信息技术(北京)股份有限公司 Method and device for improving information push speed
CN104615702A (en) * 2015-01-30 2015-05-13 五八有限公司 Information pushing method and device
CN105978967A (en) * 2016-05-11 2016-09-28 腾讯科技(北京)有限公司 Control information push method and device
CN106657327A (en) * 2016-12-20 2017-05-10 上海银禾油信息技术有限公司 Message pushing method and message pushing device
CN107451831A (en) * 2016-05-30 2017-12-08 北京京东尚科信息技术有限公司 Task method for pushing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107528922A (en) * 2017-09-29 2017-12-29 深圳市金立通信设备有限公司 A kind of information push method, terminal and computer-readable recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368992A (en) * 2012-03-28 2013-10-23 阿里巴巴集团控股有限公司 Message push method and device
CN102916867A (en) * 2012-10-12 2013-02-06 北京百度网讯科技有限公司 Information push method and system
CN103731476A (en) * 2013-12-10 2014-04-16 乐视网信息技术(北京)股份有限公司 Method and device for improving information push speed
CN104615702A (en) * 2015-01-30 2015-05-13 五八有限公司 Information pushing method and device
CN105978967A (en) * 2016-05-11 2016-09-28 腾讯科技(北京)有限公司 Control information push method and device
CN107451831A (en) * 2016-05-30 2017-12-08 北京京东尚科信息技术有限公司 Task method for pushing
CN106657327A (en) * 2016-12-20 2017-05-10 上海银禾油信息技术有限公司 Message pushing method and message pushing device

Also Published As

Publication number Publication date
CN108460115A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
CN108460115B (en) Message pushing method and device, computer equipment and storage medium
CN107396360B (en) Block verification method and device
CN109951435B (en) Equipment identifier providing method and device and risk control method and device
CN109462601B (en) Multi-platform access method and device based on eSIM
CN110851748A (en) Short link generation method, server, storage medium and computer equipment
CN110543324B (en) Plug-in increment updating method and device for application program
CN108429739B (en) Method, system and terminal equipment for identifying honeypots
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN111857985A (en) Calling method and device of browser plug-in, storage medium and terminal
CN109842482B (en) Information synchronization method, system and terminal equipment
CN111666257A (en) File fragment storage method, device, equipment and storage medium
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN107563942B (en) Logistics data batch processing method, logistics processing system and processing device
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN109587353B (en) Method, device and storage medium for identifying short message number attribution information
CN110225097B (en) Information processing method, device and storage medium
CN113849477A (en) Sign-in management method and device, electronic equipment and storage medium
CN104407846B (en) Information processing method and device
CN110119337B (en) Data analysis method and device and server
CN109246686B (en) Multi-card user address book updating method and device based on cloud technology
CN111507447A (en) Label identification method and device
CN110858201A (en) Data processing method and system, processor and storage medium
CN112995900B (en) SIM card distribution method, device, server and computer readable storage medium
CN113852919B (en) Method and device for generating early warning message, storage medium and electronic device
CN111711639B (en) Terminal, data transmission method, system, and computer-readable storage medium

Legal Events

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