A message push method and device

By determining the cumulative number of push failures of messages and the reasons for push failures, dynamically adjusting the push time of messages, solving the problem that fixed interval time in the existing technology cannot effectively solve the problem of message push failures, and improving the success rate of message push.

CN119094602BActive Publication Date: 2025-06-06BEIJING ALL UNION TECH CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411041443.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-06-06
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In the prior art, when message push fails, a fixed interval repush policy may not be able to effectively troubleshoot, resulting in messages that may still fail. How to set a more reasonable repush time becomes a problem.

Method used

By determining the cumulative number of push failures of the message and the reason for push failure, the interval duration of the target message is determined based on this information, and the push time is updated so that it can be re-pushed after the push time and is separated from the push time by the push time.

Benefits of technology

This improves the success rate of message push, and dynamically adjusts the push time to eliminate faults that cause message push failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094602B_ABST
    Figure CN119094602B_ABST
Patent Text Reader

Abstract

The present application discloses a message push method and device, which relate to the field of computer technology. The main purpose is to set a more reasonable re-push time for messages that fail to be pushed, so as to improve the success rate of message push; the main technical scheme includes: the first system generates a message that needs to be pushed to the second system, and each message of the first system has a corresponding push time; when there is a target message with a push time of the current time in the first system, the target message is pushed to the second system; if the push of the target message fails, the cumulative number of push failures and the reason for the push failure of the target message are determined; based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined; the push time of the target message is updated to a time after the push time and separated from the push time by the interval duration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a message push method and device. Background Art

[0002] With the development of information technology, some systems will push messages to other systems as message pushers, so that other systems can know matters or handle business through the received messages.

[0003] When a message pusher pushes a message to other systems, if there is a communication interruption or other system failure, the message will fail to be pushed. At present, for messages that fail to be pushed, the message pusher usually pushes them again after a preset fixed interval. However, the failure that causes the message push failure after the fixed interval may not be eliminated, and the message may still fail to be pushed. Therefore, how to set a more reasonable re-push time for messages that fail to be pushed has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, the present application proposes a message push method and device, the main purpose of which is to set a more reasonable re-push time for messages that fail to be pushed, so as to improve the success rate of message push.

[0005] In order to achieve the above objectives, this application mainly provides the following technical solutions:

[0006] In the first aspect, the present application provides a message push method, which is applied to a first system, wherein the first system generates a message that needs to be pushed to a second system, and each message of the first system has a corresponding push time. The message push method includes: when there is a target message in the first system whose push time is the current time, pushing the target message to the second system; if the push of the target message fails, determining the cumulative number of push failures and the reason for the push failure of the target message; based on the cumulative number of push failures and the reason for the push failure, determining the interval duration corresponding to the target message; and updating the push time of the target message to a time after the push time and separated from the push time by the interval duration.

[0007] In some embodiments of the present application, determining the reason for the failure to push the target message includes: detecting whether the communication connection between the first system and the second system is interrupted; if interrupted, determining that the reason for the failure to push the target message is the communication interruption; if not interrupted, determining that the reason for the failure to push the target message is a failure of the second system.

[0008] In some embodiments of the present application, the interval duration corresponding to the target message is determined based on the cumulative number of push failures and the reason for the push failure, including: if the reason for the push failure is the interruption of the communication connection, determining whether the cumulative number of push failures is not less than a first number threshold; if not less than, determining the longest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message; if less than, determining the shortest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message.

[0009] In some embodiments of the present application, based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined, including: if the reason for the push failure is the interruption of the communication connection, then from the first preset correspondence relationship applicable to the interruption of the communication connection, searching for the first interval duration corresponding to the cumulative number of push failures of the target message, the first preset correspondence relationship being a correspondence between multiple cumulative numbers of push failures and multiple first interval durations, and the first interval duration is positively correlated with the cumulative number of push failures; the found first interval duration is determined as the interval duration corresponding to the target message.

[0010] In some embodiments of the present application, the interval duration corresponding to the target message is determined based on the cumulative number of push failures and the reason for the push failure, including: if the reason for the push failure is the interruption of the communication connection, calling the first interval duration determination interface, adopting the interval duration determination logic suitable for the interruption of the communication connection, and determining the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0011] In some embodiments of the present application, based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined, including: if the reason for the push failure is a second system failure, determining the fault category of the second system; judging whether the cumulative number of push failures is not less than a second numerical threshold; if not less than, then determining the longest empirical time required to eliminate the fault of the fault category occurring in the second system as the interval duration corresponding to the target message; if less than, then determining the shortest empirical time required to eliminate the fault of the fault category occurring in the second system as the interval duration corresponding to the target message.

[0012] In some embodiments of the present application, each fault category has a corresponding second preset correspondence, and the second preset correspondence is a correspondence between multiple cumulative push failure times and multiple second interval durations, and the second interval duration is positively correlated with the cumulative push failure times. Then, based on the cumulative push failure times and the push failure cause, the interval duration corresponding to the target message is determined, including: if the push failure cause is a second system failure, determining the fault category of the second system; searching for the second interval duration corresponding to the cumulative push failure times in the second preset correspondence corresponding to the fault category; and determining the found second interval duration as the interval duration corresponding to the target message.

[0013] In some embodiments of the present application, each fault category has a corresponding second interval duration determination interface, then, based on the cumulative number of push failures and the push failure cause, the interval duration corresponding to the target message is determined, including: if the push failure cause is a second system failure, determining the fault category of the second system; calling the second push time setting interface corresponding to the fault category, using the interval duration determination logic applicable to the fault category, and determining the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0014] In some embodiments of the present application, each fault category has a corresponding a priori time period, and if a fault of the corresponding fault category occurs in the second system during the a priori time period, determining the fault category of the second system includes: determining the a priori time period that matches the push time of the target message; and determining the fault category corresponding to the successfully matched a priori time period as the fault category of the second system.

[0015] In some embodiments of the present application, when a fault occurs in the second system, the fault type is reported to the target management system. Then, determining the fault type of the second system includes: determining the fault type reported by the second system in the target management system as the fault type of the second system.

[0016] In some embodiments of the present application, after determining the interval duration corresponding to the target message, the message push method further includes: determining a target time that is after the push time of the target message and separated from the push time by the interval duration; judging whether the number of messages that need to be pushed from the first system to the second system at the target time reaches a first quantity threshold; if reached, extending or shortening the interval duration; if not reached, executing the step of updating the push time of the target message to a time that is after the push time and separated from the push time by the interval duration.

[0017] In some embodiments of the present application, the first system is capable of pushing generated messages to the second system in real time, then the message pushing method also includes: if it is monitored that the first system generates messages that need to be pushed to the second system, detecting whether the number of messages that need to be pushed to the second system generated by the first system at the same time reaches a second quantity threshold; if not reached, for each message, setting the corresponding generation time of the message as the corresponding push time of the message, so that the message is pushed to the second system in real time; if reached, assigning a corresponding delay time to each message, wherein the delay time of at least two messages is different; for each message, setting the time after the generation time of the message and separated from the generation time by a corresponding delay time as the corresponding push time of the message.

