CN111431952B - Message pushing method, device and system, computer storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN111431952B
CN111431952B CN201910019189.1A CN201910019189A CN111431952B CN 111431952 B CN111431952 B CN 111431952B CN 201910019189 A CN201910019189 A CN 201910019189A CN 111431952 B CN111431952 B CN 111431952B
Authority
CN
China
Prior art keywords
message
push
pushing
storage
pushed
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
CN201910019189.1A
Other languages
Chinese (zh)
Other versions
CN111431952A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910019189.1A priority Critical patent/CN111431952B/en
Publication of CN111431952A publication Critical patent/CN111431952A/en
Application granted granted Critical
Publication of CN111431952B publication Critical patent/CN111431952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The application discloses a method and a device for pushing a distributed message, a system for pushing the distributed message, a method for scanning a distributed message storage system, a computer storage medium and an electronic device. The pushing method comprises the following steps: acquiring a push message which is stored in a message storage end and needs to be pushed; pushing the push message to a message receiving end; judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end; determining whether the push message is pushed completely according to a judgment result; furthermore, additional storage devices are not needed, and the additional storage devices refer to other storage devices or processing devices outside the distributed message push system; the pushing process is separated from the pushing state confirmation process, when the pushing state process is abnormal, the message pushing process can not be influenced, and the pushing instantaneity is guaranteed while the message pushing reliability requirement is met.

Description

