Message distribution method and device based on new and old system switching, and electronic equipment

By providing a message distribution method in the switching between old and new systems, the problem of lack of universality in the switching between old and new systems in the prior art is solved, and unified processing is realized in multiple application scenarios, which significantly improves development efficiency.

CN119988052APending Publication Date: 2025-05-13CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411802641.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The switching schemes of new and old systems in the existing technology lack universality, resulting in the need to repeatedly develop new and old systems switching systems in different application scenarios, resulting in low development efficiency.

Method used

A message distribution method based on the switching between old and new systems is provided. By receiving the transaction messages to be distributed, the current application scenario is determined, and the switching status of the new and old systems is obtained, the corresponding message distribution strategy is executed, and the transaction messages are forwarded to the old system or the link of the new system.

Benefits of technology

It has achieved unified handling of the switching between old and new systems in multiple application scenarios, avoiding duplicate development and significantly improving development efficiency. For example, when the bank core system is upgraded, the development cycle of basic functions has dropped from at least 1 month to about 2 days.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988052A_ABST
    Figure CN119988052A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software development, in particular to a message distribution method and device based on new and old system switching and electronic equipment. According to the specific implementation scheme, a to-be-distributed transaction message is received; determining a current application scene according to the transaction message, and obtaining a switching state of a new system and an old system in the current application scene; executing a corresponding message distribution strategy according to the switching state of the new system and the old system; wherein the message distribution strategy comprises forwarding the transaction message to a first link corresponding to the old system and / or a second link corresponding to the new system. According to the method and the device, new and old systems of a plurality of application scenes are switched and integrated into the same system, and a set of independent flow distribution system does not need to be repeatedly developed for each application scene, so that the development period is shortened, and the development efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of software development, and in particular to a message distribution method, device, and electronic device based on switching between new and old systems. Background Art

[0002] As the volume of business increases and the types of business become more diverse, the performance requirements for the message processing system that supports the business will become higher and higher. In order to improve the performance of the system, a new system is usually built to take over the business of the old system, which requires switching the business from the old system to the new system.

[0003] The existing solutions for switching between the old and new systems are mainly customized for specific scenarios and are not universal enough, that is, they can only be applied to the switching between the old and new systems in a certain application scenario. However, there are many application scenarios for the system, especially in the financial industry. For example, the interface communication protocol, single-duplex mode, message format, and existence time of the abnormal mechanism of the old and new core systems of the bank. Customization will lead to the need to reinvent the wheel when implementing the switching between the old and new systems in another application scenario. A set of switching systems between the old and new systems needs to be developed for each application scenario, which has a relatively low development efficiency. Summary of the invention

[0004] The present disclosure provides a message distribution method, device, electronic device and storage medium based on switching between new and old systems.

[0005] According to a first aspect of the present disclosure, a message distribution method based on switching between a new system and an old system is provided, comprising:

[0006] Receive transaction messages to be distributed;

[0007] Determine the current application scenario according to the transaction message, and obtain the switching status of the new system and the old system in the current application scenario;

[0008] According to the switching status of the new system and the old system, a corresponding message distribution strategy is executed; wherein the message distribution strategy includes forwarding the transaction message to a first link corresponding to the old system and / or a second link corresponding to the new system.

[0009] According to a second aspect of the present disclosure, a message distribution device based on switching between a new system and an old system is provided, comprising:

[0010] A message receiving module, configured to receive a transaction message to be distributed;

[0011] A state acquisition module is configured to determine a current application scenario according to the transaction message, and acquire a switching state between a new system and an old system in the current application scenario;

[0012] The message distribution module is configured to execute a corresponding message distribution strategy according to the switching status of the new system and the old system; wherein the message distribution strategy includes forwarding the transaction message to the first link corresponding to the old system and / or the second link corresponding to the new system.