[0018] In some embodiments of the present application, the message generated by the first system has a corresponding business, each business has a corresponding priority, and the message corresponding to the business with a priority higher than the preset priority needs to update the push time using the preset time corresponding to the priority when the push fails. Then, the message push method also includes: if the push of the target message fails, determine the business corresponding to the target message; determine whether the priority of the business is higher than the preset priority; if higher, update the push time of the target message to a time after the push time and separated from the push time by the preset time corresponding to the priority of the business; if not higher, execute the step of determining the cumulative number of push failures and the cause of the push failure of the target message.

[0019] In some embodiments of the present application, the message push method also includes: if the push of the target message fails, detecting whether the number of consecutive push failures of the first system reaches a third number threshold; if not reached, executing the step of determining the cumulative number of push failures and the reason for the push failure of the target message; if reached, stopping pushing messages to the second system and issuing a prompt to stop pushing messages to the second system.

[0020] In some embodiments of the present application, the message push method also includes: determining whether the cumulative number of push failures reaches a fourth number threshold corresponding to the target message; if reached, issuing a push failure notification for the target message; if not reached, executing the step of determining the interval duration corresponding to the target message based on the cumulative number of push failures and the push failure reason.

[0021] In some embodiments of the present application, the message pushing method further includes: if the target message is pushed successfully, removing the target message from the first system, or marking that the target message has been successfully pushed to the second system.

[0022] In some embodiments of the present application, the message is generated after the first system processes the task initiated by the second system, and is a notification message used to inform the second system of the processing result of the task by the first system.

[0023] In a second aspect, the present application provides a message push device, which is applied to a first system, the first system generates a message that needs to be pushed to a second system, each message of the first system has a corresponding push time, and the message push device includes:

[0024] A push module, configured to push a target message to the second system when there is a target message in the first system whose push time is the current time;

[0025] A first determination module is used to determine the cumulative number of push failures and the push failure reason of the target message if the push of the target message fails;

[0026] A second determination module is used to determine the interval duration corresponding to the target message based on the accumulated number of push failures and the push failure reasons;

[0027] The updating module is used to update the push time of the target message to a time after the push time and separated from the push time by the interval time.

[0028] In a third aspect, the present application provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the message push method described in the first aspect.

[0029] In a fourth aspect, the present application provides an electronic device, comprising: a memory for storing a program; and a processor, coupled to the memory, for running the program to execute the message push method described in the first aspect.

[0030] The message push method and device provided by the present application set a corresponding push time for each message generated by the first system and needs to be pushed to the second system. When there is a target message whose push time is the current time in the first system, the target message is pushed to the second system. If the push of the target message fails, the cumulative number of push failures and the reason for the push failure of the target message are determined. Based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined. The push time of the target message is updated to a time after the push time and separated from the push time by the interval duration. It can be seen that the interval duration used to update the push time of the message in the scheme provided by the present application is obtained based on the cumulative number of push failures and the reason for the push failure of the message, and the interval duration is relatively close to the interval duration required to eliminate the fault condition that caused the failure of the message push. Therefore, the re-push time updated for the message based on such an interval duration is more reasonable, and re-pushing the message at such a re-push time can improve the success rate of the message push.

[0031] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] Figure 1 A flowchart of a message push method provided by an embodiment of the present application is shown;

[0034] Figure 2 A schematic diagram of the structure of a message push device provided by an embodiment of the present application is shown;

[0035] Figure 3 A schematic structural diagram of a message push device provided in another embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0037] At present, for messages that fail to be pushed, the message pusher usually pushes them again after a preset fixed interval. However, the fault that caused the failure of message push may not be eliminated after the fixed interval, and the message may still fail to be pushed. Based on this, after research, it was found that if the failed push messages are not re-pushed at a fixed interval, but the cumulative number of failed pushes and the reasons for the failed pushes are determined, and the cumulative number of failed pushes and the reasons for the failed pushes are combined to estimate the interval required to eliminate the fault that caused the failed push of the message, then based on such an interval, a more reasonable re-push time can be updated for the failed push messages, and the message can be re-pushed at the re-push time, which can improve the success rate of message push.

[0038] Based on the above findings, this embodiment specifically provides a technical solution for message push, specifically: set a corresponding push time for each message generated by the first system that needs to be pushed to the second system. When there is a target message in the first system whose push time is the current time, push the target message to the second system. If the push of the target message fails, determine the cumulative number of push failures and the reason for the push failure of the target message. Based on the cumulative number of push failures and the reason for the push failure, determine the interval duration corresponding to the target message. Update the push time of the target message to a time after the push time and separated from the push time by the interval duration.

[0039] Based on the above-mentioned technical solution of message pushing, this embodiment specifically provides a message pushing method and device. The message pushing method and device provided by this embodiment are specifically described below.

[0040] The embodiment of the present application provides a message push method, which is applied to a first system to push a message generated by the first system and needs to be pushed to a second system to the second system. Figure 1 As shown, the message push method mainly includes the following steps 101 to 104:

[0041] 101. When there is a target message whose push time is the current time in the first system, push the target message to the second system.

[0042] The message push method provided in this embodiment is used to push a message generated by a first system to a second system, wherein the first system is the message pusher and the second system is the message receiver. The types of the first system and the second system can be flexibly determined based on business needs, and this embodiment does not limit this. For example, the first system is a server and the second system is a client. For example, the first system and the second system are two different servers.

[0043] In this embodiment, the first system generates a message that needs to be pushed to the second system. The message is related to the business scenarios of the first system and the second system, so the message includes at least the following two types: First, if the first system is used to process the task initiated by the second system and needs to inform the second system of the processing result of the task, then the message is generated after the first system processes the task initiated by the second system, and is used to inform the second system of the processing result of the task by the first system. Exemplarily, in the payment scenario, the second system initiates an application deduction task to the first system, and the first system generates a message after processing the application deduction task. The message is used to inform the second system whether the deduction is successful after the first system executes the application deduction task. In the equity recharge scenario, the second system initiates a phone charge recharge task to the first system. After processing the phone charge recharge task, the first system generates a message. The message is used to inform the second system whether the recharge is successful after the first system executes the phone charge recharge task. Second, if the first system actively pushes a message of interest to the second system, the message is a message generated by the first system that the second system may be interested in.

[0044] In this embodiment, in order to improve the success rate of message push, each message generated by the first system has a corresponding push time, and the push time is the time it takes for the message to be pushed from the first system to the second system. The push time of the message includes the following two situations: one is that the push time is the first push time set for the message when the message is generated. The other is that the push time is the re-push time updated for the message after the message push fails. This push time is the re-push time updated based on the situation of the message push failure after the message is generated. It should be noted that this updated push time is only available for messages that fail to push.

[0045] In order to ensure that each message generated by the first system has a corresponding push time, the message push method provided in this embodiment may further include a scheme for setting the push time of the message, and the scheme may include the following steps 101A to 101C:

[0046] 101A. If it is monitored that the first system generates a message that needs to be pushed to the second system, detect whether the number of messages generated by the first system at the same time that needs to be pushed to the second system reaches a second quantity threshold; if not, execute step 101B; if reached, execute step 101C.

[0047] In order to timely push the information generated by the first system that needs to be pushed to the second system to the second system, it is necessary to monitor in real time whether the first system generates information that needs to be pushed to the second system.