Message pushing method, device and system, computer storage medium and electronic equipment
Technical Field
The present application relates to the field of computer information processing technologies, and in particular, to a method and an apparatus for pushing a distributed message, and a method for scanning a distributed message pushing system and a distributed message storage system. The application also relates to a computer storage medium and an electronic device.
Background
The distributed message pushing system is used for constructing a bridge between an application system and an operating system, analyzing and decoupling the relation between the application system and the operating system, and further completing and recording message transmission between the application system and the operating system.
In a distributed message push system with reliable transmission, after a server side pushes a message to a target client side, the server side needs to wait for an ACK response of the client side, and only when the server side receives the ACK response, the server side can consider that the push is successful. However, for some abnormal situations, where the client does not reply an ACK response, the server needs to identify and store such an error state, and then needs to try to push again at an appropriate time until the client replies an ACK response, which includes but is not limited to:
1. when the message is pushed for the first time, the client is not online.
2. The client handles the error locally and does not reply with an ACK reply.
3. The client network is abnormal and the ACK response is lost.
In the field of traditional message pushing, message pushing state confirmation is solved, and system reliability is guaranteed, and events pushed each time need to be stored by means of external persistent KV storage, wherein KV storage is a storage mode in which data is organized in a key-value pair form. Generally, when the pushing starts, the pushing event is written into the KV storage, after the pushing is completed and an ACK response is received from the client, the pushing event in the external KV storage is deleted, and meanwhile, the server periodically polls and searches for an event in the KV storage that is not successfully pushed, and performs retry processing. This method has the following disadvantages:
1. requiring external persistent KV storage, the system is costly to deploy and implement.
2. All links of message pushing need to read and write external KV storage, pushing delay depends on time consumption for operating the external KV storage, system performance indexes are limited by the external storage, and if the external storage is in a problem, the whole pushing link cannot be used at all.
Based on the solution of the external storage, the prior art also provides another message push state confirmation scheme, that is, the push state of each message is maintained in the memory of the server, and after the message push successfully receives the ACK response of the client, the corresponding data is deleted in the memory, otherwise, the message is retried periodically.
Although the scheme has no external dependence, the following problems exist:
1. the scheme completely depends on the storage of the memory state of the server side, and has no persistence, so that the state is lost when the server side is abnormal, and the complete reliability cannot be realized.
2. The data amount cached by the scheme is limited, and if the client does not answer for a long time, part of the messages can be lost.
Disclosure of Invention
The application provides a distributed message pushing method to solve the problem of poor message pushing reliability in the prior art.
The application provides a method for pushing a distributed message, which comprises the following steps:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
In some embodiments, further comprising:
acquiring success status information for indicating that the push message is successfully received by the message receiving end;
generating the response message according to the success state information;
and providing the response message to the message storage terminal.
In some embodiments, further comprising:
obtaining the push message, and storing the push message in a message queue of the message storage end according to a preset storage sequence;
the acquiring the push message which is stored in the message storage end and needs to be pushed comprises the following steps:
and acquiring the push messages stored in the message queue of the message storage end according to the storage sequence.
In some embodiments, the obtaining the push message and storing the push message in a message queue of the message storage according to a predetermined storage order includes:
and storing the obtained push messages in a message queue of a message storage end according to the obtained time sequence.
In some embodiments, the pushing the push message to a message receiving end includes:
and pushing the acquired push messages needing to be pushed to the message receiving end according to the acquisition sequence.
In some embodiments, the determining whether the message storage side stores a response message indicating that the push message has been successfully received by the message receiving side includes:
judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end;
if yes, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence, and acquiring the current storage position of the push message in the message storage end;
and scanning the position adjacent to the current storage position according to a second preset time length, and if the response message is scanned, determining that the response message is stored in a message queue of the message storage end.
In some embodiments, further comprising: and scanning the next push message sequenced after the push message by a first preset time length according to the storage sequence, and so on until all the push messages stored in the message storage end are scanned.
In some embodiments, the determining, according to the determination result, whether the push message needing to be pushed is pushed completely includes:
and if the response message is determined to be stored in the message queue of the message storage end, determining that the push message is pushed completely.
In some embodiments, the determining whether the message storage side stores a response message generated after the push processing is successful for the push message that needs to be pushed includes:
judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end;
if yes, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence to obtain the current storage position of the push message in the message storage end;
and scanning the position adjacent to the current storage position according to a second preset time length, and if the response message is not scanned, determining that the response message is not stored in a message queue of the message storage end.
In some embodiments, further comprising:
if the message storage end is determined not to store the response message, generating a retransmission message aiming at the push message;
pushing the retransmission message to the message receiving end;
judging whether the message storage end stores a response message for indicating that the retransmission message is successfully received by the message receiving end;
and determining whether the retransmission message is pushed completely according to the judgment result.
In some embodiments, the generating a retransmission message for the push message if it is determined that the message storage does not store the response message comprises:
acquiring a push message on a current storage position;
generating a retransmission message according to the obtained push message with failed push in the current storage position;
and pushing the generated retransmission message.
In some embodiments, the trigger condition of the scanning is specifically:
is greater than the time taken from pushing the push message until receiving a reply message to the push message.
The present application further provides a push device for a distributed message, including:
the device comprises an acquisition unit, a message storage end and a message sending unit, wherein the acquisition unit is used for acquiring a push message which is stored in the message storage end and needs to be pushed;
the pushing unit is used for pushing the push message to a message receiving end;
the judging unit is used for judging whether the message storage end stores a response message used for indicating that the push message is successfully received by the message receiving end;
and the determining unit is used for determining whether the push message is pushed completely according to the judgment result.
The present application further provides a push system for distributed messages, including: the system comprises a message storage server, a message pushing server and a message receiving client;
the message storage server is used for storing push messages needing to be pushed and response messages aiming at the push messages which are successfully pushed;
the message pushing server is used for pushing the pushing message which is acquired from the message storage server and needs to be pushed to the message receiving client, judging whether the message storage server stores a response message for indicating that the pushing message is successfully received by the message receiving client or not, and determining whether the pushing message is pushed completely or not according to a judgment result;
the message receiving client is used for receiving the push message to be pushed, which is pushed by the message push server, and returning a response message aiming at the push message to be pushed to the message push server.
The application also provides a scanning method of the distributed message storage system, which comprises the following steps:
acquiring return state information aiming at the push message;
when the returned state information meets the triggering condition for scanning the message storage system, scanning the push message stored in the message storage system and the response message corresponding to the push message to obtain a scanning result;
and determining the pushing state of the pushing message according to the scanning result.
The application also provides a computer storage medium for storing the data generated by the network platform and a program for processing the data generated by the network platform;
when read and executed by the processor, the program performs the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
The present application further provides an electronic device, comprising:
a processor;
a memory for storing a program for processing network platform generated data, the program when read and executed by the processor performing the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
Compared with the prior art, the method has the following advantages:
the method for pushing the distributed message includes storing a push message to be pushed in a message storage end, storing a response message generated according to a message push success state, and determining whether the push message is successfully pushed according to whether the response message corresponding to the push message is stored in the message storage end or not, where the push message and a flag push success state are stored in the message storage end in a form of the response message, so that the stored response message can be persisted, the push message is stored in a message storage end of a distributed message push system located on a server side, and is pushed after being correspondingly processed by the distributed message push system, and the push success state of the push message is also stored in a message storage server end of the distributed message push system, so that no additional storage device is needed, where the additional storage device refers to other storage devices except the distributed message push system or is located in place Managing the equipment; the pushing process is separated from the pushing state confirmation process, when the pushing state process is abnormal, the message pushing process can not be influenced, and the pushing instantaneity is guaranteed while the message pushing reliability requirement is met.
Drawings
Fig. 1 is a flowchart of an embodiment of a method for pushing a distributed message provided in the present application;
fig. 2 is an interaction diagram of successful push in an embodiment of a push method for a distributed message provided in the present application;
fig. 3 is an interaction diagram of a push failure in an embodiment of a push method for a distributed message provided in the present application;
fig. 4 is a schematic diagram of response message determination in an embodiment of a distributed message pushing method provided in the present application;
fig. 5 is a schematic structural diagram of an embodiment of a distributed message pushing apparatus provided in the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The description used in this application and in the appended claims is for example: "a," "an," "first," and "second," etc., are not necessarily limited to a quantity or order, but rather are used to distinguish one type of information from another.
Referring to fig. 1, fig. 1 is a method for pushing a distributed message provided in the present application, where the method includes:
step S101: and acquiring the push message which is stored in the message storage end and needs to be pushed.
The step S101 of pushing the message means that the time for searching on the network is reduced by automatically transmitting the information to the client, and the message can be searched and filtered according to the interest of the user, and is periodically pushed to the user, so as to help the user efficiently mine valuable information, and the like.
The push message may be a push process of pushing a push message of a message sending end to a message receiving end that receives the push message, the push message that the message sending end needs to push will be stored in a message storage end first, and the message sending end and the message receiving end here may be understood as a message sending client and a message receiving client. Therefore, the method further comprises the following steps:
acquiring the push message, and storing the push message in a message queue of the message storage end according to a preset storage sequence; it can also be understood that the push messages obtained from the message sending end are stored in the message queue of the message storage end according to a predetermined storage order.
In this embodiment, the purpose of storing the push messages stored in the message queue of the message storage end according to the predetermined storage order is to ensure that the push messages stored in the message queue of the message storage end have a certain storage order, and the obtained push messages need to be stored in the message queue of the message storage end first, so the storage order may be stored according to the obtained time order of the push messages, and the obtained time may be determined according to the time when the message sending end provides or sends the push messages, and of course, the push messages may be stored according to attribute information such as the category or size of the push messages, and a mode that the storage has a certain storage order may be ensured, and is not limited to the above-mentioned mode of storing according to the obtained time.
The step S101 may also perform acquisition according to a storage order of the push messages during acquisition, that is: and acquiring the push messages to be pushed, which are stored in the message queue of the message storage end, according to the storage sequence. In other words, the push message to be pushed is obtained from the message queue of the message storage side according to the first-in first-out principle.
Based on the above, the message storage end may store not only the push message that needs to be pushed, but also a response message returned for the push message, and specifically includes:
acquiring success status information for indicating that the push message is successfully received by the message receiving end;
generating the response message according to the success state information;
and providing the response message to the message storage terminal.
In this embodiment, the message storage end stores the received response message, and the storage location is located at a position adjacent to the position of the message storage end where the corresponding push message is located, for example: which may be located before or after the corresponding storage location of the push message (as shown in fig. 4).
In the embodiment, the message receiving end generates the response message aiming at the successful state information returned by the received push message and stores the response message in the message storage end, so that data loss can not be caused under the condition that the message receiving end is abnormal or the network is abnormal and the like.
It should be noted that, in generating the response message according to the success status information, the success status information may be a response event, that is, a response message is generated according to the response event, and the response message is generated inside the message push system without intervention and perception by a user, where the message receiver (which may be understood as a user) is invisible.
After the push message which needs to be pushed by the message sending end is obtained, the push message which is stored in the message queue of the message storing end is pushed, and the step S102 is executed.
Step S102: and pushing the push message to a message receiving end.
The specific implementation process of step S102 may be to push the obtained push message stored in the message storage end to a message receiving end, that is, a message receiving client, through the message pushing end.
According to the description in the foregoing step S101, in the step S102, when pushing the push message to be pushed to the message receiving end, the obtained push message to be pushed may be pushed to the message receiving end according to the obtaining order.
It should be noted that, based on the storage sequence in the foregoing step S101 being stored according to the acquired time, the pushing herein may also be acquired according to the storage sequence, that is, a first-in first-out principle.
Step S103: and judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end.
First, it can be known from the description in step S101 that not only the push message to be pushed but also a response message to the push message after the push is successful is stored in the message queue of the message storage. That is to say, after the message receiving end successfully receives the push message, the response message generated by the successfully received state event is stored in the message storage end, and the stored push message has a corresponding stored response message, that is, the push message which is successfully pushed is stored, otherwise, when the message queue of the message storage end does not store the response message corresponding to the push message, the push message is not successfully pushed.
Please refer to fig. 2 and fig. 4, in which fig. 2 is an interaction diagram of successful push in an embodiment of a push method for a distributed message provided in the present application; fig. 4 is a schematic diagram of response message determination in an embodiment of a push method for a distributed message provided in the present application.
The specific implementation process determined in step S103 may be implemented by scanning a message queue of a message storage, and specifically includes:
step S103-1 a: and judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end.
In the process of pushing the message, after the message is pushed to the message receiving end by the message pushing end, the message receiving end returns to the successful state after the receiving process is completed, and the process of receiving the return is time consuming or time consuming, an upper limit value is generally defined for the time consuming process, which is called as consumption timeout duration, such as 0-3 s. The trigger condition of the scanning in step S103-1a may be set according to the consumption timeout duration, that is, the trigger condition of the scanning may be greater than the duration from pushing the push message to receiving the response message for the push message, that is, when the push message pushing duration pushed to the message receiving end is greater than the consumption timeout duration, the scanning of the message storing end is triggered; the push duration of the push message may be the sum of the time for pushing the message and the time for returning the message, which may be regarded as the return status information.
Step S103-1 b: if the scanning triggering condition is met, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence, and acquiring the current storage position of the push message in the message storage end;
step S103-1 c: and scanning the position adjacent to the current storage position according to a second preset time length, and if the response message is scanned, determining that the response message is stored in a message queue of the message storage end.
As shown in fig. 4, the message queue of the message storage end may be divided into a plurality of scanning intervals, in this embodiment, the scanning intervals may be divided according to scanning time, and the scanning order of the scanning intervals may be the same as the storage order of the push messages. One scan interval may include: the sum of the time for scanning the push message and the time for scanning the response message, in each scanning interval, the scanning time for the push message may be set to a first preset time length, the scanning time for the response message may be set to a second preset time length, the first preset time length and the second preset time length may be the same or different, and the setting standard may be determined according to the scanning time length in a normal scanning service scene.
In the step S103-1b, when the scanning is overtime for the first preset duration or the current storage location of the push message has been obtained according to the scanning, the scanning of the currently stored push message is stopped, and the step S103-1c is entered into the scanning of the response message, where the response message is correspondingly stored in the adjacent location of the push message at the message storage end, so that the scanning may be directly performed to the adjacent location of the current storage location of the push message with the current storage location of the push message as a starting point, and when the scanning is overtime for the second preset duration or the response message has been obtained according to the scanning, the scanning of the response message is stopped, and the step S103-1b is returned to continue the scanning to obtain the current storage location of the next push message in the message queue. That is, it may further include:
and scanning the next push message sequenced after the push message by a first preset time length according to the storage sequence, and so on until all the push messages stored in the message storage end are scanned.
Therefore, the push process of the push message and the process of successfully confirming the push of the push message have no influence, the push process of the push message and the process of successfully confirming the push of the push message can be performed in parallel, and are not limited and influenced mutually, and even if the confirmation result is unsuccessful in the process of successfully confirming the push, the push of the next push message and the confirmation of the success of pushing the next push message are still not influenced.
Based on the above, it can be known that the purpose of step S103-1b is to scan the push message stored in the message queue of the message storage end to obtain the current storage location of the push message; the step S103-1c is aimed at scanning the response messages stored in the adjacent locations according to the current storage location obtained in the step S103-1 b. When the push message and the response message at the adjacent position of the push message are scanned, or the push message and the response message are scanned in the scanning interval, the judgment result that the scanned push message has the corresponding response message can be obtained.
The above is an explanation that the message storage end stores the response message, please refer to fig. 3, and refer to fig. 4, where fig. 3 shows an interaction diagram of a push failure in an embodiment of a push method for a distributed message provided in the present application. When the current storage location of the obtained push message is scanned to a location adjacent to the current storage location according to the second preset time, if the stored response message is not scanned, it is determined that no response message for the push message in the current storage location is stored in the message queue of the message storage end, and at this time, it indicates that the push message in the current storage location is not successfully pushed and needs to be pushed again, so the step S103 includes:
step S103-2 a: judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end;
step S103-2 b: if yes, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence to obtain the current storage position of the push message in the message storage end;
step S103-2 c: and scanning the position adjacent to the current storage position according to the second preset time length, and if the response message is not scanned, determining that the response message is not stored in the message queue of the message storage end.
After the reply message is not scanned, then: determining that the response message is not stored in the message queue of the message storage end, and may further include:
generating a retransmission message for the push message;
pushing the retransmission message to the message receiving end;
judging whether the message storage end stores a response message for indicating that the retransmission message is successfully received by the message receiving end;
and determining whether the retransmission message is pushed completely according to the judgment result.
Similar to the description of the step S103-1b and the step S103-1c, when the stored response message is not scanned, the scanning process may not need to be stopped, and the step of directly returning to the step S103-2d to scan the stored push message required to be pushed in the predetermined storage sequence for the first preset time length, and acquiring the current storage location of the next push message is continuously executed.
It should be noted that, returning to the step S103-2b to execute the continuous scanning may be returning after the step S103-2c, that is, after no response message is stored, that is, after no corresponding response message is scanned in the message queue of the message storage end, returning to the step S103-2b to execute, and executing the step S103-2 d. Therefore, the process of pushing the push message and the process of determining the message pushing state are not affected, and the next push message can still be pushed continuously according to the storage sequence in the process of determining whether the push message is pushed successfully or not.
To ensure consistency between the generated retransmission message and a corresponding push message which is not successfully pushed, if it is determined that the message storage end does not store the response message, generating a retransmission message for the push message may include:
acquiring a push message on a current storage position;
generating a retransmission message according to the obtained push message with failed push in the current storage position;
and pushing the generated retransmission message.
After the pushing the generated retransmission message, the method may further include: searching the response message matched with the retransmission message at the message storage end, if the response message is matched with the retransmission message, indicating that the pushing is successful, namely entering step S104, otherwise, indicating that the pushing is failed, and generating the retransmission message again according to the above process to continue pushing after the pushing is failed.
Step S104: and determining whether the push message needing to be pushed is pushed or not according to a judgment result.
If the result of the determination in step S104 is that a response message for the push message at the current storage location is stored in the message queue of the message storage end, determining that the push message stored at the current storage location is already pushed.
The foregoing is a description of an embodiment of a method for pushing a distributed message provided in the present application. Corresponding to the embodiment of the method for pushing the distributed message provided in the foregoing, the present application further discloses an embodiment of a device for pushing the distributed message, please refer to fig. 5, since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and related points can be referred to the partial description of the method embodiment. The device embodiments described below are merely illustrative.
As shown in fig. 5, the push apparatus for distributed messages includes:
an obtaining unit 501, configured to obtain a push message to be pushed, which is stored in a message storage.
A pushing unit 502, configured to push the push message to a message receiving end;
a determining unit 503, configured to determine whether the message storage end stores a response message indicating that the push message has been successfully received by the message receiving end;
a determining unit 504, configured to determine whether the push message is already pushed according to the determination result.
Further comprising:
a successful status information obtaining unit, configured to obtain successful status information used to indicate that the push message has been successfully received by the message receiving end;
a generating unit, configured to generate the response message according to the success status information;
and the providing unit is used for providing the response message to the message storage end.
The acquiring unit 501, before acquiring the push message needing to be pushed and stored in the message storage, may further include:
an obtaining unit, configured to obtain the push message, and store the push message in a message queue of the message storage according to a predetermined storage order; the obtained push messages may be stored in a message queue of a message storage end according to the obtained time sequence.
The obtaining unit 501 is specifically configured to obtain the push messages stored in the message queue of the message storage according to the storage order.
The pushing unit 502 may be specifically configured to push the obtained push messages to be pushed to the message receiving end according to the obtaining order.
The judgment unit 503 includes:
a trigger condition judging subunit, configured to judge whether a duration after the push message is pushed to the message receiving end satisfies a trigger condition for scanning a message queue of the message storage end;
the first scanning subunit is used for scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence when the judgment result of the triggering condition judgment subunit is satisfied, and acquiring the current storage position of the push message in the message storage end;
and the second scanning subunit is configured to scan a position adjacent to the current storage position according to a second preset time length, and if the response message is scanned, determine that the response message is stored in a message queue of the message storage end.
Further comprising:
and the next scanning execution subunit is configured to scan, according to the storage sequence, the next push message ordered after the push message with a first preset duration, and so on until all push messages stored in the message storage end are scanned.
The judging unit further includes:
a trigger condition judging subunit, configured to judge whether a duration after the push message is pushed to the message receiving end satisfies a trigger condition for scanning a message queue of the message storage end; wherein the trigger condition may be greater than a time taken from the start of the push message being held to the receipt of a response message to the push message. Reference may be made specifically to the description of step S103-1a above.
The first scanning subunit is used for scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence when the judgment result of the triggering condition judgment subunit is satisfied, and acquiring the current storage position of the push message in the message storage end;
and the second scanning subunit is configured to scan a position adjacent to the current storage position according to a second preset time length, and if the response message is not scanned, determine that the response message is not stored in the message queue of the message storage end.
The second scanning subunit scans the response message, and further includes:
a retransmission message generation subunit, configured to generate a retransmission message for the push message;
a retransmission message pushing subunit, configured to push the retransmission message to the message receiving end;
a retransmission message judging subunit, configured to judge whether a response message used for indicating that the retransmission message has been successfully received by the message receiving end is stored in the message storage end;
and the retransmission message determining subunit is used for determining whether the retransmission message is pushed completely according to the judgment result.
It should be noted that the process of generating the retransmission message does not affect the process of generating the retransmission message, and the scanning process of the message storage end, that is, when it is found that no corresponding response message is stored for the push message, the scanning of the message storage end is continuously executed to the next push message, and the push message without the response message also generates the retransmission message.
The retransmission message generation subunit includes:
the push message acquisition subunit is used for acquiring the push message on the current storage position;
the generation subunit is used for generating a retransmission message according to the acquired push message with the push failure in the current storage position;
and the re-pushing subunit is used for pushing the generated retransmission message.
The foregoing is a summary of the embodiments of the distributed message pushing apparatus provided in the present application, and specific references may be made to the description of the embodiments of the distributed message pushing method.
Based on the foregoing, the present application further provides a distributed message pushing system, including: the system comprises a message storage server, a message pushing server and a message receiving client;
the message storage server is used for storing the push message to be pushed and storing a response message aiming at the push message successfully pushed;
the message push server is used for pushing a push message to be pushed, which is acquired from the message storage server, to the message receiving client, judging whether the message storage server stores a response message for indicating that the push message is successfully received by the message receiving client, and determining whether the push message is pushed completely according to a judgment result;
the message receiving client is used for receiving the push message to be pushed, which is pushed by the message push server, and returning a response message aiming at the push message to be pushed to the message push server.
It can be understood that the push message to be pushed, which is stored by the message storage server, can be obtained by the message sending client, that is, when the message sending client pushes the message, the message is sent to the message storage server in the distributed message pushing system for storage, after storage, the message pushing server obtains the push message to be pushed according to the storage sequence and pushes the push message to the message receiving client, after the message receiving client receives and processes the push message successfully, the message receiving client sends the state information of the push message successfully, the message pushing server generates a response message for the push message successfully pushed according to the received state information of the push message successfully, and sends the response message to the message storage server for storage, and the response message is stored in the adjacent position of the corresponding push message by the message storage server.
The upper content is the description of the push message in the distributed message push system. In the distributed message push system provided by the present application, the push message push process and the push state confirmation process of the push message are separated, and the push state confirmation process will be summarized below.
When the message pushing time length of the message pushing service end meets the scanning triggering condition of the message storage service end, the message storage service end is scanned according to the storage sequence of the pushing messages, the stored pushing messages needing to be pushed are scanned within a first preset time, the current storage position of the pushing messages is obtained, then the positions adjacent to the current storage position are scanned according to a second preset time, if the stored response messages are scanned, the message pushing service end considers that the pushing messages on the current storage position have the matched response messages, therefore, the pushing messages on the current storage position are successfully pushed, the pushing messages on the next storage position are continuously scanned according to the storage sequence, the storage position of the scanned next pushing message is determined as the current storage position, and the scanning is continuously performed according to the second preset time, until the last push message is scanned, or until a stop position is set by the distributed message push system.
It should be particularly noted that, in the process of confirming that the push of the push message is successful, if no corresponding response message is scanned, the message push server generates a re-push message according to the push message corresponding to the response message that is not scanned, and continues to push according to the push process, and the process of confirming that the push of the push message is successful is not stopped in the push process of the re-push message, that is, the scanning is not stopped. That is to say, in the process of determining whether the push message of the push message storage end is successfully pushed, no matter whether the push message at the current storage location of the message storage end is successfully pushed or fails, the next push message which needs to be determined whether the push message is successfully pushed will be continuously executed, that is: and updating the position of the push message to be judged after each judgment is finished.
In other embodiments, the push message whose determination result is failed may be pushed again in a targeted manner through the message marking, specifically, the push message whose pushing is confirmed to be successful is marked, and the message push server does not scan the marked push message again, so that when scanning is performed again after a scanning period is completed, scanning of the re-push message is aimed at. The push message with the push failure may be marked, and when the push is performed again, only the push message with the push failure and the push message with the mark may be scanned (at this time, the push message with the push failure will generate a retransmission message).
Because the push message is stored in the message storage end of the distributed message push system and is pushed after being correspondingly processed by the distributed message push system in the distributed message push system, the push success state of the push message is also stored in the message storage service end of the distributed message push system, and further no additional storage device is needed, wherein the additional storage device refers to other storage devices or processing devices except the distributed message push system; in addition, in the process of confirming whether the push message stored by the message storage server is successfully pushed or not, the message storage server is scanned and judged by the message push server to complete, so that the confirmation process of the push state and the push process of the push message can be asynchronously carried out, the push instantaneity of the distributed message push system is better, and the system reliability is higher.
Based on the above, the present application further provides a scanning method of a distributed message storage system, including:
acquiring return state information aiming at the push message;
when the returned state information meets the triggering condition for scanning the message storage system, scanning the push message stored in the message storage system and the response message corresponding to the push message to obtain a scanning result;
and determining the pushing state of the pushing message according to the scanning result.
The return state information may include time consumption of a message pushing process, that is, after a server of the distributed message pushing system pushes a message to a client in a message domain, the client completes processing and returns a state, where the process generally has time consumption, and the time consumption generally defines an upper limit (e.g., 3s), which is called consumption timeout time. The trigger condition may be a trigger after a message consumption timeout after the push action is completed. Reference may also be made as described in step S103-1 a.
And if the scanning result is that the push message and the response message corresponding to the push message are scanned, indicating that the push state of the push message is the push success.
Based on the above, the present application further provides a computer storage medium for storing data generated by a network platform and a program for processing the data generated by the network platform;
the program, when read and executed by the processor, performs the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
The present application further provides an electronic device, comprising:
a processor;
a memory for storing a program for processing network platform generated data, the program when read and executed by the processor performing the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.