[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method in any of the above technical solutions.

[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the above technical solutions.

[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the methods described in the above technical solutions when executed by a processor.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0021] Figure 1 It is a schematic diagram of the steps of the message distribution method based on the switching between the new and old systems in an embodiment of the present disclosure;

[0022] Figure 2 is a schematic diagram of a system framework for executing a message distribution method based on switching between a new system and an old system in an embodiment of the present disclosure;

[0023] Figure 3 is a schematic diagram of link assembly in a front channel scenario in an embodiment of the present disclosure;

[0024] Figure 4 It is a schematic diagram of link assembly in the SMS platform and public platform channel scenarios in the embodiment of the present disclosure;

[0025] Figure 5 It is a principle block diagram of a message distribution device based on switching between new and old systems in an embodiment of the present disclosure;

[0026] Figure 6 It is a principle block diagram of another message distribution device based on switching between new and old systems in an embodiment of the present disclosure;

[0027] Figure 7 It is a block diagram of an electronic device used to implement the message distribution method based on the switching between the old and new systems according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0029] In view of the technical problem that different old and new system switching systems need to be developed for different application scenarios in the prior art, the present disclosure provides a message distribution method based on the old and new system switching, such as Figure 1 As shown, including:

[0030] Step S101, receiving a transaction message to be distributed.

[0031] Specifically, in the embodiments of the present disclosure, the differences between different communication protocols and data formats can be isolated, and a transaction message receiver in a unified format can be encapsulated to receive transaction messages of different communication types and different data formats.

[0032] Step S102, determining the current application scenario according to the transaction message, and obtaining the switching status of the new system and the old system in the current application scenario.

[0033] The present disclosure can distribute traffic when switching between old and new systems for multiple different application scenarios. When receiving a transaction message, the current application scenario can be determined based on the transaction message, such as Figure 2 As shown, for example, financial application scenarios may include payment platform processing, pre-processing of host, pre-processing of host external processing, head office processing, bill cloud processing, VISA external card processing, etc. Specifically, the switching status of the old and new systems can be notified to the message receiver and message processor on the corresponding link in a timely manner. The switching status refers to the operating status of the new and old systems during the transition from the old system to the new system.

[0034] Step S103, executing a corresponding message distribution strategy according to the switching status of the new system and the old system; wherein the message distribution strategy includes forwarding the transaction message to the first link corresponding to the old system and / or the second link corresponding to the new system.

[0035] Specifically, after obtaining the switching status of the new and old systems in different application scenarios, traffic can be distributed according to the switching status. For example, when the current switching status of the new and old systems is in the initial state and the new system cannot handle business, the transaction message can be forwarded to the old system for processing; when the current switching status of the new and old systems is in the completed state and the new system can handle business, the transaction message can be forwarded to the new system for processing; when the switching status of the new and old systems is in the transition period, the new system can share part of the traffic, or copy the transaction message and forward it to the new system and the old system respectively.

[0036] The disclosure integrates the switching of old and new systems for multiple application scenarios into the same system, without the need to develop a traffic distribution system for each application scenario. In particular, when banks are upgrading their core systems, multiple channels are involved, and the specific application scenarios of each channel are different. If each application scenario is equipped with a separate communication message receiving and sending module, message conversion module, switching state pulling module, log printing module, etc., the basic function development cycle of a new channel will take at least one month. However, through the traffic distribution method disclosed in the disclosure, the development cycle of the basic function has been reduced from at least one month to about two days, significantly improving the development efficiency.

[0037] As an optional implementation, after step S101, receiving the transaction message to be distributed, further includes:

[0038] Convert transaction messages in different data formats into a preset common format.

[0039] Specifically, in this embodiment, transaction messages of different communication types and data formats can be received, such as Http messages, Tcp messages, etc. The Http message receiver receives all Http messages through preset matching rules, and then packages the Http messages into SimpleHttpRequestMessage and forwards them to the next message processor. The Tcp message receiver receives all Tcp messages, and then packages the Tcp messages into SimpleTcpRequestMessage and forwards them to the first message processor. In this way, the received transaction messages of different data formats are converted into a unified data format, which is convenient for the next message processor to process.

[0040] As an optional implementation, step S103, before executing the corresponding message distribution strategy according to the switching state between the new system and the old system, further includes:

[0041] The first link and the second link corresponding to each application scenario are respectively assembled in advance according to different application scenarios; wherein each link includes at least one message receiver and at least one message processor.

[0042] Specifically, in this embodiment, link assembly can be performed for message receivers and message processors in different scenarios, and the message processing process can be intuitively seen, for example, the main line: Tcp message receiver next performance monitoring processor next message distributor next1 old system next2 new system, where the second link corresponding to the old system: performance monitoring processor next message storage next Tcp message processor; the first link corresponding to the new system: performance monitoring processor next message conversion processor. Figure 2 As shown, each link usually includes at least one message receiver and multiple message processors. In this embodiment, the processing logic such as traffic distribution, exception handling, and message conversion is encapsulated into a message processor that can be assembled on demand, and the link is assembled according to different application scenarios. By atomizing and abstracting each basic capability, it is convenient for reuse, thereby improving development efficiency.

[0043] Specifically, Figure 2 As shown, the corresponding message receiver and message processor can be selected for assembly in the message receiver and message processor module 201 according to the actual application scenario. The message receiver and message processor module 201 includes but is not limited to the following message receivers and message processors: asynchronous full-duplex Netty client message receiver, asynchronous full-duplex Netty server message receiver, asynchronous simplex Netty client message receiver, asynchronous simplex Netty server message receiver, thread pool message processor, new system synchronous message processor, new system asynchronous response message processor, Kafka storage message processor, synchronous simplex Netty message receiver, simple message splitter, switch-controlled message splitter, Http client message processor, Http server message receiver, new system asynchronous request message processor, baffle message processor, simplex client load balancing message processor. The link assembly module 202 forms a processing link of the corresponding scenario through the corresponding message receiver and message processor.

[0044] For example, Figure 3The figure shows a schematic diagram of link assembly in the front channel scenario. The front channel 301 is connected to the old system 302 through the first link and to the new system 303 through the second link. Among them, the first link includes a first asynchronous simplex Netty server message receiver 304, a switch-controlled message splitter 305, a first Kafka storage message processor 306, a first asynchronous simplex Netty client message receiver 307, a second asynchronous simplex Netty server message receiver 308, a second Kafka storage message processor 309, a first baffle message processor 310, and a second asynchronous simplex Netty client message receiver 311; the second link includes a message splitter 305, a new system callback message processor 312, a second baffle message processor 313, and a second asynchronous simplex Netty client message receiver 311. In addition, it also includes a first front abnormal message processor 314, which is connected to the first asynchronous simplex Netty client message receiver 307 and the first baffle message processor 310 respectively to form a current limiting link to limit the traffic of the old system. The second front-end exception message processor 315 is respectively connected to the new system callback message processor 312 and the second baffle message processor 313 to form an exception handling link. The third front-end exception message processor 316 is respectively connected to the first asynchronous simplex Netty client message receiver 307 and the first baffle message processor 310 to form a connection disconnection link. Figure 4 Shown are the first link and second link diagrams in the SMS platform and public platform channel scenarios.

[0045] As an optional implementation manner, after assembling the first link and the second link corresponding to each application scenario respectively according to different application scenarios in advance, the method further includes:

[0046] A scenario plug-in corresponding to each first link and second link is set according to the application scenario.

[0047] For example, Figure 2 As shown, the application scenarios may include pre-processing of the host, pre-processing of the host external call, payment platform processing, head office processing, bill cloud processing, VISA external card processing, etc. Figure 2 In the scenario plug-in setting module 203 shown, the plug-ins corresponding to each application scenario include a pre-adjustment host plug-in, a host external adjustment pre-adjustment plug-in, a payment platform plug-in, a head office plug-in, a VISA external card plug-in, a bill cloud plug-in, etc. Each scenario plug-in is responsible for implementing the personalized implementation in the corresponding scenario, such as message unpacking and packaging, and message conversion. For example, when a TCP message receiver performs TCP message depacketization, the TcpMessageHeaderDesc interface is required so that the message receiver can learn the message header length and message body length in the scenario.

[0048] As an optional implementation, the switching state includes at least one of the following: an initial state (INITIAL state); an online parallel state (ONLINE online parallel state); a blocking state (BLOCK state); an external verification state (VALIDATE state); and a switching completion state (COMPLETE state).

[0049] As an optional implementation, in step S103, executing a corresponding message distribution strategy according to the switching state between the new system and the old system includes at least one of the following:

[0050] In response to the switching state being the initial state, the transaction message is forwarded only to the second link.

[0051] In the INITIAL state, the new system may not be able to process business yet, so the transaction message can be forwarded to the first link corresponding to the old system for processing.

[0052] In response to the switching state being an online parallel state, the transaction message is split into a first transaction message and a second transaction message, which are forwarded to the first link and the second link respectively, and only the first response message of the old system is returned to the upstream caller.

[0053] In the ONLINE parallel state, the old and new systems can process business at the same time. The transaction message can be copied and forwarded to the corresponding links of the old and new systems respectively. However, since the old system may be more stable in processing business at this time, only the response message of the old system can be returned.

[0054] In response to the switching state being the interception state, the transaction message is intercepted.

[0055] In the BLOCK state, neither the new system nor the old system is forwarded.

[0056] In response to the switching state being the external verification state, the transaction message is split into a first transaction message and a second transaction message, which are forwarded to the first link and the second link respectively, and only the second response message of the new system is returned to the upstream caller.

[0057] In the VALIDATE state, the ability of the new system to handle business needs to be verified. A copy of the transaction message can be made and one copy can be forwarded to the corresponding links of the old and new systems respectively. However, in order to verify the ability of the new system to handle business, only the response message of the new system can be returned.

[0058] In response to the switching state being the switching completion state, the transaction message is forwarded only to the first link.

[0059] In the COMPLETE state, the old and new systems have completely completed the switch, and the transaction message can be forwarded only to the second link corresponding to the new system.

[0060] Through the above technical solution, when switching between the old and new systems, a better strategy can be selected to distribute traffic, ensure the stability of business processing, and avoid business processing anomalies when switching between the old and new systems.

[0061] As an optional implementation, each of the first link and the second link is provided with a baffle message processor; according to the switching state of the new system and the old system, executing the corresponding message distribution strategy includes:

[0062] According to the switching state, the corresponding baffle message processor is controlled to be turned on or off.

[0063] by Figure 4 Taking the first link and the second link in the SMS platform and public platform channel scenarios as examples, the public platform 401 connects the old system 402 and the new system 403 in the SMS platform and public platform channel scenarios respectively through the first link and the second link, wherein the first link includes an asynchronous duplex Netty server message receiver 404, a first performance monitoring collector 405, a third baffle message processor 406, a third Kafka storage message processor 407, and an asynchronous duplex Netty client message receiver 408; the second link includes a new system synchronous message processor 409, a fourth baffle message processor 410, a fourth Kafka storage message processor 411, a second performance monitoring collector 412, and an Http server message receiver 413. By controlling the opening and closing states of the third baffle message processor 406 and the fourth baffle message processor 410, the traffic of the first link and the second link can be controlled.

[0064] The present disclosure also provides a message distribution device 500 based on switching between the old and new systems. Figure 5 As shown, including:

[0065] The message receiving module 501 is configured to receive a transaction message to be distributed.

[0066] Specifically, in the embodiments of the present disclosure, the differences between different communication protocols and data formats can be isolated, and a transaction message receiver in a unified format can be encapsulated to receive transaction messages of different communication types and different data formats.

[0067] The state acquisition module 502 is configured to determine the current application scenario according to the transaction message, and acquire the switching state of the new system and the old system in the current application scenario.

[0068] The present disclosure can distribute traffic when switching between old and new systems for multiple different application scenarios. When receiving a transaction message, the current application scenario can be determined based on the transaction message, such as Figure 2As shown, for example, financial application scenarios may include payment platform processing, pre-processing of host, pre-processing of host external processing, head office processing, bill cloud processing, VISA external card processing, etc. Specifically, the switching status of the old and new systems can be notified to the message receiver and message processor on the corresponding link in a timely manner. The switching status refers to the operating status of the new and old systems during the transition from the old system to the new system.

[0069] The message distribution module 503 is configured to execute a corresponding message distribution strategy according to the switching status of the new system and the old system; wherein the message distribution strategy includes forwarding the transaction message to the first link corresponding to the old system and / or the second link corresponding to the new system.

[0070] Specifically, after obtaining the switching status of the new and old systems in different application scenarios, traffic can be distributed according to the switching status. For example, when the current switching status of the new and old systems is in the initial state and the new system cannot handle business, the transaction message can be forwarded to the old system for processing; when the current switching status of the new and old systems is in the completed state and the new system can handle business, the transaction message can be forwarded to the new system for processing; when the switching status of the new and old systems is in the transition period, the new system can share part of the traffic, or copy the transaction message and forward it to the new system and the old system respectively.

[0071] The disclosure integrates the switching of old and new systems for multiple application scenarios into the same system, without the need to develop a traffic distribution system for each application scenario. In particular, when banks are upgrading their core systems, multiple channels are involved, and the specific application scenarios of each channel are different. If each application scenario is equipped with a separate communication message receiving and sending module, message conversion module, switching state pulling module, log printing module, etc., the basic function development cycle of a new channel will take at least one month. However, through the traffic distribution method disclosed in the disclosure, the development cycle of the basic function has been reduced from at least one month to about two days, significantly improving the development efficiency.

[0072] As an optional implementation, the message distribution device 500 further includes:

[0073] The format conversion module is configured to convert the transaction message in different data formats into a preset common format after the message receiving module receives the transaction message to be distributed.

[0074] Specifically, in this embodiment, transaction messages of different communication types and data formats can be received, such as Http messages, Tcp messages, etc. The Http message receiver receives all Http messages through preset matching rules, and then packages the Http messages into SimpleHttpRequestMessage and forwards them to the next message processor. The Tcp message receiver receives all Tcp messages, and then packages the Tcp messages into SimpleTcpRequestMessage and forwards them to the first message processor. In this way, the received transaction messages of different data formats are converted into a unified data format, which is convenient for the next message processor to process.

[0075] As an optional implementation, Figure 6 As shown, the message distribution device 500 also includes:

[0076] The link assembly module 202 is configured as a message distribution module that assembles the first link and the second link corresponding to each application scenario in advance according to different application scenarios before executing the corresponding message distribution strategy according to the switching status of the new system and the old system; wherein each link includes at least one message receiver and at least one message processor.

[0077] Specifically, in this embodiment, link assembly can be performed for message receivers and message processors in different scenarios, and the message processing process can be intuitively seen, for example, the main line: Tcp message receiver next performance monitoring processor next message distributor next1 old system next2 new system, where the second link corresponding to the old system: performance monitoring processor next message storage next Tcp message processor; the first link corresponding to the new system: performance monitoring processor next message conversion processor. Figure 2 As shown, each link usually includes at least one message receiver and multiple message processors. In this embodiment, the processing logic such as traffic distribution, exception handling, and message conversion is encapsulated into a message processor that can be assembled on demand, and the link is assembled according to different application scenarios. By atomizing and abstracting each basic capability, it is convenient for reuse, thereby improving development efficiency.

[0078] Specifically, Figure 2As shown, the corresponding message receiver and message processor can be selected for assembly in the message receiver and message processor module 201 according to the actual application scenario. The message receiver and message processor module 201 includes but is not limited to the following message receivers and message processors: asynchronous full-duplex Netty client message receiver, asynchronous full-duplex Netty server message receiver, asynchronous simplex Netty client message receiver, asynchronous simplex Netty server message receiver, thread pool message processor, new system synchronous message processor, new system asynchronous response message processor, Kafka storage message processor, synchronous simplex Netty message receiver, simple message splitter, switch-controlled message splitter, Http client message processor, Http server message receiver, new system asynchronous request message processor, baffle message processor, simplex client load balancing message processor. The link assembly module 202 forms a processing link of the corresponding scenario through the corresponding message receiver and message processor.

[0079] For example, Figure 3 The figure shows a schematic diagram of link assembly in the front channel scenario. The front channel 301 is connected to the old system 302 through the first link and to the new system 303 through the second link. Among them, the first link includes a first asynchronous simplex Netty server message receiver 304, a switch-controlled message splitter 305, a first Kafka storage message processor 306, a first asynchronous simplex Netty client message receiver 307, a second asynchronous simplex Netty server message receiver 308, a second Kafka storage message processor 309, a first baffle message processor 310, and a second asynchronous simplex Netty client message receiver 311; the second link includes a message splitter 305, a new system callback message processor 312, a second baffle message processor 313, and a second asynchronous simplex Netty client message receiver 311. In addition, it also includes a first front abnormal message processor 314, which is connected to the first asynchronous simplex Netty client message receiver 307 and the first baffle message processor 310 respectively to form a current limiting link to limit the traffic of the old system. The second front-end exception message processor 315 is respectively connected to the new system callback message processor 312 and the second baffle message processor 313 to form an exception handling link. The third front-end exception message processor 316 is respectively connected to the first asynchronous simplex Netty client message receiver 307 and the first baffle message processor 310 to form a connection disconnection link. Figure 4 Shown are the first link and second link diagrams in the SMS platform and public platform channel scenarios.

[0080] As an optional implementation, the message distribution device 500 further includes:

[0081] Figure 2The scenario plug-in setting module 203 is configured as a link assembly module that pre-assembles the first link and the second link corresponding to each application scenario according to different application scenarios, and then sets the scenario plug-in corresponding to each first link and the second link according to the application scenario.

[0082] For example, Figure 2 As shown, the application scenarios may include pre-adjustment host processing, host external adjustment pre-processing, payment platform processing, head office processing, bill cloud processing, VISA external card processing, etc. The plug-ins corresponding to each application scenario include pre-adjustment host plug-in, host external adjustment pre-processing plug-in, payment platform plug-in, head office plug-in, VISA external card plug-in, bill cloud plug-in, etc. Each scenario plug-in is responsible for implementing the personalized implementation in the corresponding scenario, such as message unpacking and packaging, and message conversion. For example, when the TCP message receiver is performing TCP message depacketization, the TcpMessageHeaderDesc interface is required so that the message receiver can learn the message header length and message body length in this scenario.

[0083] As an optional implementation, the switching state acquired by the state acquisition module 502 includes at least one of the following: initial state (INITIAL state); online parallel state (ONLINE online parallel state); interception state (BLOCK state); external verification state (VALIDATE state); switching completion state (COMPLETE state).

[0084] As an optional implementation, the message distribution module 503 executes a corresponding message distribution strategy according to the switching state between the new system and the old system, including at least one of the following:

[0085] In response to the switching state being the initial state, the transaction message is forwarded only to the second link.

[0086] In the INITIAL state, the new system may not be able to process business yet, so the transaction message can be forwarded to the first link corresponding to the old system for processing.

[0087] In response to the switching state being an online parallel state, the transaction message is split into a first transaction message and a second transaction message, which are forwarded to the first link and the second link respectively, and only the first response message of the old system is returned to the upstream caller.

[0088] In the ONLINE parallel state, the old and new systems can process business at the same time. The transaction message can be copied and forwarded to the corresponding links of the old and new systems respectively. However, since the old system may be more stable in processing business at this time, only the response message of the old system can be returned.

[0089] In response to the switching state being the interception state, the transaction message is intercepted.

[0090] In the BLOCK state, neither the new system nor the old system is forwarded.

[0091] In response to the switching state being the external verification state, the transaction message is split into a first transaction message and a second transaction message, which are forwarded to the first link and the second link respectively, and only the second response message of the new system is returned to the upstream caller.

[0092] In the VALIDATE state, the ability of the new system to handle business needs to be verified. A copy of the transaction message can be made and one copy can be forwarded to the corresponding links of the old and new systems respectively. However, in order to verify the ability of the new system to handle business, only the response message of the new system can be returned.

[0093] In response to the switching state being the switching completion state, the transaction message is forwarded only to the first link.

[0094] In the COMPLETE state, the old and new systems have completely completed the switch, and the transaction message can be forwarded only to the second link corresponding to the new system.

[0095] Through the above technical solution, when switching between the old and new systems, a better strategy can be selected to distribute traffic, ensure the stability of business processing, and avoid business processing anomalies when switching between the old and new systems.

[0096] As an optional implementation, each first link and each second link is provided with a baffle message processor; the message distribution module 503 executes the corresponding message distribution strategy according to the switching state of the new system and the old system, including:

[0097] According to the switching state, the corresponding baffle message processor is controlled to be turned on or off.

[0098] by Figure 4 Taking the first link and the second link in the SMS platform and public platform channel scenarios as examples, the public platform 401 connects the old system 402 and the new system 403 in the SMS platform and public platform channel scenarios respectively through the first link and the second link, wherein the first link includes an asynchronous duplex Netty server message receiver 404, a first performance monitoring collector 405, a third baffle message processor 406, a third Kafka storage message processor 407, and an asynchronous duplex Netty client message receiver 408; the second link includes a new system synchronous message processor 409, a fourth baffle message processor 410, a fourth Kafka storage message processor 411, a second performance monitoring collector 412, and an Http server message receiver 413. By controlling the opening and closing states of the third baffle message processor 406 and the fourth baffle message processor 410, the traffic of the first link and the second link can be controlled.

[0099] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0100] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0101] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0102] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0103] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0104] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a message distribution method based on the switching of the old and new systems. For example, in some embodiments, the message distribution method based on the switching of the old and new systems may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the message distribution method based on the switching of the old and new systems described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured in any other appropriate manner (for example, by means of firmware) to execute the message distribution method based on the switching between the new and old systems.