[0048] Considering that if there are too many messages that need to be pushed to the second system at the same time, the messages pushed by the first system to the second system will instantly form a peak, causing network congestion, so that some messages cannot be pushed to the second system in time. In order to reduce the possibility of congestion, this embodiment needs to detect whether the number of messages generated by the first system at the same time that need to be pushed to the second system reaches a second number threshold when monitoring the generation of messages by the first system. The second number threshold is a pre-obtained prior experience value that will cause congestion.

[0049] If it is detected that the number of messages generated by the first system at the same time that need to be pushed to the second system does not reach the second number threshold, it means that pushing these messages to the second system at the same time will not cause network congestion, and the messages will most likely be pushed to the second system smoothly. Therefore, in order to push the messages to the second system in time, step 101B is executed.

[0050] If it is detected that the number of messages generated by the first system at the same time that need to be pushed to the second system reaches the second number threshold, it means that pushing these messages to the second system at the same time will most likely cause network congestion. Therefore, in order to avoid network congestion, step 101C is executed.

[0051] 101B. For each message, the corresponding generation time of the message is set as the corresponding push time of the message, so that the message is pushed to the second system in real time.

[0052] The first system can push the generated message to the second system in real time, so that the message can reach the second system in time for use by the second system. Therefore, when it is detected that the number of messages that need to be pushed to the second system generated by the first system at the same time does not reach the second number threshold, the following steps are performed for each message: the corresponding generation time of the message is set as the corresponding push time of the message. In this way, the message can be pushed to the second system in real time after it is generated, thereby ensuring the timeliness of message push.

[0053] 101C. Allocate a corresponding delay time for each message, wherein the delay time of at least two messages is different; for each message, set the time after the message generation time and separated from the generation time by the corresponding delay time as the corresponding push time of the message.

[0054] When it is detected that the number of messages generated by the first system at the same time that need to be pushed to the second system reaches a second quantity threshold, in order to reduce the possibility of network congestion, a corresponding delay time is allocated to each message to achieve decentralized push of the messages through the delay time.

[0055] The method of assigning a corresponding delay duration to each message may include the following two methods: First, for each message, randomly assign a corresponding delay duration to the message from a duration set including multiple delay durations, for example, the duration set includes durations between 1 and 180 seconds. Second, divide the messages into at least two groups, assign the same extended duration to the messages in each group, and the extended durations of different groups are different, and the number of messages in each group will not cause network congestion. It should be noted that no matter which of the above methods is used to assign the delay duration, after the delay duration is assigned, there will be at least two messages with different delay durations, so that the number of messages pushed at the same time can be controlled not to reach the second quantity threshold that will cause network congestion.

[0056] By setting the push time of the message, it is possible to ensure that each message of the first system has a corresponding push time. In order to enable the message to be pushed to the second system at the corresponding push time, it is necessary to detect whether there is a target message with the push time of the current time in the first system.

[0057] When it is detected that there is a target message with a push time of the current time in the first system, it means that the target message with a push time of the current time needs to be pushed to the second system, so the target message is pushed to the second system. The push method of the first system to push the target message to the second system can be flexibly selected based on business requirements, and this embodiment does not limit this.

[0058] 102. If the push of the target message fails, determine the cumulative number of push failures and the reason for the push failure of the target message.

[0059] After the target message is pushed to the second system, it is necessary to monitor whether the target message fails to be pushed, so as to push the target message again if the push fails, so as to ensure that the target message can be pushed to the second system.

[0060] Normally, after a message is successfully pushed to the second system, the second system will feedback to the first system that the message has been successfully received. Therefore, when pushing the target message to the second system, it is monitored in real time whether the second system's feedback on the target message is received. If no feedback from the second system is received within the specified time after the target message is pushed, it is determined that the push of the target message has failed. If feedback from the second system is received within the specified time after the target message is pushed, it is determined that the push of the target message has been successful.

[0061] If the target message push fails, it is necessary to determine the cumulative number of push failures and the push failure reasons of the target message, so as to perform a subsequent process of updating the target message push time based on the cumulative number of push failures and the push failure reasons.

[0062] The following is an explanation of determining the cumulative number of push failures of the target message. Normally, the first system records the cumulative number of push failures for each message, and each time a message fails to be pushed, the cumulative number of push failures for the message is accumulated once. In the event that the push of the target message fails, the cumulative number of push failures of the target message determined is the cumulative number of push failures after the current push failure is accumulated.

[0063] The following is an explanation of determining the reason for the failure to push the target message. The specific process of determining the reason for the failure to push the target message may include the following steps: detecting whether the communication connection between the first system and the second system is interrupted; if interrupted, determining the reason for the failure to push the target message is the communication interruption; if not interrupted, determining the reason for the failure to push the target message is the failure of the second system.

[0064] The specific steps of detecting whether the communication connection between the first system and the second system is interrupted may be: controlling the first system to send a detection data packet to the second system, and if the first system receives a response packet fed back by the second system for the detection data packet after sending the detection data packet, it is detected that the communication connection between the first system and the second system is not interrupted. If the first system does not receive a response packet fed back by the second system for the detection data packet after sending the detection data packet, it is detected that the communication connection between the first system and the second system is interrupted.

[0065] If it is detected that the communication connection between the first system and the second system is interrupted, it means that message transmission cannot be performed between the first system and the second system. The failure of pushing the target message is most likely caused by the interruption of the communication connection between the first system and the second system. Therefore, it is determined that the cause of the failure of pushing the target message is the communication interruption.

[0066] If it is detected that the communication connection between the first system and the second system is not interrupted, it means that the communication connection between the first system and the second system can ensure that the first system can successfully push the target message to the second system. If the target message push fails at this time, then the failure to push the target message is most likely caused by a system failure in the second system that makes it difficult to successfully receive the message. Therefore, it is determined that the cause of the failure to push the target message is a failure in the second system.

[0067] 103. Based on the cumulative number of push failures and the reasons for the push failures, determine the interval duration corresponding to the target message.

[0068] The reasons for the failure of pushing the target message include the following two: one is that the communication connection between the first system and the second system is interrupted (for example, the network is disconnected); the other is that the second system fails (for example, shutdown, Chongqing, downtime, etc.). Considering that the target message can only be successfully pushed to the second system after the reasons for the push failure are eliminated, and it takes a certain amount of time to eliminate the reasons for the push failure, in order to increase the probability of successfully pushing the target message the next time the target message is pushed, it is necessary to determine the interval length corresponding to the target message based on the cumulative number of push failures and the reasons for the push failures, so as to update a more reasonable push time for the target message based on the interval length.

[0069] The methods for determining the interval length corresponding to the target message are different for different push failure reasons. The following describes the methods for determining the interval length corresponding to the target message for different push failure reasons:

[0070] The push failure of the target message is due to interruption of the communication connection.

[0071] Then, based on the cumulative number of push failures and the push failure reasons, the methods for determining the interval length corresponding to the target message may include the following three methods:

[0072] The first one is that the specific process of determining the interval duration corresponding to the target message based on the cumulative number of push failures and the reasons for push failures may include the following steps: if the reason for the push failure is the interruption of the communication connection, then judging whether the cumulative number of push failures is not less than the first number threshold; if not less than, then determining the longest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message; if less than, then determining the shortest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message.

[0073] If it is determined that the cumulative number of push failures is not less than the first number threshold, it means that the communication connection between the first system and the second system may take a long time to recover. Therefore, in order to reduce invalid message push, the longest empirical time required to restore the communication connection between the first system and the second system is determined as the interval time corresponding to the target message.