Claims (17)

1. A method for pushing a distributed message is applied to a message pushing end, and comprises the following steps:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
2. The method for pushing the distributed message according to claim 1, further comprising:
acquiring success status information for indicating that the push message is successfully received by the message receiving end;
generating the response message according to the success state information;
and providing the response message to the message storage terminal.
3. The method for pushing a distributed message according to claim 1, further comprising:
acquiring the push message, and storing the push message in a message queue of the message storage end according to a preset storage sequence;
the acquiring the push message which is stored in the message storage end and needs to be pushed comprises the following steps:
and acquiring the push messages stored in the message queue of the message storage end according to the storage sequence.
4. The method for pushing a distributed message according to claim 3, wherein the obtaining the push message and storing the push message in a message queue of the message storage according to a predetermined storage order comprises:
and storing the obtained push messages in a message queue of a message storage end according to the obtained time sequence.
5. The method for pushing the distributed message according to claim 3, wherein the pushing the push message to a message receiving end includes:
and pushing the acquired push messages needing to be pushed to the message receiving end according to the acquisition sequence.
6. The method for pushing a distributed message according to claim 3, wherein said determining whether the message storage side stores an acknowledgement message indicating that the pushed message has been successfully received by the message receiving side comprises:
judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end;
if yes, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence to acquire the current storage position of the push message in the message storage end;
and scanning the position adjacent to the current storage position according to a second preset time length, and if the response message is scanned, determining that the response message is stored in a message queue of the message storage end.
7. The method for pushing a distributed message according to claim 6, further comprising: and scanning the next push message sequenced after the push message by a first preset time length according to the storage sequence, and so on until all the push messages stored in the message storage end are scanned.
8. The method for pushing a distributed message according to claim 6, wherein the determining whether the push message to be pushed has been pushed according to the determination result includes:
and if the response message is determined to be stored in the message queue of the message storage end, determining that the push message is pushed completely.
9. The method for pushing a distributed message according to claim 3, wherein the determining whether the message storage side stores a response message generated after the push processing is successful for the push message that needs to be pushed comprises:
judging whether the duration of the pushed message after being pushed to the message receiving end meets the trigger condition for scanning the message queue of the message storage end;
if yes, scanning at least one push message stored in the message storage end by a first preset time length according to the storage sequence to obtain the current storage position of the push message in the message storage end;
and scanning the position adjacent to the current storage position according to a second preset time length, and if the response message is not scanned, determining that the response message is not stored in a message queue of the message storage end.
10. The method for pushing a distributed message according to claim 1 or 8, further comprising:
if the message storage end is determined not to store the response message, generating a retransmission message aiming at the push message;
pushing the retransmission message to the message receiving end;
judging whether the message storage end stores a response message for indicating that the retransmission message is successfully received by the message receiving end;
and determining whether the retransmission message is pushed completely according to the judgment result.
11. The method for pushing the distributed message according to claim 10, wherein if it is determined that the message storage does not store the response message, generating a retransmission message for the push message comprises:
acquiring a push message on a current storage position;
generating a retransmission message according to the obtained push message with failed push in the current storage position;
and pushing the generated retransmission message.
12. The method for pushing a distributed message according to claim 6, wherein the trigger condition for scanning is specifically:
is greater than the time taken from pushing the push message until receiving a reply message to the push message.
13. A push device of distributed messages, wherein the device is applied to a message push terminal, and comprises:
the device comprises an acquisition unit, a message storage end and a message sending unit, wherein the acquisition unit is used for acquiring a push message which is stored in the message storage end and needs to be pushed;
the pushing unit is used for pushing the push message to a message receiving end;
the judging unit is used for judging whether the message storage end stores a response message used for indicating that the push message is successfully received by the message receiving end;
and the determining unit is used for determining whether the push message is pushed completely according to the judgment result.
14. A system for pushing distributed messages, comprising: the system comprises a message storage server, a message pushing server and a message receiving client;
the message storage server is used for storing the push message to be pushed and storing a response message aiming at the push message successfully pushed;
the message pushing server is used for pushing the pushing message which is acquired from the message storage server and needs to be pushed to the message receiving client, judging whether the message storage server stores a response message for indicating that the pushing message is successfully received by the message receiving client or not, and determining whether the pushing message is pushed completely or not according to a judgment result;
the message receiving client is used for receiving the push message to be pushed, which is pushed by the message push server, and returning a response message aiming at the push message to be pushed to the message push server.
15. A scanning method for a distributed message storage system is characterized in that the method is applied to a message pushing end and comprises the following steps:
acquiring return state information aiming at a push message stored in a distributed message storage system;
when the returned state information meets the triggering condition for scanning the message storage system, scanning the push message stored in the message storage system and the response message corresponding to the push message to obtain a scanning result;
and determining the pushing state of the pushing message according to the scanning result.
16. A computer storage medium for storing a program for processing data generated in response to a network platform;
when read and executed by a processor, the program performs the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
17. An electronic device, comprising:
a processor;
a memory for storing a program for processing network platform generated data, the program when read and executed by the processor performing the following operations:
acquiring a push message which is stored in a message storage end and needs to be pushed;
pushing the push message to a message receiving end;
judging whether the message storage end stores a response message for indicating that the push message is successfully received by the message receiving end;
and determining whether the push message is pushed completely according to the judgment result.
CN201910019189.1A 2019-01-09 2019-01-09 Message pushing method, device and system, computer storage medium and electronic equipment Active CN111431952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910019189.1A CN111431952B (en) 2019-01-09 2019-01-09 Message pushing method, device and system, computer storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910019189.1A CN111431952B (en) 2019-01-09 2019-01-09 Message pushing method, device and system, computer storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111431952A CN111431952A (en) 2020-07-17
CN111431952B true CN111431952B (en) 2022-06-03

