System message flow control method, device and equipment

By introducing message caching and circuit breaking mechanisms into the bank's system message center, the backlog problem in the message center under high concurrency was solved, achieving efficient resource utilization and stable system operation, and avoiding the maintenance difficulties brought about by hardware performance improvements.

CN116302593BActive Publication Date: 2025-12-16CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310117974.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-30
Publication Date
2025-12-16
Estimated Expiration
2043-01-30

AI Technical Summary

Technical Problem

When faced with a sudden increase in the concurrency of a single type of message, the existing technology is difficult to effectively solve the problem of upstream message backlog caused by untimely message processing in the bank's system message center. Furthermore, multi-threaded processing or improving hardware performance may lead to resource waste or increased maintenance difficulty.

Method used

By introducing a message caching mechanism in the message center, low-importance message types are matched and stored in the database, periodically forwarded to downstream systems, and a circuit breaker mechanism is implemented when downstream system interfaces become congested. The interface and message are processed according to different strategies to avoid resource waste and excessive system load.

Benefits of technology

This effectively avoids message backlog in upstream systems, optimizes resource utilization, reduces system maintenance difficulty, and improves processing efficiency and reduces congestion in downstream systems through dynamic management strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302593B_ABST
    Figure CN116302593B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a system message flow limiting method, device and equipment, applied to the technical field of task scheduling, the method comprising: matching a first message type of a to-be-processed message in an upstream system with a plurality of second message types preset; determining that the to-be-processed message is stored in a database established in advance when matching, and forwarding the to-be-processed message in the database to a downstream system according to a preset message forwarding condition; determining that a downstream system interface is called by the to-be-processed message, and the calling condition satisfies a preset message fuse condition, and implementing a first preset strategy on the downstream system interface, and implementing a second preset strategy on the to-be-processed message. Through the above method, the to-be-processed message of the upstream system can be quickly processed and the message type can be managed in a targeted manner, and the dynamic management strategy can further improve the resource utilization rate; the message fuse mechanism is added, which can effectively avoid the situation of downstream system congestion.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of task scheduling, in particular to a system message flow limiting method, device and equipment. BACKGROUND

[0002] The current bank system message center undertakes various messages published by multiple systems, and the message types are various and the quantity is large. Due to the needs of specific business scenarios, the concurrent quantity of a single type of message often suddenly increases in the production environment, and the message processing is not timely, which can cause the upstream message backlog and high load. In order to solve the problem of upstream system backlog of the message center, the current common solution is to improve the processing capacity of the message center and enable multiple threads to process the messages; or to improve the processing rate by improving the hardware performance of the system. Since only one thread currently processes one type of message, the multi-thread processing method still cannot essentially solve the problem caused by the surge of message quantity, which can cause the system to run normally at ordinary times, but when the quantity of a certain type of message surges, the backlog is caused due to the untimely processing, and the start of multiple threads can cause waste of computing resources; and the method of improving the processing capacity of the message center by improving the hardware performance can increase the maintenance difficulty of the message center system. SUMMARY

[0003] The embodiments of the present application provide a system message flow limiting method, device and equipment, which solve the problem of upstream system message backlog of the message center without increasing the maintenance difficulty of the message center system.

[0004] In a first aspect, the embodiments of the present application provide a system message flow limiting method, which comprises:

[0005] Matching a first message type of a to-be-processed message in an upstream system with a plurality of second message types, the quantity of the message corresponding to the second message type under a preset scenario being greater than a preset quantity and the importance being less than a preset degree;

[0006] When matching, storing the to-be-processed message in a database established in advance, and forwarding the to-be-processed message in the database to a downstream system related to the upstream system according to a preset message forwarding condition.

[0007] In the above embodiments, the message caching mechanism is added, for a certain type of message whose message quantity is greater than a preset quantity and the importance is less than a preset degree under a preset scenario, the message corresponding to the type is stored in a database established in advance, and when the message forwarding condition is met, the to-be-processed message in the database is forwarded to a downstream system related to the upstream system, which achieves the effect of avoiding the message backlog of the upstream system, and the performance of the message center hardware is not improved, so the maintenance difficulty of the message center system is not increased.

[0008] In a possible implementation, the forwarding the to-be-processed message in the database to the downstream system related to the upstream system according to the preset message forwarding condition comprises:

[0009] determining whether there is a to-be-processed message in the database according to a preset period, and if so, forwarding part or all of the to-be-processed messages stored in the database to the downstream system related to the upstream system.

[0010] In the above embodiment, the to-be-processed message stored in the database is not stored all the time, but the message in the database is periodically queried, and if there is a to-be-processed message in the database, part or all of the to-be-processed messages stored in the database are forwarded to the downstream system related to the upstream system, so as to ensure timely processing of the to-be-processed message and prevent accumulation of the to-be-processed message in the upstream system.

[0011] In a possible implementation, after the forwarding the to-be-processed message in the database to the downstream system related to the upstream system, the method further comprises:

[0012] determining that the calling condition of the downstream system interface by the to-be-processed message meets a preset message fuse condition, and implementing a first preset strategy on the downstream system interface and a second preset strategy on the to-be-processed message.

[0013] In the above embodiment, in order to avoid congestion of the downstream system, a message fuse mechanism is set in the downstream system, and when the message fuse condition is triggered, corresponding strategies are respectively implemented on the downstream system interface and the to-be-processed message.

[0014] In a possible implementation, the implementing the first preset strategy on the downstream system interface comprises:

[0015] setting the downstream system interface to be invocable by the to-be-processed message within a preset first time period.

[0016] In the above embodiment, when it is determined that the message fuse condition is met, the to-be-processed message is prohibited from invoking the downstream system interface, that is, the downstream system interface does not respond to the to-be-processed message, which can ensure normal processing of other messages and further prevent accumulation of messages at the downstream system interface.

[0017] In a possible implementation, the implementing the second preset strategy on the to-be-processed message comprises:

[0018] if the importance of the to-be-processed message belongs to a first degree, the to-be-processed message is stored in the database again, and a message supporting invocation of the downstream system interface by the to-be-processed message is waited for sending by the downstream system;

[0019] If the importance of the to-be-processed message belongs to a second degree, the to-be-processed message is discarded, and the first degree is greater than the second degree.

[0020] In the above embodiment, the to-be-processed message which is prohibited from calling the downstream system interface is processed according to the corresponding importance, and different processing is performed. On the basis of avoiding the jamming of the downstream system, the timely processing of important messages is ensured.

[0021] In a possible implementation, the determination that the calling condition of the downstream system interface by the to-be-processed message satisfies the preset message fuse condition comprises:

[0022] If the number of times of calling the downstream system interface is greater than a first preset number of times within a second preset time period, and the ratio between the number of times of calling the downstream system interface abnormally and the number of times of calling the downstream system interface is greater than a first preset ratio, it is determined that the calling condition of the downstream system interface by the to-be-processed message satisfies the preset message fuse condition; or

[0023] If the number of times of calling the downstream system interface is greater than a second preset number of times within a third preset time period, and the ratio between the number of times of calling the downstream system interface and the number of times of calling the downstream system interface is greater than a second preset ratio, it is determined that the calling condition of the downstream system interface by the to-be-processed message satisfies the preset message fuse condition.

[0024] In the above embodiment, two message fuse conditions are set, the calling condition of the to-be-processed message to the downstream system interface is more finely distinguished, the fuse can be performed for many aspects, and the problem of jamming of the downstream system is more effectively solved than the current mechanism of "not retransmitting after timeout".

[0025] In a possible implementation, after the first preset strategy is performed on the downstream system interface, the method further comprises:

[0026] If the calling of the downstream system interface by any one of the to-be-processed messages forwarded to the downstream system is abnormal, or the time of responding to the calling of the downstream system interface by the any one of the to-be-processed messages is greater than a fourth preset time period, the downstream system interface is continuously set to be inaccessible.

[0027] In the above embodiment, after the message fusing ends, in order to determine whether the downstream system still exists the message jamming situation, the calling situation of the downstream system interface needs to be analyzed, if the calling of the downstream system interface by the to-be-processed message does not appear abnormal, and the time of the calling of the downstream system interface by the to-be-processed message is not greater than the fourth preset time period, it is indicated that the downstream system does not exist the jamming situation, the downstream system interface restores the normal calling state, otherwise the message fusing will be continued.

[0028] In a second aspect, the embodiments of the present application provide a system message flow limiting device, the device comprises:

[0029] The matching module is configured to match a first message type of a to-be-processed message in an upstream system with a plurality of second message types, wherein the number of messages corresponding to the second message types in a preset scenario is greater than a preset number, and the importance degree is less than a preset degree.

[0030] The forwarding module is configured to store the to-be-processed message in a database established in advance when the matching is performed, and forward the to-be-processed message in the database to a downstream system related to the upstream system according to a preset message forwarding condition.

[0031] In a third aspect, the embodiments of the present application provide a system message flow limiting device, the device comprises:

[0032] at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method in the first aspect.

[0033] In a fourth aspect, the embodiments of the present application provide a computer program product for enabling a computer to perform the method in the first aspect.

[0034] In a fifth aspect, the embodiments of the present application provide a computer storage medium storing a computer program, and the computer program is used to enable a computer to perform the method in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 A system message flow limiting method according to an example of the embodiments of the present application;

[0036] Figure 2 A system message flow limiting method flow process according to an example of the embodiments of the present application;

[0037] Figure 3This is a schematic diagram illustrating a processing flow of a message to be processed in an upstream system, as exemplified by an exemplary embodiment of the present invention.

[0038] Figure 4 This is a schematic diagram illustrating a processing flow of a message to be processed in a downstream system, as exemplified by an exemplary embodiment of the present invention.

[0039] Figure 5 This is a schematic diagram of a system message rate limiting device according to an exemplary embodiment of the present invention;

[0040] Figure 6 This is a schematic diagram of another system message rate limiting device according to an exemplary embodiment of the present invention;

[0041] Figure 7 This is a schematic diagram of a system message rate limiting device as an example of an exemplary embodiment of the present invention. Detailed Implementation

[0042] The technical solutions in the embodiments of this application will now be described clearly and in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0043] The acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.

[0044] like Figure 1 The diagram illustrates an application scenario for a system message rate limiting method provided in this application. This scenario includes: a message center 101, a database 102, at least one upstream system (as shown in the diagram, upstream system 103_1, upstream system 103_2, and upstream system 103_N), and at least one downstream system (as shown in the diagram, upstream system 104_1, upstream system 104_2, and upstream system 104_N). The message center 101 is used to retrieve pending messages from upstream systems and forward them to downstream systems related to those upstream systems. Upstream systems are connected to the message center and are used to send pending messages to the message center. Downstream systems are connected to the message center and are used to receive pending messages sent by the message center. The database 102 is used to store pending messages that meet storage conditions.

[0045] Based on such Figure 1In the application scenario shown, taking a bank system as an example, the message center carries various messages published by multiple systems, and in some specific scenarios, the number of some types of messages will increase sharply, for example, when funds need to be settled at the end of the month, the number of messages notifying fund changes will increase sharply. In order to avoid the situation of message backlog of the upstream system due to the increase of messages, the embodiment of the present application provides a system message flow limiting method applied to a message center, as shown in the figure, the method comprises the following steps: Figure 2

[0046] S201: Matching the first message type of the to-be-processed message in the upstream system with a plurality of preset second message types.

[0047] In a possible implementation, a "message cache parameter table" can be preset, in which a plurality of preset second message types are stored. The number of messages corresponding to the second message type in a preset scenario is greater than a preset number, and the importance is less than a preset degree. For example, when funds need to be settled at the end of the month, the number of messages notifying fund changes is greater than the preset number, and the importance is less than the preset degree, that is, the timeliness requirement for this type of message is not very high, so other types of messages can be processed first. In the embodiment of the present application, the storage form of each second message type is not limited.

[0048] The preset number and the preset degree can be set according to the actual production and processing of the message, for example, at the end of the month, there are two types of to-be-processed messages, and at the beginning of the month, there is one type of message, so the preset number set at the end of the month can be slightly smaller than the preset number set in the middle of the month, that is, in different scenarios, the standard for judging whether a certain type of to-be-processed message is a message of the increase type and whether a certain type of to-be-processed message is important can be set to be different.

[0049] In the embodiment of the present application, the second message type in the "message cache parameter table" can be changed at any time, for example, at the middle of the month (15), the message notifying fund changes does not belong to the second message type when funds are settled, and at the end of the month (30), the message notifying fund changes belongs to the second message type when funds are settled, so the second message type in the "message cache parameter table" can be different at different times, thereby realizing dynamic management of the "message cache parameter table". In addition, when the to-be-processed message arrives at the message center, the message center first judges the first message type of the to-be-processed message, and then queries the matching second message type in the "message cache parameter table".