[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0107] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0110] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0112] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A message distribution method based on switching between a new system and an old system, comprising: Receive transaction messages to be distributed; Determine the current application scenario according to the transaction message, and obtain the switching status of the new system and the old system in the current application scenario; According to the switching status of the new system and the old system, a corresponding message distribution strategy is executed; wherein the message distribution strategy includes forwarding the transaction message to a first link corresponding to the old system and / or a second link corresponding to the new system.

2. The method according to claim 1, wherein: After receiving the transaction message to be distributed, the method further includes: The transaction messages in different data formats are converted into a preset common format.

3. The method according to claim 1, wherein: Before executing the corresponding message distribution strategy according to the switching state of the new system and the old system, the method further includes: The first link and the second link corresponding to each application scenario are pre-assembled according to different application scenarios; wherein each link includes at least one message receiver and at least one message processor.

4. The method according to claim 3, wherein: After the first link and the second link corresponding to each application scenario are respectively assembled in advance according to different application scenarios, the method further includes: A scenario plug-in corresponding to each of the first link and the second link is set according to the application scenario.

5. The method according to claim 1, wherein: The switching state includes at least one of the following: initial state; online parallel state; interception state; external verification state; switching completion state.

6. The method according to claim 5, wherein: The executing a corresponding message distribution strategy according to the switching state of the new system and the old system includes at least one of the following: In response to the switching state being the initial state, forwarding the transaction message only to the first link; In response to the switching state being the online parallel state, splitting the transaction message into a first transaction message and a second transaction message, forwarding the messages to the first link and the second link respectively, and returning only the first response message of the old system to the upstream caller; In response to the switching state being the interception state, intercepting the transaction message; In response to the switching state being the external verification state, splitting the transaction message into the first transaction message and the second transaction message, forwarding the messages to the first link and the second link respectively, and returning only the second response message of the new system to the upstream caller; In response to the switching state being the switching completion state, forwarding the transaction message only to the second link.