[0074] If it is determined that the cumulative number of push failures is less than the first number threshold, it means that the communication connection between the first system and the second system may be restored in a short time. Therefore, in order to be able to push the target message to the second system in time after the communication connection is restored, the shortest empirical time required to restore the communication connection between the first system and the second system is determined as the interval time corresponding to the target message.

[0075] The second method is to determine the interval duration corresponding to the target message based on the cumulative number of push failures and the reasons for push failures, and the specific process may include the following steps: if the reason for the push failure is the interruption of the communication connection, then from the first preset correspondence relationship applicable to the interruption of the communication connection, search for the first interval duration corresponding to the cumulative number of push failures of the target message; determine the first interval duration found as the interval duration corresponding to the target message.

[0076] The first preset correspondence is a correspondence between multiple cumulative push failures and multiple first interval durations. Considering that the more the cumulative push failures, the longer the time required for the first system and the second system to restore the communication connection may be, the first interval duration in the first preset correspondence is positively correlated with the cumulative push failures, that is, the more the cumulative push failures, the longer the corresponding first interval duration. Since the first interval durations corresponding to different cumulative push failures are preset in the first preset correspondence, the interval duration corresponding to the target message can be quickly and accurately determined by searching the first preset correspondence.

[0077] The third type, based on the cumulative number of push failures and the reasons for push failures, the specific process of determining the interval duration corresponding to the target message may include the following steps: if the reason for the push failure is the interruption of the communication connection, call the first interval duration determination interface, adopt the interval duration determination logic applicable to the interruption of the communication connection, and determine the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0078] In order to facilitate the determination of the interval duration corresponding to the message, the first interval duration determination interface is preset in advance, and the first interval duration determination interface has an interval duration determination logic suitable for interrupted communication connection. The interval duration determination logic determines the interval duration corresponding to the message based on the push time of the message and the cumulative number of push failures. For example, if the push time of the message is 8:00 and the cumulative number of push failures is 2, the determined time interval is 5 seconds. If the push time of the message is 10:00 and the cumulative number of push failures is 2, the determined time interval is 6 seconds.

[0079] The above three methods for determining the interval duration corresponding to the target message based on the cumulative number of push failures and the reasons for push failures can be flexibly selected one, two or three based on business needs, and this embodiment does not limit this.

[0080] The push failure of the target message is caused by a failure of the second system.

[0081] Then, based on the cumulative number of push failures and the push failure reasons, the methods for determining the interval length corresponding to the target message may include the following three methods:

[0082] The first one is that the specific process of determining the interval duration corresponding to the target message based on the cumulative number of push failures and the reasons for push failures may include the following steps: if the reason for the push failure is a second system failure, determining the fault category of the second system; judging whether the cumulative number of push failures is not less than a second numerical threshold; if not less than, determining the longest empirical time required to eliminate the fault category of the second system as the interval duration corresponding to the target message; if less than, determining the shortest empirical time required to eliminate the fault category of the second system as the interval duration corresponding to the target message.

[0083] It takes different time to eliminate faults of different fault categories. Therefore, if the push failure is caused by a second system fault, the fault category of the second system is determined, and it is determined whether the cumulative number of push failures is not less than the second number threshold.

[0084] If it is determined that the cumulative number of push failures is not less than the second number threshold, it means that the second system may be in a fault corresponding to the fault category for a long time. Therefore, in order to reduce the invalid push of messages, the longest empirical time required to eliminate the fault of the fault category occurring in the second system is determined as the interval time corresponding to the target message.

[0085] If it is determined that the cumulative number of push failures is less than the second number threshold, it means that the fault of the fault category of the second system still has a certain probability of being eliminated in a short time. Therefore, in order to be able to push the target message to the second system in time after the fault of the fault category of the second system, the shortest empirical time required to eliminate the fault of the fault category occurring in the second system is determined as the interval duration corresponding to the target message.

[0086] The second type, based on the cumulative number of push failures and the reasons for push failures, the specific process of determining the interval duration corresponding to the target message may include the following steps: if the reason for the push failure is a second system failure, determining the fault category of the second system; in the second preset correspondence corresponding to the fault category, searching for the second interval duration corresponding to the cumulative number of push failures; and determining the found second interval duration as the interval duration corresponding to the target message.

[0087] Each fault category has a corresponding second preset correspondence, and the second preset correspondence is a correspondence between multiple cumulative push failures and multiple second interval durations. Considering that the more cumulative push failures there are, the longer the time required for the second system to eliminate the fault of the corresponding fault category may be, so the second interval duration in the second preset correspondence is positively correlated with the cumulative push failures, that is, the more cumulative push failures there are, the longer the corresponding second interval duration. Since the second interval durations corresponding to different cumulative push failures are preset in the second preset correspondence, the interval duration corresponding to the target message can be quickly and accurately determined by looking up the second preset correspondence corresponding to the fault category of the second system.

[0088] Third, based on the cumulative number of push failures and the reasons for push failures, the specific process of determining the interval duration corresponding to the target message may include the following steps: if the reason for the push failure is a second system failure, determining the fault category of the second system; calling the second push time setting interface corresponding to the fault category, using the interval duration determination logic applicable to the fault category, and determining the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0089] Each fault category has a corresponding second interval duration determination interface. The second interval duration determination interface has an interval duration determination logic applicable to the corresponding fault category, and the interval duration determination logic for different fault categories may be different. The interval duration determination logic determines the interval duration corresponding to the message based on the push time of the message and the cumulative number of push failures.

[0090] The above three methods for determining the interval duration corresponding to the target message based on the cumulative number of push failures and the push failure reasons all involve determining the fault category of the second system. The methods for determining the fault category of the second system may include the following two:

[0091] One is that the specific process of determining the fault category of the second system may include the following steps: determining a priori time period that matches the push time of the target message; and determining the fault category corresponding to the successfully matched priori time period as the fault category of the second system.

[0092] Each fault category has a corresponding a priori time period, and the second system has a fault of the corresponding fault category in the a priori time period. The correspondence between the fault category and the a priori time period is obtained through a large amount of second system fault data statistics. Exemplarily, the a priori time period includes [7:00-12:00], [12:01-18:00], and the push time of the target message is 8:00, then the a priori time period [7:00-12:00] is determined as the a priori time period that successfully matches the push time of the target message, and the fault category corresponding to the a priori time period [7:00-12:00] is determined as the fault category of the second system.

[0093] Another is that when the second system fails, the fault type is reported to the target management system. Then, the specific process of determining the fault type of the second system may include the following steps: determining the fault type reported by the second system in the target management system as the fault type of the second system.

[0094] In order to facilitate the operation and maintenance management of the second system, when a fault occurs in the second system, the fault category will be reported to the target management system. Therefore, the fault category reported by the second system in the target management system is determined as the fault category of the second system.

[0095] The above two methods for determining the fault category of the second system can be used alone or in combination, which is not limited in this embodiment. For example, when used in combination, the second method is used first, and when the second method fails to obtain the fault category reported by the second system from the target management system, the first method is used.

[0096] 104. Update the push time of the target message to a time that is after the push time and separated from the push time by an interval time.