[0050] S202: Storing the to-be-processed message in the database established in advance when matching, and forwarding the to-be-processed message in the database to a downstream system related to the upstream system according to a preset message forwarding condition.​

[0051] The embodiment of the present application establishes a database in the message center for storing the to-be-processed messages corresponding to the second message type. Based on the message caching mechanism provided by the embodiment of the present application, different types of to-be-processed messages are processed in different ways: for the messages belonging to the second message type, the message center performs the following processes on the messages: 1. pulling, i.e. the message center pulls the to-be-processed messages from the upstream system; 2. storing, i.e. after determining that the to-be-processed message belongs to the second message type, the to-be-processed message is stored in the database established in advance; and 3. forwarding, i.e. according to the preset message forwarding condition, the to-be-processed message in the database is forwarded to the flow of the downstream system related to the upstream system; for the messages not belonging to the second message type, the message center performs the processes of 1. pulling and 2. forwarding, thereby effectively solving the situation of message backlog in the upstream system.

[0052] In a possible implementation, forwarding the to-be-processed message in the database to the downstream system related to the upstream system according to the preset message forwarding condition comprises:

[0053] According to the preset period, it is determined whether there is a to-be-processed message in the database, and if there is, part or all of the to-be-processed messages stored in the database are forwarded to the downstream system related to the upstream system.

[0054] Periodically, it is determined whether there is a to-be-processed message in the database, and if there is a to-be-processed message in the database and the number of to-be-processed messages in the upstream system is greater than the preset number of messages, part of the to-be-processed messages in the database are forwarded to the downstream system related to the upstream system; if the number of to-be-processed messages in the upstream system does not exceed the preset number of messages, all of the to-be-processed messages stored in the database are forwarded to the downstream system related to the upstream system, or part of the to-be-processed messages in the database are forwarded to the downstream system related to the upstream system; if there is no to-be-processed message in the database, no processing is needed. Through the above implementation, the timely processing of to-be-processed messages is ensured, and the accumulation of to-be-processed messages in the upstream system is also ensured. The preset period can be set according to the actual processing of various messages (for example, 1 hour, 1 day), which is not limited here.

[0055] Based on the processing mode of the message center for the pending messages (pulling the pending messages of the upstream system and forwarding the pending messages to the related downstream system), when the upstream system has a message surge, the downstream system interface is also prone to congestion. In the prior art, in order to solve the problem of downstream system congestion, the commonly used solution is the "timeout non-retransmission" mechanism, that is, when the pending message fails to call the downstream interface, the downstream interface is not re-called, so as to reduce the load pressure of the downstream system. However, this processing method can solve the problem of pushing a single message and can reduce the load of the downstream system to a certain extent, but when the number of pending messages of the upstream system is large, the pending messages will still call the downstream system interface, and the pressure of the downstream system cannot be essentially relieved.

[0056] To solve the above problems, the embodiment of the present application determines that the calling condition of the downstream system interface by the pending message meets the preset message fuse condition, and the first preset strategy is implemented for the downstream system interface, and the second preset strategy is implemented for the pending message.

[0057] Among them, the preset message fuse condition includes the following two kinds:

[0058] (1) If the number of calls of the downstream system interface is greater than the first preset number within the second preset time period, and the ratio between the number of abnormal calls of the downstream system interface and the number of calls of the downstream system interface is greater than the first preset ratio, it is determined that the calling condition of the downstream system interface by the pending message meets the preset message fuse condition.

[0059] Taking the downstream system of a bank as an example, if the number of calls of the downstream system interface is greater than 5 times within 20 seconds, and the ratio between the number of abnormal calls of the downstream system interface and the number of calls of the downstream system interface is greater than 20%, it is determined that the calling condition of the downstream system interface by the pending message meets the preset message fuse condition. Among them, the second preset time period, the first preset number and the first preset ratio can be set according to the specific application scene, which is not limited here.

[0060] (2) If the number of calls of the downstream system interface is greater than the second preset number within the third preset time period, and the ratio between the number of times that the downstream system interface responds to the call of the pending message and the number of calls of the downstream system interface is greater than the second preset ratio, it is determined that the calling condition of the downstream system interface by the pending message meets the preset message fuse condition.