7. The method according to any one of claims 1 to 6, wherein: Each of the first link and the second link is provided with a baffle message processor; The executing a corresponding message distribution strategy according to the switching state of the new system and the old system includes: According to the switching state, the corresponding damper message processor is controlled to be turned on or off.

8. A message distribution device based on switching between a new system and an old system, comprising: A message receiving module, configured to receive a transaction message to be distributed; A state acquisition module is configured to determine a current application scenario according to the transaction message, and acquire a switching state between a new system and an old system in the current application scenario; The message distribution module is configured to execute a corresponding message distribution strategy according to the switching status of the new system and the old system; wherein the message distribution strategy includes forwarding the transaction message to the first link corresponding to the old system and / or the second link corresponding to the new system.

9. The device according to claim 8, wherein: Also includes: The format conversion module is configured to convert the transaction message in different data formats into a preset common format after the message receiving module receives the transaction message to be distributed.

10. The device according to claim 8, wherein: Also includes: The link assembly module is configured to assemble the first link and the second link corresponding to each application scenario in advance according to different application scenarios before the message distribution module executes the corresponding message distribution strategy according to the switching status of the new system and the old system; wherein each link includes at least one message receiver and at least one message processor.

11. The device according to claim 10, wherein: Also includes: The scenario plug-in setting module is configured to set the scenario plug-in corresponding to each of the first link and the second link according to the application scenario after the link assembly module assembles the first link and the second link corresponding to each application scenario in advance according to different application scenarios.

12. The device according to claim 8, wherein: The switching state acquired by the state acquisition module includes at least one of the following: initial state; online parallel state; interception state; external verification state; switching completion state.

13. The device according to claim 12, wherein: The message distribution module executes a corresponding message distribution strategy according to the switching state of the new system and the old system, including at least one of the following: In response to the switching state being the initial state, forwarding the transaction message only to the first link; In response to the switching state being the online parallel state, splitting the transaction message into a first transaction message and a second transaction message, forwarding the messages to the first link and the second link respectively, and returning only the first response message of the old system to the upstream caller; In response to the switching state being the interception state, intercepting the transaction message; In response to the switching state being the external verification state, splitting the transaction message into the first transaction message and the second transaction message, forwarding the messages to the first link and the second link respectively, and returning only the second response message of the new system to the upstream caller; In response to the switching state being the switching completion state, forwarding the transaction message only to the second link.

14. The device according to any one of claims 8 to 13, wherein: Each of the first link and the second link is provided with a baffle message processor; The message distribution module executes the corresponding message distribution strategy according to the switching state of the new system and the old system, including: According to the switching state, the corresponding damper message processor is controlled to be turned on or off.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

17. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.