Message instruction forwarding method and device, equipment and storage medium
Through the analysis and routing strategy processing of message instructions, it is ensured that the same group of message instructions are processed in the same database in the downstream business system, which solves the problem of inconsistent message instruction routing in the existing technology and realizes the integrity and continuity of financial services.
Patent Information
- Application Number
- CN202410778892.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology cannot effectively ensure that the same group of message instructions from the external system are processed by the same database in the downstream business system, causing the integrity and continuity of financial services to be affected.
By parsing the message instructions, determine the forwarding routing key value and forward it to the corresponding system sub-library based on the routing policy, determine whether it is the first hop of the message instruction in the same group, obtain the routing key value of the downstream business system, and perform format conversion. and distribution to ensure that message instructions are routed to the target branch.
It enables the same group of message instructions from external systems to be processed in the same database in the downstream business system, ensuring the integrity and continuity of financial services and improving processing efficiency.
Smart Images

Figure CN118740924A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial information systems, and in particular to a message instruction forwarding method, device, equipment and storage medium. Background Art
[0002] The business complexity of the financial system is high, and it is often necessary to connect to external financial systems and interact with external systems through message instructions. Therefore, a solution is needed to convert the message instructions of the external system into the general message format required by the business system. With the promotion of the concept of distributed computing, different business systems may use different communication protocols and are likely to deploy multiple sub-databases. The message instructions exchanged by these businesses are often a set of instructions with sequence, correlation, and continuity. The same group of instructions usually contain the same key value of the external system, but only the first request contains the routing information required by the downstream business system for message forwarding. However, the prior art lacks a solution to ensure that a group of message instructions that only contain the routing information required by the downstream business system in the first hop are routed to the same sub-database of the downstream business system for processing.
[0003] Therefore, there is an urgent need for a message instruction forwarding method that can ensure that the same group of message instructions from the external system can be processed by the same database of the downstream business system, thereby ensuring the integrity and continuity of the financial business. Summary of the invention
[0004] The main purpose of the present invention is to provide a message instruction forwarding method, device, equipment and storage medium, aiming to solve the technical problem of how to ensure the integrity and continuity of financial services.
[0005] To achieve the above object, the present invention provides a message instruction forwarding method, the method comprising the following steps:
[0006] Parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy;
[0007] Determine whether the message instruction is the first hop of the same group of message instructions, and obtain the downstream business system routing key value of the message instruction according to the determination result;
[0008] Based on the system message format of the downstream business system, the message instruction is formatted to obtain a converted message;
[0009] According to the routing rule of the downstream business system and the routing key value of the downstream business system, the converted message is distributed from the system sub-database to the target sub-database corresponding to the downstream business system.
[0010] Optionally, the step of parsing the message instruction to determine a forwarding routing key value, and forwarding the message instruction to a corresponding system sub-library based on the forwarding routing key value and a routing strategy includes:
[0011] Parse the message instruction through the front-end routing gateway to obtain the instruction flow and instruction type corresponding to the message instruction;
[0012] Based on the instruction flow and the instruction type, a forwarding routing key value of the message instruction is determined using a preset routing algorithm, and a routing factor is determined according to the forwarding routing key value;
[0013] The message instruction is forwarded to the corresponding system sub-library according to the routing factor and the routing strategy, and the routing strategy is used to route the message instructions with the same instruction type to the same system sub-library.
[0014] Optionally, the step of determining whether the message instruction is the first hop of the same group of message instructions, and acquiring a downstream business system routing key value of the message instruction according to the determination result, includes:
[0015] Determine whether the message instruction is the first hop of the same group of message instructions according to the instruction flow;
[0016] If the message instruction is the first hop of the same group of message instructions, adaptively selecting a corresponding message parser according to the instruction type;
[0017] The message instruction is parsed by the message parser to obtain a downstream business system routing key value of the message instruction.
[0018] Optionally, after the step of parsing the message instruction by the message parser to obtain the downstream business system routing key value of the message instruction, the step further includes:
[0019] Recording the mapping relationship between the downstream business system routing key value and the forwarding routing key value into the routing relationship table;
[0020] Correspondingly, after the step of determining whether the message instruction is the first hop of the same group of message instructions according to the instruction flow, the method further includes:
[0021] If the message instruction is not the first hop of the same group of message instructions, obtaining the routing relationship table;
[0022] The downstream business system routing key value of the message instruction is searched according to the forwarding routing key value and the routing relationship table.
[0023] Optionally, the step of forwarding the message instruction to a corresponding system sub-library according to the routing factor and the routing strategy includes:
[0024] Determine the system sub-library to which the message instruction is forwarded according to the routing factor, and determine whether the system sub-library is abnormal;
[0025] If the system sub-library has an abnormality, the routing factor is configured to a new system sub-library, and the routing strategy of the front-end routing gateway is refreshed;
[0026] The message instruction is forwarded to the corresponding system sub-library according to the routing factor and the refreshed routing strategy.
[0027] Optionally, the step of converting the format of the message instruction based on the system message format of the downstream business system to obtain the converted message includes:
[0028] Analyze the message instruction, and determine the message information of the message instruction according to the analysis result;
[0029] The message information is stored in a pre-established storage queue, and the system message format of the downstream business system is obtained;
[0030] The message information in the storage queue is packaged according to the system message format to achieve format conversion of the message instruction and obtain a converted message.
[0031] Optionally, the step of distributing the converted message from the system sub-database to a target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system includes:
[0032] Determine the downstream business system corresponding to the message instruction according to the downstream business system routing key value;
[0033] Obtaining a pre-configured routing rule in the downstream business system, and determining a target sub-database corresponding to the downstream business system according to the routing rule;
[0034] The converted message is distributed from the system sub-database to the target sub-database based on the routing rule.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes a message instruction forwarding device, the device comprising:
[0036] An instruction parsing module is used to parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy;
[0037] An instruction judgment module, used to judge whether the message instruction is the first hop of the same group of message instructions, and obtain the downstream business system routing key value of the message instruction according to the judgment result;
[0038] A format conversion module, used to convert the message instruction into a format based on the system message format of the downstream business system to obtain a converted message;
[0039] The instruction distribution module is used to distribute the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system.
[0040] In addition, to achieve the above-mentioned purpose, the present invention also proposes a message instruction forwarding device, which includes: a memory, a processor, and a message instruction forwarding program stored in the memory and executable on the processor, and the message instruction forwarding program is configured to implement the steps of the message instruction forwarding method described above.
[0041] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a message instruction forwarding program is stored, and when the message instruction forwarding program is executed by a processor, the steps of the message instruction forwarding method described above are implemented.
[0042] The present invention determines the forwarding routing key value by parsing the message instruction, forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy; determines whether the message instruction is the first hop of the same group of message instructions, and obtains the downstream business system routing key value of the message instruction according to the determination result; converts the format of the message instruction based on the system message format of the downstream business system to obtain the converted message; distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system. Since the present invention forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy, then obtains the downstream business system routing key value of the message instruction according to the determination result of whether the message instruction is the first hop of the same group of message instructions, and finally converts the format of the message instruction, and distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system, compared with the prior art, the present invention can ensure that the same group of message instructions of the external system can be processed by the same database of the downstream business system, thereby ensuring the integrity and continuity of the financial business. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flowchart of the first embodiment of the message instruction forwarding method of the present invention;
[0044] Figure 2 A schematic diagram of the implementation logic of the message instruction forwarding method of the present invention;
[0045] Figure 3 It is a flow chart of the second embodiment of the message instruction forwarding method of the present invention;
[0046] Figure 4 A schematic diagram of routing and forwarding of the same group of instructions in the message instruction forwarding method of the present invention;
[0047] Figure 5 A schematic diagram of a flow chart of a third embodiment of a message instruction forwarding method of the present invention;
[0048] Figure 6 It is a structural block diagram of the first embodiment of the message instruction forwarding device of the present invention;
[0049] Figure 7 It is a structural diagram of a message instruction forwarding device in a hardware operating environment involved in an embodiment of the present invention.
[0050] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0052] The embodiment of the present invention provides a message instruction forwarding method, referring to Figure 1 , Figure 1 It is a flowchart of the first embodiment of the message instruction forwarding method of the present invention.
[0053] In this embodiment, the message instruction forwarding method includes the following steps:
[0054] Step S10: Parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-library based on the forwarding routing key value and the routing strategy.
[0055] It should be noted that the execution subject of this embodiment can be a computer server device with data processing, network communication and program running functions, such as a server, a tablet computer, a personal computer, etc., or an electronic device capable of realizing the above functions, a message instruction forwarding device, etc. The following takes a message instruction forwarding system (hereinafter referred to as the system) including a message instruction forwarding device as an example to illustrate this embodiment and the following embodiments.
[0056] It should be understood that a message instruction generally refers to a command or signal used to transmit information, trigger an action, or perform a task in a specific system or application. A message instruction can be text, numbers, symbols, or other forms of data used to transmit information between different parts of the system or perform specific operations.
[0057] In order to ensure that the message instruction is forwarded to the corresponding system sub-library, the step S10 includes:
[0058] Step S101: parsing the message instruction through the front-end routing gateway to obtain the instruction flow and instruction type corresponding to the message instruction.
[0059] It should be noted that the front-end routing gateway (or front-end gateway) plays a key role in network communications. It is mainly located between the local network (such as corporate LAN, home network, etc.) and the Internet. It is the only way for data to flow from the internal network to the external network.
[0060] In a specific implementation, the message instruction is parsed through a front-end routing gateway to obtain the instruction flow and instruction type in the message instruction header information.
[0061] It should be understood that the purpose of instruction pipelining is to improve the efficiency of the processor in executing message instructions by dividing the operation of a message instruction into multiple small steps, such as fetch instruction (FI), decode instruction (DI), form operand (CO), fetch operand (FO), execute (EI) and write result back (WO), etc. Each step is completed by a dedicated circuit, thus realizing the parallel processing of message instructions.
[0062] The instruction types may be classified according to different classification standards. The classification standards may be user-defined by the system user, and this embodiment does not impose any limitation on this.
[0063] Step S102: Based on the instruction flow and the instruction type, a forwarding routing key value of the message instruction is determined using a preset routing algorithm, and a routing factor is determined according to the forwarding routing key value.
[0064] It should be noted that the key flow of the message instruction can be determined based on the instruction flow and instruction type using a preset routing algorithm, and then the key flow is used as a forwarding routing key value (external key value), and then the routing factor is calculated based on the forwarding routing key value.
[0065] It is understandable that the routing factor is an important basis for a router or routing algorithm to make routing decisions, and the routing factor determines the transmission path of a data packet (message instruction) in the network.
[0066] Step S103: forwarding the message instruction to the corresponding system sub-library according to the routing factor and the routing strategy, wherein the routing strategy is used to route message instructions of the same instruction type to the same system sub-library.
[0067] It needs to be explained that the message instruction forwarding system may include multiple system sub-libraries, and the system sub-libraries may be databases in the message instruction forwarding system.
[0068] Step S20: determining whether the message instruction is the first hop of the same group of message instructions, and acquiring the downstream business system routing key value of the message instruction according to the determination result.
[0069] It should be understood that the above-mentioned downstream business system routing key value can be a specific identifier or value in a network or application system for determining to which downstream business system the data or request should be routed. Such downstream business system routing key value is usually defined in a data packet, request header, configuration file or database, etc., and is used to guide routing decisions.
[0070] It should be noted that for a group of message instructions with sequentiality, association, and continuity, the same group of message instructions all contain forwarding routing key values, but only the first instruction contains the downstream business system routing key value. Therefore, in order to ensure that the same group of message instructions of the external system can be processed by the same database (target sub-database) of the downstream business system, if the message instruction is the first hop of the same group of message instructions, the downstream business system routing key value is obtained, and the corresponding relationship between the forwarding routing key value (external key value) and the downstream business system routing key value is recorded in the routing information table, so that the subsequent step instructions of the same group of message instructions, when not containing the downstream business system routing key value, can obtain the downstream business system routing key value according to the key value relationship recorded in the routing information table, and be routed to the same sub-database of the downstream business system with the same group of preceding message instructions.
[0071] In a specific implementation, if the message instruction is the first hop of the same group of message instructions, a corresponding message parser is selected according to the instruction type to parse the message instruction and obtain the downstream business system routing key value of the message instruction.
[0072] Step S30: Based on the system message format of the downstream business system, the message instruction is formatted to obtain a converted message.
[0073] It is understandable that due to the high complexity of financial systems, they often need to connect to external financial systems and interact with external systems through message instructions. Therefore, a method is needed to convert the message instructions of external systems into the system message format required by downstream business systems for processing.
[0074] In a specific implementation, the message instruction can be analyzed, and the message information of the message instruction can be determined based on the analysis result; the message information can be stored in a pre-established storage queue, and the system message format of the downstream business system can be obtained; the message information in the storage queue can be packaged according to the system message format to achieve format conversion of the message instruction and obtain the converted message.
[0075] Step S40: Distribute the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system.
[0076] It should be noted that in order to distribute the converted message from the system sub-database to the target sub-database corresponding to the downstream business system, the downstream business system corresponding to the message instruction can be determined according to the routing key value of the downstream business system; the pre-configured routing rules in the downstream business system are obtained, and the target sub-database corresponding to the downstream business system is determined according to the routing rules; and the converted message is distributed from the system sub-database to the target sub-database based on the routing rules.
[0077] For example, refer to Figure 2 , Figure 2 The implementation logic diagram of the message instruction forwarding method of the present invention is shown in the following figure. The implementation logic diagram of the message instruction forwarding method shows the main functions of the message instruction forwarding system:
[0078] (1) The front-end routing gateway is responsible for parsing the instruction flow and instruction type in the instruction header information, using the routing algorithm customized by the forwarding system, taking the key flow of the instruction as the forwarding routing key value (external key value), calculating the routing factor, and forwarding it to the corresponding sub-database (system sub-database) of the message instruction forwarding system.
[0079] (2) If the message instruction is the first hop of the same group of instructions, the corresponding message parser is adaptively selected according to the instruction type of the message instruction, the key information of the message instruction (the routing key value of the downstream business system) is parsed, and the corresponding relationship between the forwarding routing key value (external key value) and the downstream business system routing key value is recorded in the routing information table.
[0080] (3) Select a message converter according to the system message format configured by the downstream business system, and convert the message instructions into the format required by the downstream business system.
[0081] (4) According to the routing rules configured in the downstream business system and the routing key value of the downstream business system, the converted message is distributed to the corresponding sub-database (target sub-database) of the downstream business system for processing.
[0082] (5) Subsequent step instructions of the same group of instructions, when not including the routing key value of the downstream business system, can obtain the routing key value of the downstream business system according to the routing information table and be distributed to the same sub-database of the downstream business system with the routing of the same group of preceding message instructions.
[0083] This embodiment determines the forwarding routing key value by parsing the message instruction, and forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing policy; determines whether the message instruction is the first hop of the same group of message instructions, and obtains the downstream business system routing key value of the message instruction according to the determination result; converts the format of the message instruction based on the system message format of the downstream business system to obtain the converted message; distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the downstream business system routing key value. Since this embodiment forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy, and then obtains the downstream business system routing key value of the message instruction according to the judgment result of whether the message instruction is the first hop of the same group of message instructions, and finally converts the message instruction format, and distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rules of the downstream business system and the downstream business system routing key value, compared with the existing technology, this embodiment can ensure that the same group of message instructions of the external system can be processed by the same database of the downstream business system, thereby ensuring the integrity and continuity of the financial business.
[0084] refer to Figure 3 , Figure 3 This is a flow chart of the second embodiment of the message instruction forwarding method of the present invention.
[0085] Based on the above first embodiment, in this embodiment, step S20 includes:
[0086] Step S201: judging whether the message instruction is the first hop of the same group of message instructions according to the instruction flow.
[0087] Step S202: If the message instruction is the first hop of the same group of message instructions, a corresponding message parser is adaptively selected according to the instruction type.
[0088] Step S203: parsing the message instruction through the message parser to obtain the downstream business system routing key value of the message instruction.
[0089] It should be noted that after step S203, the following steps are also included:
[0090] Step S204: Record the mapping relationship between the downstream business system routing key value and the forwarding routing key value into a routing relationship table.
[0091] Accordingly, after step S201, the following steps are also included:
[0092] Step S202': if the message instruction is not the first hop of the message instructions in the same group, then obtain the routing relationship table.
[0093] Step S203': searching for the downstream business system routing key value of the message instruction according to the forwarding routing key value and the routing relationship table.
[0094] For example, in the specific implementation, for the same set of instruction routing forwarding, refer to Figure 4 , Figure 4 This is a schematic diagram of the routing forwarding of the same group of instructions in the message instruction forwarding method of the present invention. In the figure, instructions 1-1, 1-2, and 1-3 are the same group of instructions in the command source system (external system). The processing steps for this group of instructions are as follows:
[0095] (1) First, instruction 1-1 is parsed by the front-end routing gateway of the message instruction forwarding system, and the forwarding routing key value is determined. The routing factor is calculated based on the forwarding routing key value. According to the routing strategy pre-configured by the message instruction forwarding system, the message instruction is distributed to the second sub-library of the message instruction forwarding system (i.e., sub-library 2 of the message instruction forwarding system).
[0096] (2) Then parse the business system routing key value contained in instruction 1-1, and record the relationship between the routing key value (external key value) of the forwarding system and the routing key value of the downstream business system in the routing information table.
[0097] (3) According to the routing rules of the downstream business system and the routing key value of the downstream business system, the instruction 1-1 is distributed to the first sub-library of the downstream business system (ie, sub-library 1 of the downstream business system).
[0098] (4) For subsequent instructions 1-2 and 1-3, the front-end routing gateway of the message instruction forwarding system parses the forwarding routing key value (external key value) according to the same routing strategy as step (1) and distributes it to the second sub-database of the message instruction forwarding system.
[0099] (5) According to the mapping relationship between the forwarding routing key value and the downstream business system routing key value in the routing information table, the downstream business system routing key value is obtained, and the 1-2 and 1-3 instructions are also routed to the first sub-database of the downstream business system. The forwarding strategy of instructions 2-1 and 2-2 is the same.
[0100] This embodiment determines whether the message instruction is the first hop of the same group of message instructions according to the instruction flow; if the message instruction is the first hop of the same group of message instructions, the corresponding message parser is adaptively selected according to the instruction type, the message instruction is parsed by the message parser, the downstream business system routing key value of the message instruction is obtained, and the mapping relationship between the downstream business system routing key value and the forwarding routing key value is recorded in the routing relationship table; if the message instruction is not the first hop of the same group of message instructions, the routing relationship table is obtained, and the downstream business system routing key value of the message instruction is searched according to the forwarding routing key value and the routing relationship table. Compared with the prior art, in the case where only the first hop of the same group of message instructions contains the downstream business system routing key value, this embodiment ensures that the same group of message instructions of the external system can be processed by the same database of the downstream business system by storing the mapping relationship between the downstream business system routing key value and the forwarding routing key value, without the need for the downstream business system to route again, which not only improves the processing efficiency of financial services, but also ensures the integrity and continuity of financial services.
[0101] refer to Figure 5 , Figure 5 It is a flowchart of the third embodiment of the message instruction forwarding method of the present invention.
[0102] Based on the above embodiments, in this embodiment, step S103 includes:
[0103] Step S1031: Determine the system sub-library to which the message instruction is forwarded according to the routing factor, and determine whether the system sub-library is abnormal.
[0104] Step S1032: If the system sub-library has an abnormality, the routing factor is configured to a new system sub-library, and the routing policy of the front-end routing gateway is refreshed.
[0105] Step S1033: forwarding the message instruction to the corresponding system sub-library according to the routing factor and the refreshed routing strategy.
[0106] For example, refer to Figure 4 ,like Figure 4As shown, when part of the database of the message instruction forwarding system is abnormal, the routing factors configured in the abnormal sub-database are distributed to other sub-databases to ensure the flexibility and high availability of the message instruction forwarding system. For example, for instructions 1-1, 1-2, and 1-3, the original front-end routing gateway calculates the routing factors based on the routing key value of the forwarding system and configures them in the second sub-database (sub-database 2 of the message instruction forwarding system). After the second sub-database is abnormal, the routing factors can be configured to the first sub-database of the message instruction forwarding system (sub-database 1 of the message instruction forwarding system) and the routing strategy of the front-end routing gateway can be refreshed, so that the abnormality of the second sub-database does not affect the forwarding of instructions 1-1, 1-2, and 1-3. At the same time, the forwarding of instructions 2-1 and 2-2 is also not affected.
[0107] It should be noted that, in this embodiment, when anomalies occur in some databases of the message instruction forwarding system, the routing strategy can be switched to other designated sub-databases in real time, enabling switching of multiple sub-databases at any time, thereby ensuring the flexibility and high availability of message forwarding.
[0108] This embodiment determines the system sub-library to which the message instruction is forwarded based on the routing factor, and determines whether the system sub-library is abnormal; if the system sub-library is abnormal, the routing factor is configured to the new system sub-library, and the routing policy of the front-end routing gateway is refreshed; the message instruction is forwarded to the corresponding system sub-library based on the routing factor and the refreshed routing policy. Compared with the prior art, in this embodiment, when there is an abnormality in part of the database of the message instruction forwarding system, the routing policy can be switched to other designated sub-libraries in real time, realizing the switching of multiple sub-libraries at any time, and ensuring the flexibility and high availability of message forwarding.
[0109] In addition, an embodiment of the present invention further proposes a storage medium, on which a message instruction forwarding program is stored. When the message instruction forwarding program is executed by a processor, the steps of the message instruction forwarding method described above are implemented.
[0110] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the message instruction forwarding device of the present invention.
[0111] like Figure 6 As shown, the message instruction forwarding device proposed in the embodiment of the present invention includes: an instruction parsing module 601, an instruction judging module 602, a format conversion module 603 and an instruction distributing module 604.
[0112] The instruction parsing module 601 is used to parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-library based on the forwarding routing key value and the routing strategy.
[0113] The instruction determination module 602 is used to determine whether the message instruction is the first hop of the same group of message instructions, and obtain the downstream business system routing key value of the message instruction according to the determination result.
[0114] The format conversion module 603 is used to convert the format of the message instruction based on the system message format of the downstream business system to obtain a converted message.
[0115] The instruction distribution module 604 is used to distribute the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system.
[0116] The instruction parsing module 601 is also used to parse the message instruction through the front-end routing gateway to obtain the instruction flow and instruction type corresponding to the message instruction; based on the instruction flow and the instruction type, a preset routing algorithm is used to determine the forwarding routing key value of the message instruction, and a routing factor is determined according to the forwarding routing key value; according to the routing factor and the routing strategy, the message instruction is forwarded to the corresponding system sub-library, and the routing strategy is used to route message instructions with the same instruction type to the same system sub-library.
[0117] The format conversion module 603 is also used to analyze the message instruction, determine the message information of the message instruction according to the analysis result; store the message information in a pre-established storage queue, and obtain the system message format of the downstream business system; group the message information in the storage queue according to the system message format to realize format conversion of the message instruction and obtain the converted message.
[0118] The instruction distribution module 604 is also used to determine the downstream business system corresponding to the message instruction according to the routing key value of the downstream business system; obtain the pre-configured routing rules in the downstream business system, and determine the target sub-database corresponding to the downstream business system according to the routing rules; and distribute the converted message from the system sub-database to the target sub-database based on the routing rules.
[0119] The embodiment of the present device parses the message instruction to determine the forwarding routing key value, and forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing policy; determines whether the message instruction is the first hop of the same group of message instructions, and obtains the downstream business system routing key value of the message instruction according to the determination result; based on the system message format of the downstream business system, converts the format of the message instruction to obtain the converted message; and distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rules of the downstream business system and the downstream business system routing key value. Since the embodiment of the present device forwards the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy, and then obtains the downstream business system routing key value of the message instruction according to the judgment result of whether the message instruction is the first hop of the same group of message instructions, and finally converts the format of the message instruction, and distributes the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rules of the downstream business system and the downstream business system routing key value, compared with the existing technology, the embodiment of the present device can ensure that the same group of message instructions of the external system can be processed by the same database of the downstream business system, thereby ensuring the integrity and continuity of the financial business.
[0120] Based on the above-mentioned first embodiment of the message instruction forwarding device of the present invention, a second embodiment of the message instruction forwarding device of the present invention is proposed.
[0121] In this embodiment, the instruction judgment module 602 is further used to judge whether the message instruction is the first hop of the same group of message instructions according to the instruction flow; if the message instruction is the first hop of the same group of message instructions, adaptively select a corresponding message parser according to the instruction type; parse the message instruction by the message parser to obtain the downstream business system routing key value of the message instruction;
[0122] The instruction judgment module 602 is further used to record the mapping relationship between the downstream business system routing key value and the forwarding routing key value into a routing relationship table.
[0123] The instruction judgment module 602 is also used to obtain the routing relationship table if the message instruction is not the first hop of the same group of message instructions; and search the downstream business system routing key value of the message instruction according to the forwarding routing key value and the routing relationship table.
[0124] Other embodiments or specific implementations of the message instruction forwarding device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.
[0125] The present application provides a message instruction forwarding device, which includes: at least one processor; and 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 so that the at least one processor can execute the message instruction forwarding method in the above-mentioned embodiment one.
[0126] Reference below Figure 7 , which shows a schematic diagram of the structure of a message instruction forwarding device suitable for implementing an embodiment of the present application. The message instruction forwarding device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The message instruction forwarding device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0127] like Figure 7As shown, the message instruction forwarding device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the message instruction forwarding device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the message instruction forwarding device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a message instruction forwarding device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0128] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0129] The message instruction forwarding device provided by the present application adopts the message instruction forwarding method in the above embodiment, which can solve the technical problem of how to ensure the integrity and continuity of financial services. Compared with the prior art, the beneficial effects of the message instruction forwarding device provided by the present application are the same as the beneficial effects of the message instruction forwarding method provided by the above embodiment, and the other technical features in the message instruction forwarding device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0130] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0132] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0135] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A message instruction forwarding method, It is characterized in that The method includes: Parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy; Determine whether the message instruction is the first hop of the same group of message instructions, and obtain the downstream business system routing key value of the message instruction according to the determination result; Based on the system message format of the downstream business system, the message instruction is formatted to obtain a converted message; According to the routing rule of the downstream business system and the routing key value of the downstream business system, the converted message is distributed from the system sub-database to the target sub-database corresponding to the downstream business system.
2. The message instruction forwarding method according to claim 1, It is characterized in that The step of parsing the message instruction to determine the forwarding routing key value, and forwarding the message instruction to the corresponding system sub-library based on the forwarding routing key value and the routing strategy includes: Parse the message instruction through the front-end routing gateway to obtain the instruction flow and instruction type corresponding to the message instruction; Based on the instruction flow and the instruction type, a forwarding routing key value of the message instruction is determined using a preset routing algorithm, and a routing factor is determined according to the forwarding routing key value; The message instruction is forwarded to the corresponding system sub-library according to the routing factor and the routing strategy, and the routing strategy is used to route the message instructions with the same instruction type to the same system sub-library.
3. The message instruction forwarding method as claimed in claim 2, It is characterized in that The step of determining whether the message instruction is the first hop of the same group of message instructions, and obtaining the downstream business system routing key value of the message instruction according to the determination result, includes: Determine whether the message instruction is the first hop of the same group of message instructions according to the instruction flow; If the message instruction is the first hop of the same group of message instructions, adaptively selecting a corresponding message parser according to the instruction type; The message instruction is parsed by the message parser to obtain a downstream business system routing key value of the message instruction.
4. The message instruction forwarding method as claimed in claim 3, It is characterized in that After the step of parsing the message instruction by the message parser to obtain the downstream business system routing key value of the message instruction, the method further includes: Recording the mapping relationship between the downstream business system routing key value and the forwarding routing key value into the routing relationship table; Correspondingly, after the step of determining whether the message instruction is the first hop of the same group of message instructions according to the instruction flow, the method further includes: If the message instruction is not the first hop of the same group of message instructions, obtaining the routing relationship table; The downstream business system routing key value of the message instruction is searched according to the forwarding routing key value and the routing relationship table.
5. The message instruction forwarding method according to claim 2, It is characterized in that The step of forwarding the message instruction to the corresponding system sub-library according to the routing factor and the routing strategy includes: Determine the system sub-library to which the message instruction is forwarded according to the routing factor, and determine whether the system sub-library is abnormal; If the system sub-library has an abnormality, the routing factor is configured to a new system sub-library, and the routing strategy of the front-end routing gateway is refreshed; The message instruction is forwarded to the corresponding system sub-library according to the routing factor and the refreshed routing strategy.
6. The message instruction forwarding method according to claim 1, It is characterized in that The step of converting the format of the message instruction based on the system message format of the downstream business system to obtain the converted message includes: Analyze the message instruction, and determine the message information of the message instruction according to the analysis result; The message information is stored in a pre-established storage queue, and the system message format of the downstream business system is obtained; The message information in the storage queue is packaged according to the system message format to achieve format conversion of the message instruction and obtain a converted message.
7. The message instruction forwarding method according to claim 1, It is characterized in that The step of distributing the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system comprises: Determine the downstream business system corresponding to the message instruction according to the downstream business system routing key value; Obtaining a pre-configured routing rule in the downstream business system, and determining a target sub-database corresponding to the downstream business system according to the routing rule; The converted message is distributed from the system sub-database to the target sub-database based on the routing rule.
8. A message instruction forwarding device, It is characterized in that The device comprises: An instruction parsing module is used to parse the message instruction to determine the forwarding routing key value, and forward the message instruction to the corresponding system sub-database based on the forwarding routing key value and the routing strategy; An instruction judgment module, used to judge whether the message instruction is the first hop of the same group of message instructions, and obtain the downstream business system routing key value of the message instruction according to the judgment result; A format conversion module, used to convert the message instruction into a format based on the system message format of the downstream business system to obtain a converted message; The instruction distribution module is used to distribute the converted message from the system sub-database to the target sub-database corresponding to the downstream business system according to the routing rule of the downstream business system and the routing key value of the downstream business system.
9. A message instruction forwarding device, It is characterized in that The device comprises: a memory, a processor, and a message instruction forwarding program stored in the memory and executable on the processor, wherein the message instruction forwarding program is configured to implement the steps of the message instruction forwarding method according to any one of claims 1 to 7.
10. A storage medium, It is characterized in that The storage medium stores a message instruction forwarding program, and when the message instruction forwarding program is executed by the processor, the steps of the message instruction forwarding method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data processing method and device, electronic equipment and storage medium
CN120343100A