[0061] For example, if the number of invocations of the downstream system interface is greater than 5 within 20 seconds, and the ratio between the number of times that the downstream system interface takes more than 1 second to respond to the invocation of the to-be-processed message and the number of invocations of the downstream system interface is greater than 30%, it is determined that the invocation of the downstream system interface by the to-be-processed message meets the preset message fuse condition.

[0062] The third preset time period, the second preset number, and the second preset ratio can be set according to specific application scenarios. Moreover, the third preset time period and the second preset time period can be set to be the same or different, the second preset number and the first preset number can be set to be the same or different, and the second preset ratio and the first preset ratio can be set to be the same or different, which are not limited here.

[0063] When it is determined that the invocation of the downstream system interface by the to-be-processed message meets the preset message fuse condition, different strategies are respectively implemented for the downstream system interface and the to-be-processed message.

[0064] (1) The first preset strategy is implemented for the downstream system interface.

[0065] The downstream system interface is set to be unavailable for invocation by the to-be-processed message within a preset first time period.

[0066] When it is determined that the invocation of the downstream system interface by the to-be-processed message meets the preset message fuse condition, the processing resource allocated to the to-be-processed message is degraded, which can include processing time consumption and the like, which are not limited here. That is, when the processing resource allocated to the to-be-processed message is degraded, the to-be-processed message does not send a request for interface invocation to the downstream system interface, that is, the downstream system interface is unavailable for invocation by the to-be-processed message.

[0067] In addition, a time window, that is, a first preset time period, is set, within which the downstream system interface is unavailable for invocation by the to-be-processed message. The length of the time window can be set according to the actual processing of the actual message, which is not limited here. After the time window ends, the downstream system interface enters a “probe recovery” state. If the invocation of the downstream system interface by any to-be-processed message forwarded to the downstream system is abnormal, or the downstream system interface takes more than a fourth preset time period to respond to the invocation of the to-be-processed message, the downstream system interface is continuously set to be unavailable for invocation by the to-be-processed message. After the downstream system interface enters the “probe recovery” state, the invocation of the downstream system interface by the first to-be-processed message forwarded to the downstream system can be judged, or the invocation of the downstream system interface by the Nth to-be-processed message can be judged, which is not limited here.

[0068] For example, the fourth preset time period can be 1 second for a system of a bank, and can be set as other for a system in other scenarios. The specific application scenario and the specific value of the fourth preset time period are not limited here. By further judging the situation of the downstream system interface being called, it is determined whether to continue the message fusing, which can more effectively avoid the situation of the downstream system being blocked.

[0069] (2) The second preset policy is implemented on the to-be-processed message.

[0070] If the importance of the to-be-processed message belongs to the first degree, the to-be-processed message is stored in the database again, and a message supporting the to-be-processed message to call the downstream system interface is sent by the downstream system;

[0071] If the importance of the to-be-processed message belongs to the second degree, the to-be-processed message is discarded.

[0072] After determining that the downstream system interface is called by the to-be-processed message meets the preset message fusing condition, the importance of the to-be-processed message is determined. If the to-be-processed message is important, the to-be-processed message is stored in the database. If there is no blocking situation in the downstream system, a message supporting the to-be-processed message to call the downstream system interface is sent to the message center. It should be noted that the time from the to-be-processed message being stored in the database again to the message supporting the to-be-processed message to call the downstream system interface being sent by the downstream system is much less than the preset period in S202. For example, the time from the to-be-processed message being stored in the database again to the message supporting the to-be-processed message to call the downstream system interface being sent by the downstream system is 20 seconds, and the preset period is 1 hour. Therefore, the two will not conflict in time, that is, the to-be-processed message stored in the database will be forwarded to the downstream system as soon as possible, and will not wait until the time of querying the database whether there is a to-be-processed message according to the preset period. In addition, if the to-be-processed message is not important, it can be discarded directly.

[0073] The following describes the processing flow of the to-be-processed message of the upstream system. Figure 3 The processing flow of the to-be-processed message of the upstream system is described.

[0074] S301: The message center acquires the to-be-processed message of the upstream system;