[0097] After determining the interval duration of the target message, the push time of the target message is updated to a time after the push time and separated from the push time by the interval duration. The updated push time is the re-push time of the target message. Since the re-push time is obtained based on the interval duration, the interval duration provides time to eliminate the fault situation that causes the push failure. Therefore, re-pushing the target message to the second system based on the re-push time can improve the success rate of the target message push.

[0098] Exemplarily, the target information interval is 5 seconds, and the push time of the target message is 10:00:00, then the push time of the updated target message is 10:00:05.

[0099] The message push method provided in the embodiment of the present application sets a corresponding push time for each message generated by the first system and needs to be pushed to the second system. When there is a target message whose push time is the current time in the first system, the target message is pushed to the second system. If the target message fails to be pushed, the cumulative number of push failures and the reason for the push failure of the target message are determined. Based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined. The push time of the target message is updated to a time after the push time and separated from the push time by the interval duration. It can be seen that the interval duration used for updating the push time of the message in the scheme provided in the embodiment of the present application is obtained based on the cumulative number of push failures and the reason for the push failure of the message, and the interval duration is relatively close to the interval duration required to eliminate the fault condition that causes the failure of the message push, so it is more reasonable to re-push the message based on such an interval duration. Re-pushing the message under such a re-push time can improve the success rate of the message push.

[0100] In some embodiments of the present application, after the target message is pushed to the second system in step 101, the target message may be successfully pushed to the second system. Therefore, the message push provided in this embodiment may also include the following steps: If the target message is successfully pushed, any of the following operations may be performed:

[0101] The first method is to remove the target message from the first system. The purpose of removing the target message from the first system is as follows: first, to release the storage resources occupied by the target message for use by new messages generated by the first system. Second, to prevent the target message from interfering with other messages that have not been successfully pushed to the second system.

[0102] The second method is to indicate that the target message has been successfully pushed to the second system. The purpose of indicating that the target message has been successfully pushed to the second system is to indicate that the target message has been successfully pushed to the second system by indicating that the target message has been successfully pushed to the second system, so as to prevent the target message from being pushed again.

[0103] The above two operations can be flexibly selected based on business needs, and this embodiment does not limit this. For example, when the storage space of the first system is limited, the first operation can be selected. When the first system needs to use the target message for other business processing, such as replaying the message pushed to the second system, the second operation can be selected.

[0104] In some embodiments of the present application, in order to reduce invalid message pushes, the message push method provided in this embodiment may further include the following steps: if the target message push fails, detecting whether the number of consecutive push failures in the first system reaches the third number threshold; if not reached, executing the above step 102 to determine the cumulative number of push failures and the reason for the push failure of the target message; if reached, stopping pushing messages to the second system, and issuing a prompt to stop pushing messages to the second system.

[0105] If it is detected that the number of consecutive push failures in the first system reaches the third number threshold, it means that the push environment for the first system to push messages to the second system is bad, and the cause of the failure to push messages (for example, the communication connection between the first system and the second system is difficult to restore or the second system fails) is difficult to eliminate. Therefore, stop pushing messages to the second system, and issue a prompt to stop pushing messages to the second system to inform to stop polling messages in the first system for push. It should be noted that after a certain period of time after stopping pushing messages to the second system, it is necessary to resume pushing messages to the second system. Here, the certain period of time is the time spent to eliminate the above-mentioned push failure reasons.

[0106] It should be noted that when stopping pushing messages to the second system, it is necessary to record the time of stopping, so that when resuming pushing messages to the second system, the push time of messages generated before the first system resumed pushing and not yet successfully pushed to the second system will be delayed by the target delay time. The target delay time is obtained based on the time difference between the resumption time and the stop time.

[0107] If it is detected that the number of consecutive push failures in the first system does not reach the third number threshold, it means that the cause of the message push failure may be eliminated soon, so the above step 102 is executed.

[0108] In some embodiments of the present application, the message generated by the first system has a corresponding business, each business has a corresponding priority, and the messages of the business with a priority higher than the preset priority need to be pushed to the second system in a timely manner. The messages of these businesses are not suitable for determining the interval time corresponding to the target message based on the cumulative number of push failures and the push failure reasons, and updating the push time of the target message to a time after the push time and separated from the push time by the interval time. When the push fails, the message corresponding to the business with a priority higher than the preset priority needs to use the priority corresponding preset time to update the push time, so as to realize the re-push of the messages of these businesses in a short time. Therefore, the message push method provided in this embodiment can also include the following steps: if the push of the target message fails, determine the business corresponding to the target message; determine whether the priority of the business is higher than the preset priority. If it is higher, update the push time of the target message to a time after the push time and separated from the push time by the priority of the business corresponding preset time; if it is not higher, execute step 102 to determine the cumulative number of push failures and the push failure reason of the target message.

[0109] In this embodiment, the preset duration corresponding to each priority level can be determined based on business requirements, and this embodiment does not limit this. For example, the higher the priority level, the shorter the corresponding preset duration.

[0110] If it is determined that the priority of the service is higher than the preset priority, it means that the target message needs to be pushed to the second system in a timely manner. Therefore, in order to be able to push the target message to the second system again in a short time, the push time of the target message is updated to a time after the push time and separated from the push time by a preset time corresponding to the priority of the service.

[0111] If it is determined that the priority of the service is not higher than the preset priority, it means that the timeliness requirement for pushing the target to the second system is not high, so step 102 is executed to set a more reasonable re-push time for the message that failed to be pushed, so as to improve the success rate of message push.

[0112] In some embodiments of the present application, for a time-sensitive message, if it is not successfully pushed to the second system within its validity period, then it does not need to be pushed to the second system after its validity period expires. Therefore, after determining the cumulative number of push failures of the target message in the above step 102, the message push method provided in this embodiment may also include the following steps: determining whether the cumulative number of push failures reaches the fourth number threshold corresponding to the target message; if reached, issuing a push failure notification for the target message; if not reached, executing step 103 based on the cumulative number of push failures and the push failure reason, determining the interval length of the target message.

[0113] The message generated by the first system has a corresponding service. The validity periods corresponding to different services may be different. Therefore, the fourth number threshold corresponding to each service may be preset based on the validity period of each service.

[0114] When it is determined that the cumulative number of push failures of the target message reaches the fourth threshold value corresponding to the target message, it means that the validity period of the target message may have expired, and the target message may no longer be re-pushed to the second system. Therefore, the push time for the target message is no longer updated, but a push failure notification is issued for the target message, so as to disclose the fact that there is no need to re-push the target message to the target message through the push failure notification.

[0115] When it is determined that the cumulative number of push failures of the target message does not reach the fourth number threshold corresponding to the target message, it means that the validity period of the target message has not ended and the second system can still use the target message. Therefore, step 103 is executed to update the push time for the target message and re-push the target message to the second system based on the updated push time.

[0116] Furthermore, considering that some business messages do not have a validity period, the messages of these businesses need to be successfully pushed to the second system so that the second system can know the matter or process the business by receiving the message. For example, in a payment scenario, the message is used to inform the second system whether the first system has successfully deducted the money after executing the application deduction task. The message does not have a validity period and must be successfully pushed to the second system. Therefore, before determining whether the cumulative number of push failures reaches the number threshold corresponding to the target message, the following steps are also required: determine the business corresponding to the message and determine whether the business has a validity period; if not, execute step 103 to update the push time for the target message and re-push the target message to the second system based on the updated push time. If so, execute the step of determining whether the cumulative number of push failures reaches the fourth number threshold corresponding to the target message.

