Intelligent routing method, apparatus, and computer-readable storage medium
Patent Information
- Application Number
- CN202310740682.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-06-20
AI Technical Summary
[0005]本发明的主要目的在于提供一种智能路由方法、装置及计算机可读存储介质,旨在解决现有单一的路由模式导致路由效率低的技术问题
[0037]本发明通过在接收到业务网关的访问请求时,获取所述访问请求对应的访问信息;接着若所述访问信息与白名单不匹配,则确定所述访问请求对应的访问接口是否存在路由规则;而后若所述访问接口存在路由规则,则基于所述访问信息以及所述路由规则,获取所述访问请求对应的路由值;然后基于所述路由值以及所述访问接口对应的路由配置表,路由所述访问请求,可以通过自定义的路由规则获取到的路由值进行路由,以在复杂多变的输入信息中根据栏位某部分进行区间值或者指定值路由,通过不同场景配置不同的路由规则实现多路由场景并存,以满足多种多样的路由场景,提升了路由效率。
Smart Images

Figure CN116647503B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to an intelligent routing method, apparatus, and computer-readable storage medium. Background Technology
[0002] For both platform and deployment projects, different clients may have different implementations of the same function. In specific applications, different implementation scenarios may have different routing rules. For example, if the current class implements multiple interfaces, the routing rules for each interface will be different.
[0003] Existing routing solutions generally only have one routing mode. If the routing mode needs to be changed, the code needs to be modified and the routing rules of each interface need to be changed. Since user input information varies, including different key values such as customer number, account number, order number, and case number, a single routing mode cannot meet the needs of a variety of scenarios, resulting in low routing efficiency.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide an intelligent routing method, apparatus, and computer-readable storage medium, which aims to solve the technical problem of low routing efficiency caused by the existing single routing mode.
[0006] To achieve the above objectives, the present invention provides an intelligent routing method, which includes the following steps:
[0007] Upon receiving an access request from the business gateway, obtain the access information corresponding to the access request;
[0008] If the access information does not match the whitelist, then determine whether there are routing rules for the access interface corresponding to the access request;
[0009] If the access interface has routing rules, then based on the access information and the routing rules, the routing value corresponding to the access request is obtained;
[0010] The access request is routed based on the routing value and the routing configuration table corresponding to the access interface.
[0011] Further, the step of routing the access request based on the routing value and the routing configuration table corresponding to the access interface includes:
[0012] Determine the first route address corresponding to the route value in the route configuration table;
[0013] The access request is routed based on the first routing address.
[0014] Further, the step of determining the first route address corresponding to the route value in the route configuration table includes:
[0015] Obtain the matching rules corresponding to the routing configuration table;
[0016] If the matching rule is equal value matching, then determine the target keyword in the keyword of the routing configuration table that matches the routing value;
[0017] The routing address corresponding to the target keyword in the routing configuration table is used as the first routing address.
[0018] Furthermore, after the step of obtaining the matching rules corresponding to the routing configuration table, the intelligent routing method further includes:
[0019] If the matching rule is range matching, then the target keyword range to which the route value belongs is determined in the keyword range of the route configuration table;
[0020] The routing address corresponding to the target keyword range in the routing configuration table is used as the first routing address.
[0021] Further, the step of obtaining the matching rules corresponding to the routing configuration table includes:
[0022] Based on each route address in the routing configuration table, obtain the number of keywords corresponding to the keywords of the route address;
[0023] Based on the number of keywords, the matching rule is determined, wherein if the number of keywords is 1, the matching rule is determined to be equal value matching, and if the number of keywords is 2, the matching rule is determined to be range matching.
[0024] Further, the step of obtaining the routing value corresponding to the access request based on the access information and the routing rules includes:
[0025] Obtain the access encoding information corresponding to the access information;
[0026] The access encoding information is parsed based on the routing rules to obtain the routing value.
[0027] Furthermore, after the step of determining whether a routing rule exists for the access interface corresponding to the access request if the access information does not match the whitelist, the intelligent routing method further includes:
[0028] If the access interface corresponding to the access request does not have a routing rule, then obtain the routing configuration table corresponding to the access interface;
[0029] The access request is routed based on the second route address at a preset location in the routing configuration table.
[0030] Furthermore, after the step of obtaining the access information corresponding to the access request, the intelligent routing method further includes:
[0031] Obtain the whitelist corresponding to the access interface, and determine whether the access information exists in the whitelist;
[0032] If the access information does not exist in the whitelist, then it is determined that the access information does not match the whitelist;
[0033] If the access information exists in the whitelist, a third routing address is obtained from the whitelist based on the access information, and the access request is routed based on the third routing address.
[0034] Furthermore, to achieve the above objectives, the present invention also provides an intelligent routing device, the intelligent routing device comprising:
[0035] The system includes a memory, a processor, and an intelligent routing program stored in the memory and executable on the processor, wherein the intelligent routing program, when executed by the processor, implements the steps of the aforementioned intelligent routing method.
[0036] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing an intelligent routing program, which, when executed by a processor, implements the steps of the aforementioned intelligent routing method.
[0037] This invention obtains access information corresponding to an access request received from a business gateway. If the access information does not match a whitelist, it determines whether a routing rule exists for the access interface corresponding to the access request. If a routing rule exists for the access interface, it obtains a routing value corresponding to the access request based on the access information and the routing rule. Then, based on the routing value and the routing configuration table corresponding to the access interface, the access request is routed. Routing can be performed using routing values obtained through custom routing rules, allowing for range or specified value routing based on a portion of the field in complex and varied input information. By configuring different routing rules for different scenarios, multiple routing scenarios can coexist, satisfying diverse routing needs and improving routing efficiency. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the structure of the intelligent routing device in the hardware operating environment involved in the embodiments of the present invention;
[0039] Figure 2This is a flowchart illustrating the first embodiment of the intelligent routing method of the present invention.
[0040] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0041] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0042] like Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of an intelligent routing device in the hardware operating environment involved in the embodiments of the present invention.
[0043] The intelligent routing device in this embodiment of the invention can be a PC, or a mobile terminal device with display function such as a smartphone, tablet computer, or portable computer.
[0044] like Figure 1 As shown, the intelligent routing device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0045] Optionally, the smart router device may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and so on. Of course, the smart router device may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, and infrared sensor, which will not be elaborated upon here.
[0046] Those skilled in the art will understand that Figure 1 The terminal structure shown does not constitute a limitation on the intelligent routing device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0047] like Figure 1As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an intelligent routing program.
[0048] exist Figure 1 In the intelligent routing device shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client (user terminal) and communicate with the client; and the processor 1001 can be used to call the intelligent routing program stored in the memory 1005.
[0049] In this embodiment, the intelligent routing device includes: a memory 1005, a processor 1001, and an intelligent routing program stored in the memory 1005 and executable on the processor 1001. When the processor 1001 calls the intelligent routing program stored in the memory 1005, it performs the following operations:
[0050] Upon receiving an access request from the business gateway, obtain the access information corresponding to the access request;
[0051] If the access information does not match the whitelist, then determine whether there are routing rules for the access interface corresponding to the access request;
[0052] If the access interface has routing rules, then based on the access information and the routing rules, the routing value corresponding to the access request is obtained;
[0053] The access request is routed based on the routing value and the routing configuration table corresponding to the access interface.
[0054] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0055] Determine the first route address corresponding to the route value in the route configuration table;
[0056] The access request is routed based on the first routing address.
[0057] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0058] Obtain the matching rules corresponding to the routing configuration table;
[0059] If the matching rule is equal value matching, then determine the target keyword in the keyword of the routing configuration table that matches the routing value;
[0060] The routing address corresponding to the target keyword in the routing configuration table is used as the first routing address.
[0061] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0062] If the matching rule is range matching, then the target keyword range to which the route value belongs is determined in the keyword range of the route configuration table;
[0063] The routing address corresponding to the target keyword range in the routing configuration table is used as the first routing address.
[0064] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0065] Based on each route address in the routing configuration table, obtain the number of keywords corresponding to the keywords of the route address;
[0066] Based on the number of keywords, the matching rule is determined, wherein if the number of keywords is 1, the matching rule is determined to be equal value matching, and if the number of keywords is 2, the matching rule is determined to be range matching.
[0067] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0068] Obtain the access encoding information corresponding to the access information;
[0069] The access encoding information is parsed based on the routing rules to obtain the routing value.
[0070] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0071] If the access interface corresponding to the access request does not have a routing rule, then obtain the routing configuration table corresponding to the access interface;
[0072] The access request is routed based on the second route address at a preset location in the routing configuration table.
[0073] Furthermore, the processor 1001 can call the intelligent routing program stored in the memory 1005 and also perform the following operations:
[0074] Obtain the whitelist corresponding to the access interface, and determine whether the access information exists in the whitelist;
[0075] If the access information does not exist in the whitelist, then it is determined that the access information does not match the whitelist;
[0076] If the access information exists in the whitelist, a third routing address is obtained from the whitelist based on the access information, and the access request is routed based on the third routing address.
[0077] This invention also provides an intelligent routing method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the intelligent routing method of the present invention.
[0078] In this embodiment, the intelligent routing method includes:
[0079] Step S101: When an access request is received from the service gateway, the access information corresponding to the access request is obtained;
[0080] In this embodiment, a whitelist for routing and a routing configuration table for each routing interface (access interface) are preset. This whitelist can correspond one-to-one with the routing interface, that is, each routing interface corresponds to one whitelist, or one whitelist corresponds to all routing interfaces. The whitelist can be configured with a specified address corresponding to each access information.
[0081] In this embodiment, when the channel accesses the business gateway, such as the credit card business gateway, it can receive the corresponding access request through the business gateway. At this time, the access information corresponding to the access request is obtained. The access information can be the user information of the user accessing the business gateway. Specifically, the access information may include customer number, account number, card number, case number, etc.
[0082] Step S102: If the access information does not match the whitelist, determine whether there are routing rules for the access interface corresponding to the access request;
[0083] In this embodiment, when access information is obtained, the access information is compared with a whitelist to determine whether the access information matches the whitelist, that is, whether the access information exists in the whitelist. If the access information does not match the whitelist, it is determined whether the access interface corresponding to the access request has routing rules, that is, whether the access interface has routing value parsing rules.
[0084] Step S103: If the access interface has routing rules, then based on the access information and the routing rules, obtain the routing value corresponding to the access request;
[0085] In this embodiment, if the access interface has routing rules, meaning the access interface has been configured with routing value parsing rules, then the routing value corresponding to the access request is obtained based on the access information and the routing rules. Specifically, the corresponding routing value is retrieved from the access information according to the routing rules. For example, if the access information is a customer number, and the routing rule is the last two digits of the customer number, then the last two digits of the customer number are used as the routing value; if the access information is an account number, and the routing rule is the last two digits of the account number, then the last two digits of the account number are used as the routing value; if the access information is a card number, and the routing rule is the last two digits of the card number, then the last two digits of the card number are used as the routing value.
[0086] Step S104: Based on the routing value and the routing configuration table corresponding to the access interface, route the access request.
[0087] In this embodiment, after obtaining the routing value, the routing configuration table corresponding to the access interface is obtained, and the access request is routed based on the routing value and the routing configuration table. Specifically, the first routing address (URL) is obtained from the routing configuration table based on the routing value, and the access request is routed based on the first routing address.
[0088] The intelligent routing method proposed in this embodiment obtains access information corresponding to the access request when it receives an access request from a business gateway. If the access information does not match a whitelist, it determines whether a routing rule exists for the access interface corresponding to the access request. If a routing rule exists for the access interface, it obtains a routing value corresponding to the access request based on the access information and the routing rule. Then, based on the routing value and the routing configuration table corresponding to the access interface, it routes the access request. Routing can be performed using routing values obtained through custom routing rules, allowing for range or specified value routing based on a portion of the field in complex and varied input information. By configuring different routing rules for different scenarios, multiple routing scenarios can coexist, satisfying diverse routing needs and improving routing efficiency.
[0089] Based on the first embodiment, a second embodiment of the intelligent routing method of the present invention is proposed. In this embodiment, step S104 includes:
[0090] Step S201: Determine the first route address corresponding to the route value in the route configuration table;
[0091] Step S202: Based on the first routing address, route the access request.
[0092] In this embodiment, after obtaining the routing value, the routing configuration table corresponding to the access interface is obtained, and the first routing address corresponding to the routing value is determined in the routing configuration table. Specifically, according to the matching rules corresponding to the routing configuration table, the first routing address corresponding to the routing value is matched in the routing configuration table, and then the access request is based on the first routing address.
[0093] The intelligent routing method proposed in this embodiment determines the first routing address corresponding to the routing value in the routing configuration table; then, based on the first routing address, it routes the access request. The routing address can be accurately obtained from the routing configuration table according to the routing value, and routing can be performed using the routing value obtained through custom routing rules. This allows for routing based on a range or specified value of a field in complex and ever-changing input information. By configuring different routing rules for different scenarios, multiple routing scenarios can coexist, satisfying a variety of routing needs and improving routing efficiency.
[0094] Based on the second embodiment, a third embodiment of the intelligent routing method of the present invention is proposed. In this embodiment, step 201 includes:
[0095] Step S301: Obtain the matching rules corresponding to the routing configuration table;
[0096] Step S302: If the matching rule is equal value matching, then determine the target keyword in the keyword of the routing configuration table that matches the routing value;
[0097] Step S303: Use the routing address corresponding to the target keyword in the routing configuration table as the first routing address.
[0098] In this embodiment, after obtaining the route value, the routing configuration table corresponding to the access interface is obtained, and the matching rule corresponding to the routing configuration table is obtained. Further, in a possible implementation, step S301 includes:
[0099] Step S3011: Based on each route address in the routing configuration table, obtain the number of keywords corresponding to the keywords of the route address;
[0100] Step S3012: Based on the number of keywords, determine the matching rule, wherein if the number of keywords is 1, the matching rule is determined to be equal value matching, and if the number of keywords is 2, the matching rule is determined to be range matching.
[0101] In this embodiment, after obtaining the routing configuration table, the number of keywords corresponding to each routing address is obtained based on each routing address in the routing configuration table. For example, if the keywords corresponding to the routing address are 01 and 25, and the access information is a customer number, it means that customers whose last two digits of the customer number are 01 to 25 are routed to the routing address. In this case, the number of keywords is 2. If the access information is a case number, and the keyword corresponding to the routing address is 01, it means that if the last two digits of the case number are equal to 01, the customer is routed to that routing address. In this case, the number of keywords is 1.
[0102] Next, based on the number of keywords, the matching rule is determined. If the number of keywords is 1, the matching rule is determined to be equal value matching. If the number of keywords is 2, the matching rule is determined to be range matching. Thus, the matching rule corresponding to the routing configuration table can be accurately obtained according to the number of keywords, so as to accurately obtain the first route address in the routing configuration table according to the route value and the matching rule.
[0103] In this embodiment, when the matching rule corresponding to the routing configuration table is obtained, if the matching rule is an equal-value match, then the target keyword that matches the routing value in the keywords of the routing configuration table is determined, that is, the target keyword that is the same as the routing value is determined in the keywords of the routing configuration table; and the routing address corresponding to the target keyword in the routing configuration table is used as the first routing address, that is, the routing address corresponding to the target keyword is obtained in the routing configuration table and used as the first routing address, so as to accurately obtain the first routing address in the routing configuration table according to the routing value and the matching rule.
[0104] Furthermore, in one possible implementation, after step S301, the intelligent routing method further includes:
[0105] Step S304: If the matching rule is range matching, then determine the target keyword range to which the route value belongs in the keyword range of the route configuration table;
[0106] Step S305: Use the routing address corresponding to the target keyword range in the routing configuration table as the first routing address.
[0107] In this embodiment, when the number of keywords is 2, the matching rule of the routing configuration table is range matching. At this time, the target keyword range to which the routing value belongs is determined in the keyword range of the routing configuration table. For example, if the access information is a customer number, the keyword range corresponding to the routing address includes keywords from 01 to 25. If the last digit of the customer number is 20, then 01 to 25 is the target keyword range.
[0108] After obtaining the target keyword range, the corresponding route address is retrieved from the routing configuration table, and the route address corresponding to the target keyword range is used as the first route address. Thus, the first route address can be accurately obtained from the routing configuration table based on the route value and the target keyword range, thereby improving routing efficiency.
[0109] The intelligent routing method proposed in this embodiment obtains the matching rules corresponding to the routing configuration table; then, if the matching rule is an equal-value match, it determines the target keyword in the keywords of the routing configuration table that matches the routing value; then, it uses the routing address corresponding to the target keyword in the routing configuration table as the first routing address. The first routing address can be accurately obtained from the routing configuration table based on the routing value and the target keyword. By configuring different routing rules for different scenarios, multiple routing scenarios can coexist, thereby meeting a variety of routing needs and further improving routing efficiency.
[0110] Based on the first embodiment, a fourth embodiment of the intelligent routing method of the present invention is proposed. In this embodiment, step S103 includes:
[0111] Step S401: Obtain the access encoding information corresponding to the access information;
[0112] Step S402: Parse the access encoding information based on the routing rules to obtain the routing value.
[0113] In this embodiment, if the access interface has routing rules, that is, the access interface corresponding to the access request has been configured with a corresponding routing configuration table, the access encoding information corresponding to the access information is obtained. Specifically, the access encoding information is obtained according to the routing rules. For example, if the routing rule is specific field data of the customer number, the access encoding information is the customer number; if the routing rule is specific field data of the account number, the access encoding information is the account number; if the routing rule is specific field data of the card number, the access encoding information is the card number; if the routing rule is specific field data of the case number, the access encoding information is the case number.
[0114] Next, the access encoding information is parsed based on the routing rules to obtain the routing value. For example, if the routing rule is specific field data of the customer number, the routing value is specific field data of the customer number; if the routing rule is specific field data of the account number, the routing value is specific field data of the account number; if the routing rule is specific field data of the card number, the routing value is specific field data of the card number; if the routing rule is specific field data of the case number, the routing value is specific field data of the case number.
[0115] The intelligent routing method proposed in this embodiment obtains the access encoding information corresponding to the access information; then, it parses the access encoding information based on the routing rules to obtain the routing value. The routing value can be accurately obtained according to the access encoding information and the routing rules, so as to accurately obtain the corresponding routing address based on the routing value, thereby further improving routing efficiency.
[0116] Based on the first embodiment, a fifth embodiment of the intelligent routing method of the present invention is proposed. In this embodiment, after step S102, the intelligent routing method further includes:
[0117] Step S501: If the access interface corresponding to the access request does not have a routing rule, then obtain the routing configuration table corresponding to the access interface.
[0118] Step S502: Based on the second routing address at a preset position in the routing configuration table, route the access request.
[0119] In this embodiment, if the access interface corresponding to the access request does not have routing rules, that is, the access interface does not have a routing value parsing rule, then the routing configuration table corresponding to the access interface is directly obtained.
[0120] After obtaining the routing configuration table, the access request is routed based on the second routing address at a preset position in the routing configuration table. Specifically, the second routing address at a preset position in the routing configuration table can be obtained, for example, the first routing address in the routing configuration table can be used as the second routing address, and the access request can be routed based on the second routing address.
[0121] The intelligent routing method proposed in this embodiment obtains the routing configuration table corresponding to the access interface if no routing rules exist for the access interface corresponding to the access request; then, it routes the access request based on the second routing address at a preset position in the routing configuration table. This method can route access requests based on the second routing address in the routing configuration table when no routing rules are set, thereby further improving routing efficiency.
[0122] Based on the above embodiments, a sixth embodiment of the intelligent routing method of the present invention is proposed. In this embodiment, after step S101, the intelligent routing method further includes:
[0123] Step S601: Obtain the whitelist corresponding to the access interface, and determine whether the access information exists in the whitelist;
[0124] Step S602: If the access information does not exist in the whitelist, then it is determined that the access information does not match the whitelist;
[0125] Step S603: If the access information exists in the whitelist, then obtain the third routing address from the whitelist based on the access information, and route the access request based on the third routing address.
[0126] In this embodiment, after obtaining the access information, a whitelist corresponding to the access interface is obtained, and it is determined whether the access information exists in the whitelist. If the access information does not exist in the whitelist, it is determined that the access information does not match the whitelist.
[0127] If access information exists in the whitelist, a third routing address is obtained from the whitelist based on the access information. That is, the routing address corresponding to the access information in the whitelist is used as the third routing address, and the access request is routed based on the third routing address.
[0128] The intelligent routing method proposed in this embodiment obtains a whitelist corresponding to the access interface and determines whether the access information exists in the whitelist. If the access information does not exist in the whitelist, it is determined that the access information does not match the whitelist. If the access information exists in the whitelist, a third routing address is obtained from the whitelist based on the access information, and the access request is routed based on the third routing address. The access request can be routed through the routing address in the whitelist, further improving routing efficiency.
[0129] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an intelligent routing program, which, when executed by the processor, implements the steps of the intelligent routing method as described above.
[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0131] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0133] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A smart routing method, characterized in that, The intelligent routing method includes the following steps: Upon receiving an access request from the business gateway, obtain the access information corresponding to the access request; If the access information does not match the whitelist, then determine whether there are routing rules for the access interface corresponding to the access request; If the access interface has routing rules, then based on the access information and the routing rules, the routing value corresponding to the access request is obtained; The access request is routed based on the routing value and the routing configuration table corresponding to the access interface. The access information includes the customer number, account number, card number, and case number corresponding to the access request. The step of obtaining the routing value corresponding to the access request based on the access information and the routing rules includes: Obtain the access encoding information corresponding to the access information; The access encoding information is parsed based on the routing rules to obtain the routing value. Wherein, when the routing rule is specific field data of a customer number, the access encoding information is the customer number, and the routing value is specific field data of the customer number; when the routing rule is specific field data of an account number, the access encoding information is the account number, and the routing value is specific field data of the account number; when the routing rule is specific field data of an account number, the access encoding information is the account number, and the routing value is specific field data of the account number; when the routing rule is specific field data of a case number, the access encoding information is the case number, and the routing value is specific field data of the case number. The step of routing the access request based on the routing value and the routing configuration table corresponding to the access interface includes: In the routing configuration table, a first routing address corresponding to the routing value is determined. Based on each routing address in the routing configuration table, the number of keywords corresponding to the routing address is obtained. Based on the number of keywords, a matching rule is determined. If the number of keywords is 1, the matching rule is determined to be equal-value matching; if the number of keywords is 2, the matching rule is determined to be range matching. If the matching rule is equal-value matching, a target keyword in the routing configuration table that matches the routing value is determined, and the routing address corresponding to the target keyword in the routing configuration table is used as the first routing address. If the matching rule is range matching, the target keyword range to which the routing value belongs is determined within the keyword range of the routing configuration table, and the routing address corresponding to the target keyword range in the routing configuration table is used as the first routing address. The access request is routed based on the first routing address.
2. The intelligent routing method as described in claim 1, characterized in that, After the step of determining whether a routing rule exists for the access interface corresponding to the access request if the access information does not match the whitelist, the intelligent routing method further includes: If the access interface corresponding to the access request does not have a routing rule, then obtain the routing configuration table corresponding to the access interface; The access request is routed based on the second route address at a preset location in the routing configuration table.
3. The intelligent routing method as described in any one of claims 1 to 2, characterized in that, After the step of obtaining the access information corresponding to the access request, the intelligent routing method further includes: Obtain the whitelist corresponding to the access interface, and determine whether the access information exists in the whitelist; If the access information does not exist in the whitelist, then it is determined that the access information does not match the whitelist; If the access information exists in the whitelist, a third routing address is obtained from the whitelist based on the access information, and the access request is routed based on the third routing address.
4. A smart routing device, characterized in that, The intelligent routing device includes: a memory, a processor, and an intelligent routing program stored in the memory and executable on the processor, wherein the intelligent routing program, when executed by the processor, implements the steps of the intelligent routing method as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an intelligent routing program, which, when executed by a processor, implements the steps of the intelligent routing method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Routing configuration implementation method and device, storage medium and electronic equipment
CN115632980A