[0075] S302: The message center determines whether to store the obtained to-be-processed message into the pre-established database according to the type of the obtained to-be-processed message, and if not, S303 is executed, otherwise S305 is executed; wherein the specific process of determining whether to store the to-be-processed message into the pre-established database according to the type of the to-be-processed message is as described in the implementation manner of S201 above, and will not be repeated here;

[0076] S303: The message center parses the to-be-processed message and matches the processor; wherein parsing the to-be-processed message is to convert the to-be-processed message into a message format that can be processed by the downstream system, and matching the processor is to allocate processing resources to the to-be-processed message in a load balancing manner;

[0077] S304: The message center forwards the to-be-processed message to the downstream system related to the upstream system;

[0078] S305: The message center stores the to-be-processed message into the pre-established database;

[0079] S306: The message center queries the database according to a preset period;

[0080] S307: The message center determines whether there is a to-be-processed message in the database, and if yes, S303-S304 are executed, otherwise the process ends; wherein the specific process of querying the database and determining is as described in the implementation manner of S202 above, and will not be repeated here.

[0081] The following describes the process of the to-be-processed message of the downstream system. Figure 4

[0082] S401: After the step of S304 above, the message center determines to forward the to-be-processed message to the downstream system related to the upstream system;

[0083] S402: The message center determines whether the calling condition of the downstream system interface by the to-be-processed message meets the preset message fuse condition, and if yes, S403 is executed, otherwise S404 is executed; wherein the specific determination process is as described above, and will not be repeated here.

[0084] S403: The message center respectively implements the corresponding preset strategy on the downstream system interface and the to-be-processed message; wherein the specific implementation manner is as described above, and will not be repeated here.

[0085] S404: The message center instructs the to-be-processed message to call the downstream system interface.

[0086] ​The message dynamic caching mechanism designed in the embodiments of the application can quickly process the to-be-processed messages of the upstream system, and manage the messages of the second message type in a targeted manner. The dynamic management strategy can further improve the resource utilization rate and will not cause a large loss of message processing rate. In addition, the message fuse mechanism is added to reduce abnormal calls in the case of downstream system congestion, and a set of fuse configurations suitable for the message center of the bank system is given through test verification. Compared with the timeout and no resend scheme, the system load problem in the case of downstream system congestion is more effectively solved, and the essence of the problem is closer.

[0087] Based on the same inventive concept, the embodiments of the application also provide a system message flow limiting device 500, as shown in Figure 5 The device comprises:

[0088] A matching module 501 is configured to match a first message type of a to-be-processed message in an upstream system with a plurality of preset second message types, wherein the number of messages corresponding to the second message types in a preset scene is greater than a preset number, and the importance degree is less than a preset degree.

[0089] A forwarding module 502 is configured to store the to-be-processed message in a database established in advance when matching, and forward the to-be-processed message in the database to a downstream system related to the upstream system according to a preset message forwarding condition.

[0090] In a possible implementation, the forwarding module 502 is configured to forward the to-be-processed message in the database to the downstream system related to the upstream system according to the preset message forwarding condition, comprising:

[0091] Judging whether there is a to-be-processed message in the database according to a preset period, and if there is, forwarding part or all of the to-be-processed messages stored in the database to the downstream system related to the upstream system.

[0092] In a possible implementation, as shown in Figure 6 The device further comprises a fuse module 503 configured to, after forwarding the to-be-processed message in the database to the downstream system related to the upstream system, further comprising:

[0093] When the calling condition of the downstream system interface by the to-be-processed message meets a preset message fuse condition, implementing a first preset strategy on the downstream system interface and a second preset strategy on the to-be-processed message.

[0094] In a possible implementation, the fuse module 503 is configured to implement the first preset strategy on the downstream system interface, comprising:

[0095] The downstream system interface is set to be unavailable for being called by the to-be-processed message within a preset first time period.

[0096] In a possible implementation, the fuse module 503 is configured to implement a second preset policy on the to-be-processed message, including:

[0097] If the importance of the to-be-processed message belongs to a first degree, the to-be-processed message is stored into the database again, and a message sent by the downstream system to support the to-be-processed message to call the downstream system interface is waited for.

[0098] If the importance of the to-be-processed message belongs to a second degree, the to-be-processed message is discarded, and the first degree is greater than the second degree.