[0117] In some embodiments of the present application, after determining the interval duration corresponding to the target message in the above step 103, the message push method may further include the following steps: determining a target time that is after the push time of the target message and separated from the push time by the interval duration; determining whether the number of messages that need to be pushed from the first system to the second system at the target time reaches a first quantity threshold; if reached, extending or shortening the interval duration; if not reached, executing the step of updating the push time of the target message to a time that is after the push time and separated from the push time by the interval duration.

[0118] If the number of messages pushed to the second system at the same time reaches a certain threshold, network congestion is likely to occur, which may cause some message pushes to fail due to network congestion. Therefore, in order to reduce the possibility of network congestion, after determining the interval duration corresponding to the target message, first determine the target time that is after the push time of the target message and separated from the push time by the interval duration, and judge whether the number of messages that need to be pushed to the second system in the first system at the target time reaches the first threshold.

[0119] If it is determined that the number of messages in the first system that need to be pushed to the second system at the target time reaches the first quantity threshold, it means that if the push time of the target message is updated using the interval duration corresponding to the target message, network congestion may be caused. Therefore, the interval duration of the target message may be extended or shortened, and step 104 is executed based on the extended or shortened interval duration.

[0120] If it is determined that the number of messages in the first system that need to be pushed to the second system at the target time does not reach the first quantity threshold, it means that if the push time of the target message is updated using the interval duration corresponding to the target message, it will not cause network congestion. Therefore, step 104 is executed to update the push time of the target message based on the interval duration.

[0121] In some embodiments of the present application, if the first system is a distributed system, in order to reasonably use the servers in the distributed system, the message push method provided in this embodiment can be applied by the following scheme: the distributed system includes a master server and a slave server. Considering that the number of messages pushed for the first time is large and the real-time requirement is high, the master service with higher overall performance is responsible for pushing the messages pushed for the first time to the second system. Considering that the number of messages not pushed for the first time is relatively small and the real-time requirement is relatively low, the slave server is responsible for pushing messages not pushed for the first time to the second system, and messages not pushed for the first time are messages for which push failures have occurred.

[0122] In some embodiments of the present application, the message push method provided by the present embodiment is described below by taking the pushing of message A to the first system as an example, specifically: the initial push time of message A is 10:00:00. When the current time is 10:00:00, message A is pushed to the second system. After monitoring, it is found that the push of message A fails. At this time, it is determined that the cumulative number of push failures of message A is 1 and the reason for the push failure is the interruption of the communication connection between the first system and the second system. Based on the cumulative number of push failures 1 and the reason for the push failure "communication interruption", after searching the first preset correspondence applicable to the communication connection terminal, it is determined that the interval duration corresponding to the target message is 5 seconds, and the push time of message A is updated to 10:00:05. When the current time is 10:00:05, message A is pushed to the second system again. After monitoring, it is found that the push of message A fails. At this time, it is determined that the cumulative number of push failures of message A is 2 and the reason for the push failure is the interruption of the communication connection between the first system and the second system. Based on the cumulative number of push failures 2 and the reason for the push failure "communication interruption", after searching the first preset corresponding relationship applicable to the communication connection terminal, it is determined that the interval length corresponding to the target message is 10 seconds, and the push time of message A is updated to 10:00:10. When the current time is 10:00:10, message A is pushed to the second system. After monitoring, it is found that the push of message A is successful, and message A is removed from the first system.

[0123] Furthermore, an embodiment of the present application further provides a message push device, which is applied to a first system, wherein the first system generates a message that needs to be pushed to a second system, and each message of the first system has a corresponding push time, such as Figure 2 As shown, the message push device includes:

[0124] A push module 21, configured to push a target message to the second system when there is a target message in the first system whose push time is the current time;

[0125] A first determination module 22 is used to determine the cumulative number of push failures and the push failure reason of the target message if the push of the target message fails;

[0126] A second determination module 23, configured to determine the interval duration corresponding to the target message based on the accumulated number of push failures and the push failure reasons;

[0127] The updating module 24 is used to update the push time of the target message to a time that is after the push time and separated from the push time by the interval time.

[0128] The message push device provided in the embodiment of the present application sets a corresponding push time for each message generated by the first system and needs to be pushed to the second system. When there is a target message whose push time is the current time in the first system, the target message is pushed to the second system. If the target message fails to be pushed, the cumulative number of push failures and the reason for the push failure of the target message are determined. Based on the cumulative number of push failures and the reason for the push failure, the interval duration corresponding to the target message is determined. The push time of the target message is updated to a time after the push time and separated from the push time by the interval duration. It can be seen that the interval duration used for updating the push time of the message in the scheme provided in the embodiment of the present application is obtained based on the cumulative number of push failures and the reason for the push failure of the message, and the interval duration is relatively close to the interval duration required to eliminate the fault condition that causes the failure of the message push, so it is more reasonable to re-push the message based on such an interval duration. Re-pushing the message under such a re-push time can improve the success rate of the message push.

[0129] In some embodiments of the present application, Figure 3 As shown, the first determination module 22 includes:

[0130] The detection unit 221 is used to detect whether the communication connection between the first system and the second system is interrupted; if interrupted, the first determination unit 222 is triggered to determine that the reason for the failure to push the target message is the communication interruption; if not interrupted, the second determination unit 223 is triggered to determine that the reason for the failure to push the target message is a second system failure.

[0131] In some embodiments of the present application, Figure 3 As shown, the second determination module 23 includes:

[0132] The third determination unit 231 is used to determine whether the cumulative number of push failures is not less than the first number threshold if the reason for the push failure determined by the first determination module 22 is the interruption of the communication connection; if not, the longest empirical time required to restore the communication connection between the first system and the second system is determined as the interval time corresponding to the target message; if less than, the shortest empirical time required to restore the communication connection between the first system and the second system is determined as the interval time corresponding to the target message.

[0133] In some embodiments of the present application, Figure 3 As shown, the second determination module 23 includes:

[0134] The fourth determination unit 232 is used to search for the first interval duration corresponding to the cumulative number of push failures of the target message from the first preset correspondence relationship applicable to the interruption of the communication connection if the reason for the push failure determined by the first determination module 22 is the interruption of the communication connection. The first preset correspondence relationship is a correspondence between multiple cumulative numbers of push failures and multiple first interval durations, and the first interval duration is positively correlated with the cumulative number of push failures; the found first interval duration is determined as the interval duration corresponding to the target message.

[0135] In some embodiments of the present application, Figure 3 As shown, the second determination module 23 includes:

[0136] The fifth determination unit 233 is used to call the first interval duration determination interface if the reason for the push failure determined by the first determination module 22 is the interruption of the communication connection, and adopt the interval duration determination logic applicable to the interruption of the communication connection to determine the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0137] In some embodiments of the present application, Figure 3 As shown, the second determination module 23 includes:

[0138] The sixth determination unit 234 is used to determine the fault type of the second system if the push failure cause determined by the first determination module 22 is a second system fault; determine whether the cumulative number of push failures is not less than a second number threshold; if not, determine the longest empirical time required to eliminate the fault of the fault type occurring in the second system as the interval duration corresponding to the target message; if less than, determine the shortest empirical time required to eliminate the fault of the fault type occurring in the second system as the interval duration corresponding to the target message.