Family

ID=71546028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910019189.1A Active CN111431952B (en) 2019-01-09 2019-01-09 Message pushing method, device and system, computer storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111431952B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448883B (en) * 2020-10-14 2023-05-05 苏宁云计算有限公司 Message pushing method, device, computer equipment and storage medium
CN112532681A (en) * 2020-10-16 2021-03-19 深圳市科漫达智能管理科技有限公司 Parking lot software data exception handling method and device
CN113242172B (en) * 2021-04-26 2023-02-28 福建天泉教育科技有限公司 Message response method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1498834A1 (en) * 1997-11-06 2005-01-19 Intertrust Technologies Corp. Systems and methods for matching, selecting, narrowcasting, and/or classifying based on rights management and/or other information
CN103546528A (en) * 2013-02-05 2014-01-29 Tcl集团股份有限公司 Distributed message pushing method and system
CN105681056A (en) * 2016-01-13 2016-06-15 阿里巴巴集团控股有限公司 Service realization method and device
CN107786607A (en) * 2016-08-30 2018-03-09 腾讯科技(深圳)有限公司 A kind of retransmitting message method, retransmitting message server and user equipment
CN108206742A (en) * 2016-12-19 2018-06-26 腾讯科技(深圳)有限公司 A kind of message method, device, server and system
WO2018137217A1 (en) * 2017-01-25 2018-08-02 华为技术有限公司 Data processing system, method, and corresponding device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997861B (en) * 2009-08-27 2013-08-28 杭州华三通信技术有限公司 Data storage method and equipment
CN102986173B (en) * 2011-07-12 2015-06-03 华为技术有限公司 Method for setting message status and converged internet protocol message (CPM) traffic server
US9014189B2 (en) * 2012-01-19 2015-04-21 Comcast Cable Communications, Llc Address translation
CN103428072B (en) * 2012-05-23 2017-03-08 北京大学 A kind of dissemination method of persistent message and system
US9589010B2 (en) * 2013-03-07 2017-03-07 Microsoft Technology Licensing, Llc Systems and methods for host detection of USB asynchronous notification capability
CN103414768B (en) * 2013-07-31 2016-12-28 中国联合网络通信集团有限公司 Data processing method, system and gateway
CN104636249B (en) * 2013-11-15 2017-11-14 中国移动通信集团公司 A kind of application program Debugging message generates system and method
CN103648085B (en) * 2013-12-11 2018-09-21 五八同城信息技术有限公司 A kind of mobile terminal message transmission method overcoming network jitter
CN105611506B (en) * 2015-10-19 2019-06-18 中国联合网络通信集团有限公司 Information issuing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1498834A1 (en) * 1997-11-06 2005-01-19 Intertrust Technologies Corp. Systems and methods for matching, selecting, narrowcasting, and/or classifying based on rights management and/or other information
CN103546528A (en) * 2013-02-05 2014-01-29 Tcl集团股份有限公司 Distributed message pushing method and system
CN105681056A (en) * 2016-01-13 2016-06-15 阿里巴巴集团控股有限公司 Service realization method and device
CN107786607A (en) * 2016-08-30 2018-03-09 腾讯科技(深圳)有限公司 A kind of retransmitting message method, retransmitting message server and user equipment
CN108206742A (en) * 2016-12-19 2018-06-26 腾讯科技(深圳)有限公司 A kind of message method, device, server and system
WO2018137217A1 (en) * 2017-01-25 2018-08-02 华为技术有限公司 Data processing system, method, and corresponding device