[0099] In a possible implementation, the fuse module 503 is configured to determine whether a calling condition of the downstream system interface by the to-be-processed message meets a preset message fuse condition, including:

[0100] If, within a second preset time period, a calling frequency of the downstream system interface is greater than a first preset frequency, and a ratio between an abnormal calling frequency of the downstream system interface and the calling frequency of the downstream system interface is greater than a first preset ratio, it is determined that the calling condition of the downstream system interface by the to-be-processed message meets the preset message fuse condition; or

[0101] If, within a third preset time period, the calling frequency of the downstream system interface is greater than a second preset frequency, and a ratio between a time for the downstream system interface to respond to the to-be-processed message and a ratio between a frequency of the downstream system interface being called and the calling frequency of the downstream system interface is greater than a second preset ratio, it is determined that the calling condition of the downstream system interface by the to-be-processed message meets the preset message fuse condition.

[0102] In a possible implementation, after the fuse module 503 implements the first preset policy on the downstream system interface, the fuse module 503 further includes:

[0103] If any to-be-processed message forwarded to the downstream system calls the downstream system interface abnormally, or a time for the downstream system interface to respond to the any to-be-processed message is greater than a fourth preset time period, the downstream system interface is continuously set to be unavailable for being called by the to-be-processed message.

[0104] Based on the same inventive concept, the embodiments of the present application also provide a system message flow control device, which comprises: at least one processor; and a memory connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the system message flow control method in any of the above embodiments.

[0105] The electronic device 70 according to this embodiment of the present application will be described below with reference to Figure 7 FIG. 1. Figure 7 The electronic device 70 is merely an example and should not limit the functions and use range of the embodiments of the present application.

[0106] As shown in Figure 7 The electronic device 70 is in the form of a general electronic device. The components of the electronic device 70 can include, but are not limited to: the at least one processor 71, the at least one memory 72, and the bus 73 connecting different system components, including the memory 72 and the processor 71.

[0107] The processor 71 is configured to read and execute the instructions in the memory 72, so as to enable the at least one processor to perform the system message flow control method provided by the above embodiments.

[0108] The bus 73 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor or a local bus using any of a variety of bus structures.

[0109] The memory 72 can include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 721 and / or a cache memory 722, and can further include a read-only memory (ROM) 723.

[0110] The memory 72 can also include a program / utility 725 having a set of program modules 724, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof can include implementation of a network environment.

[0111] The electronic device 70 can also communicate with one or more external devices 74 such as a keyboard or a pointing device, etc., which can be used to interact with the electronic device 70, and / or one or more devices that enable a user to interact with the electronic device 70 and / or any devices (e.g., a router, a modem, a peer device etc.) that enable the electronic device 70 to communicate with one or more other electronic devices. Such communication can occur via Input / Output (I / O) interface 75. Still yet, the electronic device 70 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter 76. As depicted, the network adapter 76 communicates with the other components of the electronic device 70 via the bus 73. It should be appreciated that the network adapter 76 and / or the other hardware and / or software components depicted in FIG. 1 can be utilized in conjunction with the other hardware and / or software modules of the electronic device 70, as are generally known in the art.

[0112] In some possible embodiments, various aspects of the method for limiting system message flow provided in the present application can also be implemented as a program product, including a program code for causing a computer device to perform the steps of the method for limiting system message flow according to various exemplary embodiments of the present application described above in the specification when the program product is run on the computer device.

[0113] In addition, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is used to make a computer execute the method described in any one of the above embodiments.

[0114] These computer program instructions can be stored in a computer readable memory which can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction means, which realize the functions specified in the flow Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks or multiple blocks.

[0115] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in the flow Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks or multiple blocks.

[0116] While the preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, it is intended that such additions and modifications be included within the scope of the application. It is the following claims, including any amendments thereto, which define the scope of the application.