[0139] In some embodiments of the present application, Figure 3 As shown, each fault category has a corresponding second preset corresponding relationship, the second preset corresponding relationship is a corresponding relationship between a plurality of cumulative push failure times and a plurality of second interval durations, and the second interval duration is positively correlated with the cumulative push failure times, then, the second determination module 23 includes:

[0140] The seventh determination unit 235 is used to determine the fault category of the second system if the push failure reason determined by the first determination module 22 is a second system fault; search for the second interval duration corresponding to the cumulative number of push failures in the second preset correspondence corresponding to the fault category; and determine the found second interval duration as the interval duration corresponding to the target message.

[0141] In some embodiments of the present application, Figure 3 As shown, each fault category has a corresponding second interval duration determination interface, and the second determination module 23 includes:

[0142] The eighth determination unit 236 is used to determine the fault category of the second system if the push failure reason determined by the first determination module 22 is a second system fault; call the second push time setting interface corresponding to the fault category, adopt the interval duration determination logic applicable to the fault category, and determine the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

[0143] In some embodiments of the present application, Figure 3 As shown, each fault category has a corresponding a priori time period, and if a fault of the corresponding fault category occurs in the second system during the a priori time period, the steps of the sixth determination unit 234, the seventh determination unit 235, and the eighth determination unit 236 determining the fault category of the second system include: determining the a priori time period that matches the push time of the target message; and determining the fault category corresponding to the successfully matched a priori time period as the fault category of the second system.

[0144] In some embodiments of the present application, Figure 3 As shown, when a fault occurs in the second system, the fault type is reported to the target management system. Then, the steps of the sixth determination unit 234, the seventh determination unit 235 and the eighth determination unit 236 determining the fault type of the second system include: determining the fault type reported by the second system in the target management system as the fault type of the second system.

[0145] In some embodiments of the present application, Figure 3 As shown, the message push device also includes:

[0146] The first judgment module 25 is used to determine a target time that is after the push time of the target message and separated from the push time by the interval time after the second determination module 23 determines the interval time corresponding to the target message; determine whether the number of messages that need to be pushed from the first system to the second system at the target time reaches a first quantity threshold; if reached, trigger the adjustment module 26 to extend or shorten the interval time; if not reached, trigger the update module 24 to execute the step of updating the push time of the target message to a time that is after the push time and separated from the push time by the interval time.

[0147] In some embodiments of the present application, Figure 3 As shown, the first system can push the generated message to the second system in real time, then, the message pushing device also includes:

[0148] The detection module 27 is used to detect whether the number of messages that need to be pushed to the second system generated by the first system at the same time reaches a second quantity threshold if it is monitored that the first system generates messages that need to be pushed to the second system; if not, the first setting module 28 is triggered to set the corresponding generation time of each message as the corresponding push time of the message, so that the message is pushed to the second system in real time; if reached, the second setting module 29 is triggered to assign a corresponding delay time to each message, wherein the delay time of at least two messages is different; for each message, the time after the generation time of the message and separated from the generation time by a corresponding delay time is set as the corresponding push time of the message.

[0149] In some embodiments of the present application, Figure 3 As shown, the message generated by the first system has a corresponding service, each service has a corresponding priority, and when the message corresponding to the service with a priority higher than the preset priority fails to be pushed, the push time needs to be updated using the preset time corresponding to the priority. Then, the message push device also includes:

[0150] The second judgment module 30 is used to determine the business corresponding to the target message if the push module 21 fails to push the target message; determine whether the priority of the business is higher than the preset priority; if higher, trigger the update module 24 to update the push time of the target message to a time after the push time and separated from the push time by a preset time corresponding to the priority of the business; if not higher, trigger the first determination module 22 to execute the steps of determining the cumulative number of push failures and the reasons for the push failures of the target message.

[0151] In some embodiments of the present application, Figure 3 As shown, the message push device also includes:

[0152] The second detection module 31 is used to detect whether the number of consecutive push failures of the first system has reached a third number threshold if the push module 21 fails to push the target message; if not, trigger the first determination module 22 to execute the steps of determining the cumulative number of push failures and the cause of the push failure of the target message; if reached, trigger the first handling module 32 to stop pushing messages to the second system and issue a prompt to stop pushing messages to the second system.

[0153] In some embodiments of the present application, Figure 3 As shown, the message push device also includes:

[0154] The third judgment module 33 is used to judge whether the cumulative number of push failures determined by the first determination module 22 reaches the fourth number threshold corresponding to the target message; if reached, the notification module 34 is triggered to issue a push failure notification for the target message; if not reached, the second determination module 23 is triggered to execute the step of determining the interval duration corresponding to the target message based on the cumulative number of push failures and the push failure reason.

[0155] In some embodiments of the present application, Figure 3 As shown, the message push device also includes:

[0156] The second processing module 35 is used to remove the target message from the first system if the push module 21 pushes the target message successfully, or to mark that the target message has been successfully pushed to the second system.

[0157] In some embodiments of the present application, the message in this embodiment is a notification message generated after the first system processes the task initiated by the second system, and is used to inform the second system of the processing result of the task by the first system.

[0158] In the message push device provided in the embodiment of the present application, the detailed explanations used in the operation of each functional module can be found in the corresponding detailed explanations of the message push method embodiment, which will not be repeated here.

[0159] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned message push method.

[0160] Furthermore, an embodiment of the present application also provides an electronic device, which includes: a memory for storing a program; and a processor, coupled to the memory, for running the program to execute the above-mentioned message push method.

[0161] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0162] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.

[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0164] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the application described herein, and the description of the above specific language is to disclose the preferred embodiment of the application.

[0165] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0167] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data cutover device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data cutover device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data switching device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data transfer device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0170] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0171] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0172] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0173] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0175] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A message push method, characterized in that: Applied to a first system, the first system generates a message that needs to be pushed to a second system, each message of the first system has a corresponding push time, and the method includes: When there is a target message in the first system whose push time is the current time, push the target message to the second system; If the push of the target message fails, determining the cumulative number of push failures and the push failure reason of the target message, wherein the push failure reason includes a second system failure; Determine the interval length corresponding to the target message based on the accumulated number of push failures and the push failure reason; Update the push time of the target message to a time after the push time and separated from the push time by the interval time; Based on the accumulated number of push failures and the push failure reasons, determining the interval duration corresponding to the target message, including: if the push failure reason is a second system failure, determining the fault category of the second system; judging whether the accumulated number of push failures is not less than a second numerical threshold; if not, determining the longest empirical time required to eliminate the fault of the fault category occurring in the second system as the interval duration corresponding to the target message; if less than, determining the shortest empirical time required to eliminate the fault of the fault category occurring in the second system as the interval duration corresponding to the target message; or, Each fault category has a corresponding second preset corresponding relationship, the second preset corresponding relationship is a corresponding relationship between multiple cumulative push failure times and multiple second interval durations, and the second interval duration is positively correlated with the cumulative push failure times. Then, based on the cumulative push failure times and the push failure cause, determining the interval duration corresponding to the target message includes: if the push failure cause is a second system fault, determining the fault category of the second system; searching for the second interval duration corresponding to the cumulative push failure times in the second preset corresponding relationship corresponding to the fault category; and determining the found second interval duration as the interval duration corresponding to the target message; or, Each fault category has a corresponding second interval duration determination interface, then, based on the cumulative number of push failures and the push failure reason, determining the interval duration corresponding to the target message, including: if the push failure reason is a second system failure, determining the fault category of the second system; calling the second push time setting interface corresponding to the fault category, using the interval duration determination logic applicable to the fault category, and determining the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures; Wherein, each fault category has a corresponding a priori time period, and if a fault of the corresponding fault category occurs in the second system in the a priori time period, then determining the fault category of the second system includes: determining the a priori time period that matches the push time of the target message; and determining the fault category corresponding to the successfully matched a priori time period as the fault category of the second system; Or, when the second system fails, the fault type is reported to the target management system. Then, determining the fault type of the second system includes: determining the fault type reported by the second system in the target management system as the fault type of the second system.