Also Published As

Publication number Publication date
CN111431952A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN110633320B (en) Processing method, system, equipment and storage medium for distributed data service
US11614867B2 (en) Distributed storage system-based data processing method and storage device
CN111431952B (en) Message pushing method, device and system, computer storage medium and electronic equipment
EP2921974A1 (en) Data restoration method and system
CN107515874B (en) Method and equipment for synchronizing incremental data in distributed non-relational database
CN107945031B (en) Data processing system and method for generating reinsurance risk unit data
CN107153644B (en) Data synchronization method and device
CN110413650B (en) Method, device, equipment and storage medium for processing service data
JP6870466B2 (en) Control programs, control methods, controls, and database servers
CN107040563B (en) Asynchronous service processing method and server
CN111225012A (en) Transaction processing method, device and equipment
CN112433920A (en) Buried point data reporting method, device, equipment and medium
CN113934745A (en) Data synchronization processing method, electronic device and storage medium
CN112433885A (en) Block chain consensus processing method and device, electronic equipment and storage medium
CN112153132A (en) File uploading method, device and equipment based on virtualization management platform
CN106487852B (en) Method, device, terminal equipment and system for realizing client file synchronization
CN102984138B (en) A kind of methods, devices and systems obtaining object
CN111309693A (en) Data synchronization method, device and system, electronic equipment and storage medium
CN114466321B (en) Message sending method and device, electronic equipment and storage medium
CN112749172A (en) Data synchronization method and system between cache and database
CN115834604A (en) Data transmitting terminal, data receiving terminal, synchronization method and computer program product
CN110647298B (en) Data storage control method and device
CN111367921A (en) Data object refreshing method and device
CN111586438B (en) Method, device and system for processing service data
JP2010171557A (en) Multi-address transmission device, receiving node, multi-address transmission program and recording 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