[0117] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A system message flow control method, characterized by, The method applied to a message center comprises: matching a first message type of a to-be-processed message in an upstream system with a plurality of second message types in a preset message cache parameter table, the second message types corresponding to messages whose quantity under a preset scenario is greater than a preset quantity and whose importance degree is less than a preset degree, the second message types in the message cache parameter table being different at different times; determining that the to-be-processed message is stored in a pre-established database when matching, periodically querying whether there is a to-be-processed message in the pre-established database, if there is a to-be-processed message in the database and the to-be-processed message of the current upstream system is greater than a preset message quantity, forwarding a first quantity of to-be-processed messages in the database to a downstream system related to the upstream system, if the to-be-processed message of the current upstream system does not exceed the preset message quantity, forwarding a second quantity of to-be-processed messages stored in the database to the downstream system related to the upstream system, the first quantity being less than the second quantity; determining that the downstream system interface meets a preset message fuse condition when the calling condition of the downstream system interface by the to-be-processed message is met, if the importance degree of the to-be-processed message belongs to a first degree, re-storing the to-be-processed message in the database and waiting for the downstream system to send a message supporting the to-be-processed message to call the downstream system interface, if the importance degree of the to-be-processed message belongs to a second degree, discarding the to-be-processed message, the first degree being greater than the second degree; the message center is used to pull the to-be-processed message of the upstream system and forward it to the downstream system related to the upstream system.

2. The method of claim 1, wherein, after the to-be-processed message in the database is forwarded to the downstream system related to the upstream system, the method further comprises: determining that the downstream system interface meets a preset message fuse condition when the calling condition of the downstream system interface by the to-be-processed message is met, implementing a first preset strategy on the downstream system interface.

3. The method of claim 2, wherein, implementing the first preset strategy on the downstream system interface comprises: setting the downstream system interface to be invocable by the to-be-processed message within a preset first time period.

4. The method of claim 3, wherein, determining that the downstream system interface meets a preset message fuse condition comprises: if the calling frequency of the downstream system interface is greater than a first preset frequency and the ratio between the calling exception frequency of the downstream system interface and the calling frequency of the downstream system interface is greater than a first preset ratio within a second preset time period, it is determined that the calling condition of the downstream system interface by the to-be-processed message meets the preset message fuse condition; or if the calling frequency of the downstream system interface is greater than a second preset frequency and the ratio between the frequency of the time for the downstream system interface to respond to the to-be-processed message call and the calling frequency of the downstream system interface is greater than a second preset ratio within a third preset time period, it is determined that the calling condition of the downstream system interface by the to-be-processed message meets the preset message fuse condition.

5. The method according to claim 3 or 4, characterized in that, after implementing the first preset strategy on the downstream system interface, the method further comprises: If any one of the pending messages forwarded to the downstream system calls the downstream system interface abnormally, or the time for the downstream system interface to respond to the call of the any one of the pending messages is greater than a fourth preset time period, the downstream system interface is continuously set to be invocable by the pending messages.

6. A system message flow control apparatus, characterized by comprising: The device is applied to a message center, and the device comprises: A matching module is configured to match a first message type of a pending message in an upstream system with a plurality of second message types in a preset message cache parameter table, wherein the number of messages corresponding to the second message types in a preset scenario is greater than a preset number, and the importance of the messages is less than a preset degree, and the second message types in the message cache parameter table at different times are different. A forwarding module is configured to store the pending message in a pre-established database upon matching, and periodically query whether there is a pending message in the pre-established database, and if there is a pending message in the database, and the number of pending messages in the current upstream system is greater than a preset number of messages, forward a first number of pending messages in the database to a downstream system related to the upstream system, and if the number of pending messages in the current upstream system does not exceed the preset number of messages, forward a second number of pending messages stored in the database to the downstream system related to the upstream system, wherein the first number is less than the second number. A fusing module is configured to, if the invocation of the downstream system interface by the pending message meets a preset message fusing condition, if the importance of the pending message belongs to a first degree, re-store the pending message in the database, and wait for the downstream system to send a message supporting the invocation of the downstream system interface by the pending message, and if the importance of the pending message belongs to a second degree, discard the pending message, wherein the first degree is greater than the second degree. The message center is configured to pull the pending messages of the upstream system and forward the pending messages to the downstream system related to the upstream system.

7. A system message flow control device, characterized by, The device comprises: at least one processor; and a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

8. A computer program product, characterised in that, The computer program product is configured to enable a computer to perform the method of any one of claims 1-5.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program configured to enable a computer to perform the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for intelligently fusing server interface, electronic equipment and storage medium

    CN114285844A

  • Message pushing method and device based on double queues, equipment and storage medium

    CN114885018A

  • Flow control method, flow control device and computer readable storage medium

    CN115580580A