2. The method according to claim 1, characterized in that Determine the reason why the push of the target message fails, including: Detecting whether the communication connection between the first system and the second system is interrupted; If interrupted, determining that the reason for the failure to push the target message is a communication interruption; If there is no interruption, it is determined that the reason for the failure in pushing the target message is a failure of the second system.

3. The method according to claim 2, characterized in that Based on the accumulated number of push failures and the push failure reasons, determining the interval duration corresponding to the target message, including: if the push failure reason is the interruption of the communication connection, determining whether the accumulated number of push failures is not less than the first number threshold; if not, determining the longest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message; if less than, determining the shortest empirical time required to restore the communication connection between the first system and the second system as the interval duration corresponding to the target message; or, Based on the accumulated number of push failures and the push failure reasons, determining the interval duration corresponding to the target message includes: if the push failure reason is a communication connection interruption, searching for a first interval duration corresponding to the accumulated number of push failures of the target message from a first preset corresponding relationship applicable to the communication connection interruption, the first preset corresponding relationship being a correspondence between multiple accumulated number of push failures and multiple first interval durations, and the first interval duration is positively correlated with the accumulated number of push failures; determining the found first interval duration as the interval duration corresponding to the target message; or, Based on the cumulative number of push failures and the reason for the push failure, determine the interval duration corresponding to the target message, including: if the reason for the push failure is the interruption of the communication connection, call the first interval duration determination interface, adopt the interval duration determination logic applicable to the interruption of the communication connection, and determine the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures.

4. The method according to claim 1, characterized in that: After determining the interval duration corresponding to the target message, the method further includes: Determine a target time that is after the push time of the target message and is separated from the push time by the interval time; Determine whether the number of messages in the first system that need to be pushed to the second system at the target time reaches a first number threshold; If reached, extend or shorten the interval; If not reached, the step of updating the push time of the target message to a time after the push time and separated from the push time by the interval time is executed.

5. The method according to any one of claims 1 to 4, characterized in that If the first system is capable of pushing the generated messages to the second system in real time, the method further includes: if it is monitored that the first system generates messages that need to be pushed to the second system, detecting whether the number of messages generated by the first system at the same time that need to be pushed to the second system reaches a second number threshold; if not, for each message, setting the corresponding generation time of the message as the corresponding push time of the message, so that the message is pushed to the second system in real time; if reached, assigning a corresponding delay time to each message, wherein the delay time of at least two messages is different; for each message, setting the time after the generation time of the message and separated from the generation time by a corresponding delay time as the corresponding push time of the message; and / or, The message generated by the first system has a corresponding business, each business has a corresponding priority, and the message corresponding to the business with a priority higher than the preset priority needs to update the push time using the preset time corresponding to the priority when the push fails. Then, the method also includes: if the push of the target message fails, determine the business corresponding to the target message; determine whether the priority of the business is higher than the preset priority; if higher, update the push time of the target message to a time after the push time and separated from the push time by the preset time corresponding to the priority of the business; if not higher, execute the step of determining the cumulative number of push failures and the cause of the push failure of the target message; and / or, The method further includes: if the push of the target message fails, detecting whether the number of consecutive push failures of the first system reaches a third number threshold; if not, executing the step of determining the cumulative number of push failures of the target message and the reason for the push failure; if reached, stopping pushing messages to the second system and issuing a prompt to stop pushing messages to the second system; and / or, The method further includes: determining whether the cumulative number of push failures reaches a fourth number threshold corresponding to the target message; if so, issuing a push failure notification for the target message; if not, executing the step of determining the interval duration corresponding to the target message based on the cumulative number of push failures and the push failure reason; and / or, The method further includes: if the target message is pushed successfully, removing the target message from the first system, or marking that the target message has been successfully pushed to the second system; and / or, The message is generated after the first system processes the task initiated by the second system, and is a notification message used to inform the second system of the processing result of the task by the first system.

6. A message push device, characterized in that: Applied to a first system, the first system generates a message that needs to be pushed to a second system, each message of the first system has a corresponding push time, and the device includes: A push module, configured to push a target message to the second system when there is a target message in the first system whose push time is the current time; A first determination module is used to determine the cumulative number of push failures and the push failure reason of the target message if the push of the target message fails, wherein the push failure reason includes a second system failure; A second determination module is used to determine the interval duration corresponding to the target message based on the accumulated number of push failures and the push failure reasons; An updating module, used for updating the push time of the target message to a time after the push time and separated from the push time by the interval time; The second determination module is specifically used to determine the fault type of the second system if the push failure reason is a second system fault; determine whether the cumulative number of push failures is not less than a second number threshold; if not, determine the longest empirical time required to eliminate the fault of the fault type occurring in the second system as the interval time corresponding to the target message; if less than, determine the shortest empirical time required to eliminate the fault of the fault type occurring in the second system as the interval time corresponding to the target message; or, Each fault category has a corresponding second preset corresponding relationship, the second preset corresponding relationship is a corresponding relationship between multiple cumulative push failure times and multiple second interval durations, and the second interval duration is positively correlated with the cumulative push failure times. Then, the second determination module is specifically used to determine the fault category of the second system if the push failure cause is a second system fault; search for the second interval duration corresponding to the cumulative push failure times in the second preset corresponding relationship corresponding to the fault category; and determine the found second interval duration as the interval duration corresponding to the target message; or, Each fault category has a corresponding second interval duration determination interface, and the second determination module is specifically used to determine the fault category of the second system if the push failure reason is a second system failure; call the second push time setting interface corresponding to the fault category, adopt the interval duration determination logic applicable to the fault category, and determine the interval duration corresponding to the target message based on the push time of the target message and the cumulative number of push failures; Wherein, each fault category has a corresponding a priori time period, and the second system has a fault of the corresponding fault category in the a priori time period, then, the second determination module performs a process of determining the fault category of the second system including: determining the a priori time period matched by the push time of the target message; determining the fault category corresponding to the successfully matched a priori time period as the fault category of the second system; Or, when a fault occurs in the second system, the fault type is reported to the target management system. Then, the second determination module executes a process for determining the fault type of the second system, including: determining the fault type reported by the second system in the target management system as the fault type of the second system.

7. A computer-readable storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the message pushing method described in any one of claims 1 to 5.

8. An electronic device, characterized in that: The electronic device comprises: Memory, used to store programs; A processor, coupled to the memory, is used to run the program to execute the message pushing method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Message pushing device and method

    CN105491115A

  • Network registration processing method and module

    CN106487883A