Message routing method and device and computer readable storage medium
By obtaining the recipient account and configuration information of the transaction message, determining its compatibility with the grayscale policy, and routing the transaction message based on the available shard list and routing information, the problem of incomplete grayscale verification in the existing technology is solved, and accurate grayscale verification and routing are achieved in a multi-shard environment.
Patent Information
- Application Number
- CN202510739060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-16
AI Technical Summary
In the existing technology for verifying messages for the People's Bank of China's withdrawal business, the grayscale verification method is simple and cannot perform sufficient grayscale verification, resulting in incomplete verification.
By obtaining the recipient account and configuration information corresponding to the transaction message, we can determine whether it matches the grayscale policy. Based on the available shard list and routing information, we can route the transaction message and set the grayscale policy for verification, thereby improving the completeness of grayscale verification.
It enables effective routing of transaction messages through grayscale strategies when grayscale verification is passed, improves the completeness of grayscale verification, and ensures accurate routing and verification of messages in a multi-database environment.
Smart Images

Figure CN120653677A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a message routing method, device, and computer-readable storage medium. Background Art
[0002] As banking transactions scale, internal systems are evolving into distributed, microservice-based, and multi-database architectures. For the PBOC's withdrawal business, the system deploys multiple, heterogeneous data shards, including a grayscale database.
[0003] However, when verifying the PBOC's recall business messages, the relevant technology can be verified by configuring gray lists and white lists. However, the gray list verification method is relatively simple and cannot perform sufficient gray verification.
[0004] Therefore, how to improve the completeness of grayscale verification of messages is an urgent problem that needs to be solved. Summary of the Invention
[0005] The main purpose of this application is to provide a message routing method, device and computer-readable storage medium, aiming to solve the technical problem of how to improve the completeness of grayscale verification of messages.
[0006] To achieve the above objectives, the present application provides a message routing method, which includes the following steps:
[0007] Obtain the recipient account corresponding to the transaction message and obtain the corresponding configuration information from the configuration center;
[0008] If the recipient's account does not match the whitelist information in the configuration information, determine whether the transaction message matches the grayscale policy;
[0009] If the transaction message matches the grayscale policy, obtain the list of available sub-databases and the first routing information corresponding to the grayscale policy in the configuration information;
[0010] The transaction message is routed based on the first routing information and the available sub-library list.
[0011] Furthermore, the step of routing the transaction message based on the first routing information and the available sub-library list includes:
[0012] Obtaining a hash value corresponding to a message key value of the transaction message, and determining a grayscale routing ratio based on the hash value;
[0013] If the grayscale routing ratio is smaller than the preset routing ratio in the first routing information, and the target sub-database in the first routing information matches the available sub-database list, the transaction message is routed to the target sub-database.
[0014] Furthermore, after the step of determining the grayscale routing ratio based on the hash value, the message routing method further includes:
[0015] If the grayscale routing ratio is greater than or equal to the preset routing ratio, or the target sub-library does not match the available sub-library list, determining the sub-library index based on the hash value and the length of the backup sub-library list in the first routing information;
[0016] Determine a target standby sub-library in the standby sub-library list based on the sub-library index, and determine whether the target standby sub-library is available;
[0017] If the target backup sub-database is available, routing the transaction message to the target backup sub-database;
[0018] If the target standby sub-library is unavailable, the sub-library index is updated, and the process returns to the step of determining the target standby sub-library in the standby sub-library list based on the sub-library index.
[0019] Furthermore, the step of determining whether the transaction message matches the grayscale policy includes:
[0020] Obtain the current message application corresponding to the transaction message based on the interface API of the financial transaction cloud, and obtain the grayscale database application instance corresponding to the grayscale strategy;
[0021] Determine whether the current message application matches the grayscale database application instance, wherein if the current message application matches the grayscale database application instance, determine that the transaction message matches the grayscale policy.
[0022] Furthermore, the step of determining whether the transaction message matches the grayscale policy also includes:
[0023] Obtaining the account number corresponding to the transaction message;
[0024] Determine whether the account number is a bank member card, wherein if the account number is a bank member card, determine that the transaction message matches the grayscale policy.
[0025] Furthermore, after the step of determining whether the transaction message matches the grayscale policy, the message routing method further includes:
[0026] If the transaction message does not match the grayscale policy, the configuration account information corresponding to the transaction message is obtained based on the financial transaction cloud;
[0027] If the configured account information exists in the Grayscale database configuration, the transaction message is routed to the designated Grayscale database corresponding to the Grayscale database configuration.
[0028] Furthermore, after the step of obtaining the configured account information corresponding to the transaction message based on the financial transaction cloud, the message routing method further includes:
[0029] If the configured household information does not exist in the grayscale database configuration, then obtain the isolation configuration information in the configuration information;
[0030] If the transaction message matches the isolation configuration information, obtaining second routing information corresponding to the traffic isolation policy;
[0031] The transaction message is routed based on the second routing information.
[0032] Furthermore, the step of obtaining the list of available sub-libraries includes:
[0033] Obtain the sub-database information in the first routing information, obtain the first active sub-database information based on the financial transaction cloud, and obtain the second active sub-database information through the corresponding database detection application;
[0034] The available sub-library list is determined based on the sub-library information, the first active sub-library information, and the second active sub-library information in the first routing information.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a message routing device, which includes: a memory, a processor, and a message routing program stored on the memory and runnable on the processor, and when the message routing program is executed by the processor, the steps of the aforementioned message routing method are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a message routing program is stored. When the message routing program is executed by a processor, the steps of the aforementioned message routing method are implemented.
[0037] Topic 2, corresponding to the independent technical solutions and the dependent technical solutions. The dependent technical solutions are all preceded by "preferably."
[0038] This application obtains the recipient account corresponding to the transaction message and obtains the corresponding configuration information from the configuration center; then, if the recipient account does not match the whitelist information in the configuration information, it determines whether the transaction message matches the grayscale policy; then, if the transaction message matches the grayscale policy, it obtains the list of available sub-libraries and the first routing information corresponding to the grayscale policy in the configuration information; then, based on the first routing information and the list of available sub-libraries, it routes the transaction message, performs grayscale verification on the transaction message by setting the grayscale policy, and routes the transaction message through the first routing information corresponding to the grayscale policy when the grayscale verification passes, so as to improve the completeness of the grayscale verification of the transaction message through the grayscale policy verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] Figure 1 A flowchart of the first embodiment of the message routing method of this application is provided;
[0042] Figure 2 This is a schematic diagram of the processing flow of a withdrawal transaction from the message to the withdrawing agent bank in this application message routing method;
[0043] Figure 3 This is a flow chart of detecting active sub-databases in the message routing method of this application;
[0044] Figure 4 This is a schematic diagram of the module structure of the message routing device according to an embodiment of the present application.
[0045] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0048] The main solution of this application is: obtain the recipient account corresponding to the transaction message and obtain the corresponding configuration information from the configuration center; if the recipient account does not match the whitelist information in the configuration information, determine whether the transaction message matches the grayscale policy; if the transaction message matches the grayscale policy, obtain the list of available sub-libraries and obtain the first routing information corresponding to the grayscale policy in the configuration information; based on the first routing information and the list of available sub-libraries, route the transaction message.
[0049] As banking transactions scale, internal systems are evolving into distributed, microservice-based, and multi-database architectures. For the PBOC's withdrawal business, the system deploys multiple, heterogeneous data shards, including a grayscale database.
[0050] However, when verifying PBOC withdrawal transactions, related technologies can be implemented by configuring graylists and whitelists. However, graylist verification is relatively simple and cannot provide sufficient grayscale verification. Therefore, improving the completeness of grayscale verification of messages is an urgent problem that needs to be solved.
[0051] This application performs grayscale verification on transaction messages by setting a grayscale policy. When the grayscale verification passes, the transaction message is routed through the first routing information corresponding to the grayscale policy, so as to improve the completeness of the grayscale verification of the transaction message through the grayscale policy verification.
[0052] It should be noted that the execution subject of this embodiment may be a message routing device, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or a message routing device capable of performing the above functions, etc., and this embodiment does not specifically limit this. The following uses the message routing device as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0053] Based on this, this application proposes a message routing method of the first embodiment, please refer to Figure 1 The message routing method includes steps S101 to S104:
[0054] Step S101: Obtain the recipient account corresponding to the transaction message and obtain the corresponding configuration information from the configuration center;
[0055] Step S102: If the recipient's account does not match the whitelist information in the configuration information, determine whether the transaction message matches the grayscale policy;
[0056] Step S103: If the transaction message matches the grayscale policy, obtain a list of available sub-libraries and obtain the first routing information corresponding to the grayscale policy in the configuration information;
[0057] Step S104: routing the transaction message based on the first routing information and the available sub-library list.
[0058] In this embodiment, Figure 2 As shown, Figure 2 This is a diagram of the processing flow of the withdrawal transaction from the message to the withdrawal agent bank in the message routing method of this application. The routing strategy is planted in the message application in the form of SDK. The SDK will obtain the configuration from the withdrawal agent bank configuration center. The configuration center provides a hot loading configuration function, and regularly pulls the latest configuration data (configuration information) from the configuration center to the cache of the message application. The SDK can also obtain information such as the active status of the application instance connected to a certain database and the gray list from the financial transaction cloud. The withdrawal agent bank has a multi-database architecture. Figure 2 The figure symbolically shows shards 01, 02, and the other shards. Because the Financial Transaction Cloud currently uses the service status of application instances for circuit breaking, database failures are slow to communicate to the instance unavailability. Therefore, the retrieving agent bank has added a database detection application that detects each data shard within seconds and records the active status of each shard in a matrix format.
[0059] Figure 3 This is a flow chart of the detection process in the active database in the message routing method of this application. When a transaction occurs, after the request is sent to the withdrawal agent bank, the agent bank queries the database and responds to the message application with the detection result together with the transaction request. A cache in the active database is maintained in the routing strategy SDK, and the cache is updated at this time.
[0060] Among them, the withdrawal agent is the bank's payment and clearing system, which is connected to the message system upstream and the various business systems within the bank downstream. It has functions such as transaction routing and clearing.
[0061] In this embodiment, when a transaction message is received, that is, the People's Bank of China withdraws the transaction message access system, obtains the recipient account corresponding to the transaction message, and obtains the corresponding configuration information from the configuration center, that is, obtains the corresponding configuration information from the configuration center of the withdrawing agent bank through the routing strategy SDK of the message application, and at the same time, the recipient account corresponding to the transaction message, where the recipient account refers to the account information of the transaction message in the recipient system (such as account information).
[0062] After obtaining the configuration information, the whitelist information in the configuration information is obtained and a determination is made as to whether the recipient's account matches the whitelist information. Specifically, the determination is made as to whether the recipient's account is on the whitelist. If so, the determination is made that the recipient's account matches the whitelist information; otherwise, the determination is made that the recipient's account does not match the whitelist information. If the recipient's account matches the whitelist information, the matching information corresponding to the recipient's account in the whitelist information is obtained, the designated database corresponding to the matching information is obtained, and the transaction message is routed to the designated database.
[0063] If the recipient's account does not match the whitelist information in the configuration information, determine whether the transaction message matches the grayscale policy. The grayscale policy may include the following message grayscale policy and the bank member card grayscale policy. If the transaction message matches any of the following message grayscale policy and the bank member card grayscale policy, determine that the transaction message matches the grayscale policy.
[0064] Specifically, in a feasible implementation, step S102 may include steps S1021 to S1022:
[0065] Step S1021: obtaining the current message application corresponding to the transaction message based on the interface API of the financial transaction cloud, and obtaining the grayscale database application instance corresponding to the grayscale policy;
[0066] Step S1022: Determine whether the current message application matches the grayscale database application instance, wherein if the current message application matches the grayscale database application instance, it is determined that the transaction message matches the grayscale policy.
[0067] In this embodiment, if the grayscale strategy is a follow-message grayscale strategy, the current message application corresponding to the transaction message is obtained based on the interface API of the financial transaction cloud, that is, the current message application is the message application adopted by the corresponding initiator to initiate the transaction message, and at the same time, the grayscale database application instance corresponding to the grayscale strategy is obtained, that is, the grayscale database application instance corresponding to the follow-message grayscale strategy is obtained.
[0068] When the grayscale database application instance and the current message application are obtained, determine whether the current message application matches the grayscale database application instance, that is, determine whether the current message application belongs to the grayscale database application instance. If the current message application belongs to the grayscale database application instance, that is, the current message application matches the grayscale database application instance, then determine that the transaction message matches the grayscale policy, and implement the follow-message grayscale verification of the transaction message by following the message grayscale policy to improve the completeness of the grayscale verification.
[0069] In a feasible implementation, step S102 may further include steps S1023 to S1024:
[0070] Step S1023, obtaining the account number corresponding to the transaction message;
[0071] Step S1024, determining whether the account number is a bank member card, wherein if the account number is a bank member card, determining whether the transaction message matches the grayscale policy.
[0072] In this embodiment, the member card is the bank card (account information) of an employee of the recipient bank. If the grayscale policy is the member card grayscale policy, the account number corresponding to the transaction message is obtained, and the account number is the account number of the recipient corresponding to the transaction message (for example, bank account information).
[0073] After obtaining the account number, determine whether the account number is a bank member card, that is, determine whether the account information of the recipient is the account information of an employee in the recipient's bank. If the account number is a bank member card, determine that the transaction message matches the grayscale policy, and implement bank member card grayscale verification of the transaction message through the bank member card grayscale policy to further improve the completeness of the grayscale verification.
[0074] In this embodiment, if the transaction message matches the grayscale policy, the available sub-library list is obtained, and the first routing information corresponding to the grayscale policy in the configuration information is obtained, wherein the first routing information includes the target sub-library, the backup sub-library, and the preset routing ratio. When the transaction message matches the grayscale policy, the first routing information is obtained in the configuration information, and the available sub-library list, i.e., the currently available sub-library list, is obtained. Furthermore, in a feasible implementation, step S103 may also include steps S1031 to S1032:
[0075] Step S1031: Obtain sub-database information in the first routing information, obtain first active sub-database information based on the financial transaction cloud, and obtain second active sub-database information through a corresponding database detection application;
[0076] Step S1032: Determine the available sub-library list based on the sub-library information, the first active sub-library information, and the second active sub-library information in the first routing information.
[0077] In this embodiment, if the transaction message matches the grayscale strategy, after obtaining the first routing information, the sub-library information in the first routing information is obtained, and the first active sub-library information is obtained based on the financial transaction cloud, that is, the first active sub-library information is obtained from the financial transaction cloud, and the second active sub-library information is obtained through the corresponding database detection application, that is, the second active sub-library information currently detected by the database detection application is obtained.
[0078] Then, based on the sub-library information, the first active sub-library information and the second active sub-library information in the first routing information, the available sub-library list is determined. Specifically, the sub-library intersection between the sub-library information, the first active sub-library information and the second active sub-library information can be obtained, and the available sub-library list is generated based on the sub-library intersection, that is, the sub-libraries in the available sub-library list belong to the sub-library information, the first active sub-library information and the second active sub-library information respectively.
[0079] In this embodiment, after obtaining the first routing information and the list of available sub-libraries, the transaction message is routed based on the first routing information and the list of available sub-libraries. Furthermore, in a feasible implementation, step S104 may further include steps S1041 to S1042:
[0080] Step S1041, obtaining a hash value corresponding to the message key value of the transaction message, and determining a grayscale routing ratio based on the hash value;
[0081] Step S1042: If the grayscale routing ratio is smaller than the preset routing ratio in the first routing information, and the target sub-database in the first routing information matches the available sub-database list, the transaction message is routed to the target sub-database.
[0082] In this embodiment, after obtaining the first routing information and the list of available sub-libraries, the message key value of the transaction message is obtained, the message key value is hashed to obtain the hash value corresponding to the message key value, and the grayscale routing ratio is determined based on the hash value, for example, the hash value is modulo 10000 to obtain the grayscale routing ratio.
[0083] After obtaining the grayscale routing ratio, obtain the preset routing ratio in the first routing information, and at the same time obtain the target sub-library in the first routing information, and determine whether the grayscale routing ratio is less than the preset routing ratio, and determine whether the target sub-library matches the available sub-library list.
[0084] If the grayscale routing ratio is less than the preset routing ratio and the target sub-database matches the list of available sub-databases, that is, the target sub-database belongs to the list of available sub-databases, the transaction message will be routed to the target sub-database.
[0085] The message routing method proposed in this embodiment obtains the recipient account corresponding to the transaction message and obtains the corresponding configuration information from the configuration center; then, if the recipient account does not match the whitelist information in the configuration information, it determines whether the transaction message matches the grayscale policy; then, if the transaction message matches the grayscale policy, it obtains the list of available sub-libraries and the first routing information corresponding to the grayscale policy in the configuration information; then, based on the first routing information and the list of available sub-libraries, it routes the transaction message, performs grayscale verification on the transaction message by setting the grayscale policy, and routes the transaction message through the first routing information corresponding to the grayscale policy when the grayscale verification passes, so as to improve the completeness of the grayscale verification of the transaction message through the grayscale policy verification.
[0086] In a feasible implementation manner, after step S1041, the message routing method may further include steps S201 to S202:
[0087] Step S201: If the grayscale routing ratio is greater than or equal to the preset routing ratio, or the target sub-library does not match the available sub-library list, a sub-library index is determined based on the hash value and the length of the backup sub-library list in the first routing information;
[0088] Step S202: determining a target standby sub-library in the standby sub-library list based on the sub-library index, and determining whether the target standby sub-library is available;
[0089] Step S203: If the target standby sub-database is available, the transaction message is routed to the target standby sub-database;
[0090] Step S204: If the target standby sub-library is unavailable, the sub-library index is updated, and the process returns to the step of determining the target standby sub-library in the standby sub-library list based on the sub-library index.
[0091] In this embodiment, if the grayscale routing ratio is greater than or equal to the preset routing ratio, or the target sub-library does not match the available sub-library list, that is, the target sub-library is unavailable, the sub-library index is determined based on the hash value and the list length of the backup sub-library list in the first routing information. Specifically, the hash value is modulo the list length to obtain the sub-library index index.
[0092] After obtaining the sub-library index index, the target backup sub-library is determined in the backup sub-library list based on the sub-library index, and whether the target backup sub-library is available is determined, that is, the target backup sub-library is the sub-library corresponding to the sub-library index in the backup sub-library list, and whether the target backup sub-library belongs to the available sub-library list is determined. If it does, the target backup sub-library is available.
[0093] Among them, if the target backup sub-library is available, the transaction message is routed to the target backup sub-library; if the target backup sub-library is unavailable, the sub-library index is updated, and the step of determining the target backup sub-library in the backup sub-library list based on the sub-library index is returned to execute, that is, the sub-library index + 1 is obtained to obtain the updated sub-library index, and the target backup sub-library is determined in the backup sub-library list based on the updated sub-library index.
[0094] The message routing method proposed in this embodiment determines a shard index based on the hash value and the length of the backup shard list in the first routing information if the grayscale routing ratio is greater than or equal to the preset routing ratio, or if the target shard does not match the available shard list. The method then determines a target backup shard in the backup shard list based on the shard index and determines whether the target backup shard is available. If the target backup shard is available, the transaction message is routed to the target backup shard. If the target backup shard is unavailable, the method updates the shard index and returns to the step of determining the target backup shard in the backup shard list based on the shard index. A grayscale policy is set to perform grayscale verification on the transaction message. If the grayscale verification passes, the transaction message is routed using the first routing information corresponding to the grayscale policy, thereby improving the completeness of the grayscale verification of the transaction message through grayscale policy verification.
[0095] In a feasible implementation manner, after step S102, the message routing method may further include steps S301 to S302:
[0096] Step S301: If the transaction message does not match the grayscale policy, then obtain the configured account information corresponding to the transaction message based on the financial transaction cloud;
[0097] Step S302: If the configured account information exists in the grayscale database configuration, the transaction message is routed to the designated grayscale database corresponding to the grayscale database configuration.
[0098] In this embodiment, if the transaction message does not match the grayscale policy, the configuration account information corresponding to the transaction message is obtained based on the financial transaction cloud; that is, the configuration account information corresponding to the transaction message is obtained from the financial transaction cloud, and it is determined whether the configuration account information is configured in the grayscale database, so as to perform grayscale verification of the configuration account on the transaction message.
[0099] If the configured account information exists in the grayscale database configuration, it is determined that the transaction message has passed the grayscale verification of the configured account. At this time, the specified grayscale database corresponding to the grayscale database configuration is obtained, and the transaction message is routed to the specified grayscale database to implement the grayscale verification of the configured account of the transaction message, further improving the completeness of the grayscale verification.
[0100] In a feasible implementation manner, after step S102, the message routing method may further include steps S303 to S305:
[0101] Step S303: If the configured household information does not exist in the grayscale database configuration, then obtain the isolation configuration information in the configuration information;
[0102] Step S304: If the transaction message matches the isolation configuration information, obtain second routing information corresponding to the traffic isolation policy;
[0103] Step S305: routing the transaction message based on the second routing information.
[0104] In this embodiment, if the configured account information does not exist in the grayscale database configuration, the isolation configuration information in the configuration information is obtained. If the isolation configuration information exists in the configuration information, the traffic isolation strategy is executed on the transaction message. Specifically, it is determined whether the transaction message matches the isolation configuration information.
[0105] If the transaction message matches the isolation configuration information, second routing information corresponding to the traffic isolation policy is obtained; and the transaction message is routed based on the second routing information.
[0106] Specifically, the list of active sub-libraries is obtained, wherein the list of active sub-libraries is obtained in a similar manner to the list of available sub-libraries, except that the list of available sub-libraries uses the sub-library information in the first routing information (including the target sub-library and the backup sub-library), and the list of active sub-libraries uses the sub-library information in the second routing information, and the second routing information includes the target sub-library, the backup sub-library and the preset routing ratio.
[0107] If the grayscale routing ratio is less than the preset routing ratio in the second routing information, and the target sub-database in the second routing information matches the active sub-database list, the transaction message is routed to the target sub-database in the second routing information.
[0108] If the grayscale routing ratio is greater than or equal to the preset routing ratio in the second routing information, or the target sub-library in the second routing information does not match the active sub-library list, the index information is determined based on the hash value and the list length of the backup sub-library list in the second routing information; the target traffic isolation sub-library is determined in the backup sub-library list of the second routing information based on the index information; if the target traffic isolation sub-library is available, the transaction message is routed to the target traffic isolation sub-library; if the target traffic isolation sub-library is unavailable, the index information is updated, and the process returns to the step of determining the target traffic isolation sub-library in the backup sub-library list of the second routing information based on the index information.
[0109] It should be noted that if the configured account information does not exist in the Grayscale database configuration, the transaction message fails to be routed to the target sub-database, the transaction message fails to be routed to the target backup sub-database, and the transaction message fails to be routed based on the second routing information, then the conventional routing strategy is executed on the transaction message. Specifically, a sub-database is selected from the backup sub-database list for routing, where the backup sub-database can include all the backup sub-databases in the configuration information.
[0110] The message routing method proposed in this embodiment obtains the configuration account information corresponding to the transaction message based on the financial transaction cloud if the transaction message does not match the grayscale policy; then, if the configuration account information exists in the grayscale database configuration, the transaction message is routed to the designated grayscale database corresponding to the grayscale database configuration, so as to implement grayscale verification of the configuration account of the transaction message, further improving the completeness of the grayscale verification.
[0111] The message routing device provided in the embodiments of the present application, employing the message routing method of the aforementioned embodiments, can address the technical problem of improving the integrity of grayscale verification of messages. Compared to the prior art, the message routing device provided in the embodiments of the present application has the same beneficial effects as the message routing method provided in the aforementioned embodiments. Other technical features of the message routing device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.
[0112] The present application provides a message routing 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 to enable the at least one processor to execute the message routing method in the above-mentioned embodiment 1.
[0113] Reference below Figure 4 , which shows a schematic diagram of the structure of a message routing device suitable for implementing the embodiments of the present application. The message routing device in the embodiments 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), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The message routing device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0114] like Figure 4As shown, the message routing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the message routing device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. The communication device 1009 can allow the message routing device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a message routing 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 provided instead.
[0115] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising 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 via 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.
[0116] The message routing device provided in this application, employing the message routing method of the aforementioned embodiment, can address the technical problem of improving the integrity of grayscale verification of messages. Compared to the prior art, the message routing device provided in this application has the same beneficial effects as the message routing method provided in the aforementioned embodiment. Other technical features of the message routing device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0117] It should be understood that the various parts disclosed in this application can be implemented using 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.
[0118] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0119] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the message routing method in the above embodiment.
[0120] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0121] The computer-readable storage medium may be included in the message routing device; or may exist independently without being assembled into the message routing device.
[0122] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the message routing device, the message routing device enables the following: to obtain the recipient account corresponding to the transaction message, and to obtain the corresponding configuration information from the configuration center; if the recipient account does not match the whitelist information in the configuration information, then determine whether the transaction message matches the grayscale policy; if the transaction message matches the grayscale policy, then obtain the list of available sub-libraries and obtain the first routing information corresponding to the grayscale policy in the configuration information; based on the first routing information and the list of available sub-libraries, route the transaction message.
[0123] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0124] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0125] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0126] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described message routing method. This computer-readable storage medium can address the technical problem of improving the integrity of grayscale verification of messages. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the message routing method provided in the above-described embodiments, and are not further elaborated here.
[0127] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned message routing method when executed by a processor.
[0128] The computer program product provided in this application can solve the technical problem of how to improve the completeness of grayscale verification of messages. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the message routing method provided in the above embodiments, and will not be repeated here.
[0129] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A message routing method, characterized in that: The message routing method comprises the following steps: Obtain the recipient account corresponding to the transaction message and obtain the corresponding configuration information from the configuration center; If the recipient's account does not match the whitelist information in the configuration information, determine whether the transaction message matches the grayscale policy; If the transaction message matches the grayscale policy, obtain the list of available sub-databases and the first routing information corresponding to the grayscale policy in the configuration information; The transaction message is routed based on the first routing information and the available sub-library list.
2. The message routing method according to claim 1, wherein: The step of routing the transaction message based on the first routing information and the available sub-library list includes: Obtaining a hash value corresponding to a message key value of the transaction message, and determining a grayscale routing ratio based on the hash value; If the grayscale routing ratio is smaller than the preset routing ratio in the first routing information, and the target sub-database in the first routing information matches the available sub-database list, the transaction message is routed to the target sub-database.
3. The message routing method according to claim 2, wherein: After the step of determining the grayscale routing ratio based on the hash value, the message routing method further includes: If the grayscale routing ratio is greater than or equal to the preset routing ratio, or the target sub-library does not match the available sub-library list, determining the sub-library index based on the hash value and the length of the backup sub-library list in the first routing information; Determine a target standby sub-library in the standby sub-library list based on the sub-library index, and determine whether the target standby sub-library is available; If the target backup sub-database is available, routing the transaction message to the target backup sub-database; If the target standby sub-library is unavailable, the sub-library index is updated, and the process returns to the step of determining the target standby sub-library in the standby sub-library list based on the sub-library index.
4. The message routing method according to claim 1, wherein: The step of determining whether the transaction message matches the grayscale policy includes: Obtain the current message application corresponding to the transaction message based on the interface API of the financial transaction cloud, and obtain the grayscale database application instance corresponding to the grayscale strategy; Determine whether the current message application matches the grayscale database application instance, wherein if the current message application matches the grayscale database application instance, determine that the transaction message matches the grayscale policy.
5. The message routing method according to claim 4, wherein: The step of determining whether the transaction message matches the grayscale policy further includes: Obtaining the account number corresponding to the transaction message; Determine whether the account number is a bank member card, wherein if the account number is a bank member card, determine that the transaction message matches the grayscale policy.
6. The message routing method according to claim 1, wherein: After the step of determining whether the transaction message matches the grayscale policy, the message routing method further includes: If the transaction message does not match the grayscale policy, the configuration account information corresponding to the transaction message is obtained based on the financial transaction cloud; If the configured account information exists in the Grayscale database configuration, the transaction message is routed to the designated Grayscale database corresponding to the Grayscale database configuration.
7. The message routing method according to claim 6, wherein: After the step of obtaining the configured account information corresponding to the transaction message based on the financial transaction cloud, the message routing method further includes: If the configured household information does not exist in the grayscale database configuration, then obtain the isolation configuration information in the configuration information; If the transaction message matches the isolation configuration information, obtaining second routing information corresponding to the traffic isolation policy; The transaction message is routed based on the second routing information.
8. The message routing method according to any one of claims 1 to 7, wherein: The step of obtaining the list of available sub-libraries includes: Obtain the sub-database information in the first routing information, obtain the first active sub-database information based on the financial transaction cloud, and obtain the second active sub-database information through the corresponding database detection application; The available sub-library list is determined based on the sub-library information, the first active sub-library information, and the second active sub-library information in the first routing information.
9. A message routing device, characterized in that: The message routing device includes: a memory, a processor, and a message routing program stored in the memory and executable on the processor. When the message routing program is executed by the processor, the steps of the message routing method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a message routing program, and when the message routing program is executed by the processor, the steps of the message routing method according to any one of claims 1 to 8 are implemented.