Route rule updating method and device, computer device and storage medium

CN116471332BActive Publication Date: 2026-09-22CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310261908.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2026-09-22
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

[0004]在传统对路由进行控制的方法中,路由规则的变更需要对路由进行重新开发部署,对路由系统的正常运行产生较大影响

Benefits of technology

[0050]上述路由规则更新方法、装置、计算机设备、存储介质和计算机程序产品,在接收包含了业务端口标识的路由规则更新请求后,路由管理后台可以根据路由更新规则确定用户所需的规则更新类型,根据用户所需的规则更新类型获得对应的目标更新规则,将目标更新规则发送至应用服务器。应用服务器接收到路由管理后台发送的目标更新规则后,直接在应用服务器内对各种规则更新类型的目标更新规则进行动态编译加载操作即可得到更新路由,无需为了对路由进行重新开发部署而停机处理,当接收到与业务端口标识对应的业务端口发送的业务数据,即可根据更新路由对业务数据进行分发。通过路由管理后台和应用服务器的协同配合,对于各种不同规则更新类型的路由规则都可以在应用服务器不停机的情况下实现动态更新,提高了路由规则更新的简便性和系统运行的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471332B_ABST
    Figure CN116471332B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of mobile Internet, and specifically discloses a routing rule updating method and device, computer equipment, storage medium and computer program product. The method comprises: receiving a routing rule updating request, the routing rule updating request containing a service port identifier; determining a rule updating type according to the routing rule updating request; obtaining a target updating rule based on the rule updating type, sending the target updating rule and the service port identifier to an application server, receiving the target updating rule and the service port identifier by the application server, performing a dynamic compiling and loading operation on the target updating rule to obtain an updating route, and distributing service data based on the updating route and the service port identifier. The method can realize dynamic updating of routing rules without stopping the application server, and improves the simplicity of routing rule updating and the stability of system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mobile internet technology, and in particular to a routing rule update method, apparatus, computer device, storage medium, and computer program product. Background Technology

[0002] With the development of social informatization and banking technology, especially the development of mobile Internet in recent years, the transaction volume of mobile payment has increased rapidly. The banking system is handling more and more business, and the requirements for the disaster recovery capability, transaction diversion capability and multi-center active-active capability of the banking system are becoming higher and higher.

[0003] In the process of building multi-active and disaster recovery systems and implementing multi-center traffic control in banks, flexible transaction routing and adjustment are required. This includes switching transactions from a disaster-affected data center to a normal data center and controlling the proportion of transaction traffic across different data centers. In this context, routing control at the transaction access point becomes crucial.

[0004] In traditional methods of controlling routing, changes to routing rules require the redevelopment and redeployment of the routing system, which has a significant impact on its normal operation. Summary of the Invention

[0005] Therefore, it is necessary to provide a routing rule update method, apparatus, computer device, computer-readable storage medium, and computer program product that can dynamically update routing rules without interrupting operation, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a routing rule update method, applied to a routing management backend, the method comprising:

[0007] Receive a routing rule update request, wherein the routing rule update request includes a service port identifier;

[0008] Determine the rule update type based on the routing rule update request;

[0009] Based on the rule update type, a target update rule is obtained, and the target update rule and the business port identifier are sent to the application server. The application server receives the target update rule and the business port identifier, performs dynamic compilation and loading operations on the target update rule to obtain an update route, and distributes business data based on the update route and the business port identifier.

[0010] In one embodiment, the rule update type includes rule adjustment update; obtaining the target update rule based on the rule update type includes:

[0011] If the rule update type is a rule adjustment update, then obtain the rule adjustment content;

[0012] Retrieve existing routing rules to be updated from the cache library based on the service port identifier;

[0013] Based on the rule adjustment content, the routing rule to be updated is adjusted and updated to obtain the target update rule.

[0014] In one embodiment, the rule update type update includes simple rule addition update;

[0015] Obtaining the target update rule based on the rule update type includes:

[0016] If the rule update type is a simple rule addition update, then obtain the newly added rule content;

[0017] Obtain the corresponding routing rule template based on the service port identifier;

[0018] Target update rules are generated based on the routing rule template and the newly added content of the rules.

[0019] In one embodiment, the rule update type update includes complex rule addition updates, and obtaining the target update rule based on the rule update type includes:

[0020] If the rule update type is a complex rule addition update, then the target update rule uploaded by the user will be received.

[0021] Secondly, this application also provides a routing rule update method, applied to an application server, the method comprising:

[0022] Receive target update rules and service port identifiers sent by the routing management backend; wherein, the routing management backend receives routing rule update requests, the routing rule update requests containing service port identifiers, the rule update type is determined according to the routing rule update requests, and the target update rule is obtained based on the rule update type;

[0023] The target update rule is dynamically compiled and loaded to obtain the update route;

[0024] Service data is distributed based on the updated route and the service port identifier.

[0025] In one embodiment, the step of dynamically compiling and loading the target update rule to obtain the update route includes:

[0026] The target update rule is dynamically compiled using a preset compilation method to obtain the compiled update rule;

[0027] The compilation and update rules are loaded into the running virtual machine using a preset loader to obtain the update route.

[0028] In one embodiment, after the step of receiving the target update rule and service port identifier sent by the routing management backend, the method further includes:

[0029] Determine the rule update type of the target update rule;

[0030] If the rule update type of the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified.

[0031] When the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the update route is performed.

[0032] Thirdly, this application also provides a routing rule update apparatus, the apparatus comprising:

[0033] The request receiving module is used to receive routing rule update requests, which contain the service port identifier.

[0034] The update type confirmation module is used to determine the rule update type based on the routing rule update request. The rule update type includes rule adjustment update and rule addition update.

[0035] The update rule sending module is used to obtain a target update rule based on the rule update type, send the target update rule and the service port identifier to the application server, the application server obtains the target update rule and the service port identifier, performs dynamic compilation and loading operation on the target update rule to obtain an update route, and distributes service data based on the update route and the service port identifier.

[0036] In one embodiment, the rule update type includes rule adjustment update, and the update rule sending module is further configured to: if the rule update type is rule adjustment update, obtain rule adjustment content; obtain existing routing rules to be updated from the cache library according to the service port identifier; adjust and update the routing rules to be updated based on the rule adjustment content to obtain the target update rule.

[0037] In one embodiment, the rule update type update includes simple rule addition update; the update rule sending module is further configured to: if the rule update type is simple rule addition update, then search for the corresponding routing rule template from the cache library according to the service port identifier; and generate a target update rule based on the routing rule template.

[0038] In one embodiment, the rule update type update includes complex rule addition update, and the update rule sending module is further configured to: if the rule update type is complex rule addition update, then receive the target update rule uploaded by the user.

[0039] Fourthly, this application also provides a routing rule update apparatus, the apparatus comprising:

[0040] The rule receiving module is used to receive target update rules and service port identifiers sent by the routing management backend; wherein, the routing management backend receives routing rule update requests, the routing rule update requests include service port identifiers, the rule update type is determined according to the routing rule update requests, and the target update rule is obtained based on the rule update type;

[0041] A dynamic compilation and loading module is used to dynamically compile and load the target update rule to obtain the update route;

[0042] The data distribution module is used to distribute service data based on the updated route and the service port identifier.

[0043] In one embodiment, the dynamic compilation and loading module is further configured to:

[0044] The target update rule is dynamically compiled using a preset compilation method to obtain a compiled update rule; the compiled update rule is then loaded into the running virtual machine using a preset loader to obtain an update route.

[0045] In one embodiment, the device further includes:

[0046] The verification module is used to determine the rule update type of the target update rule; if the rule update type of the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified; when the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the update route is executed.

[0047] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0048] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0049] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0050] The aforementioned routing rule update method, apparatus, computer equipment, storage medium, and computer program product, upon receiving a routing rule update request containing a service port identifier, allow the routing management backend to determine the user's required rule update type based on the routing update rules, obtain the corresponding target update rule based on the user's required rule update type, and send the target update rule to the application server. Upon receiving the target update rule from the routing management backend, the application server can directly perform dynamic compilation and loading operations on the target update rules for various rule update types within the application server to obtain the updated route. This eliminates the need for downtime for redeveloping and deploying the route. When service data is received from the service port corresponding to the service port identifier, the service data can be distributed according to the updated route. Through the collaborative efforts of the routing management backend and the application server, routing rules for various rule update types can be dynamically updated without downtime of the application server, improving the simplicity of routing rule updates and the stability of system operation. Attached Figure Description

[0051] Figure 1 This is a diagram illustrating the application environment of a routing rule update method in one embodiment.

[0052] Figure 2 This is a flowchart illustrating a routing rule update method in one embodiment;

[0053] Figure 3 This is a flowchart illustrating the steps of obtaining the target update rule based on the rule update type in one embodiment.

[0054] Figure 4 This is a flowchart illustrating the steps for obtaining the target update rule based on the rule update type in another embodiment;

[0055] Figure 5 This is a flowchart illustrating the routing rule update method in another embodiment;

[0056] Figure 6 This is a flowchart illustrating the routing rule update method in another embodiment;

[0057] Figure 7 This is a flowchart illustrating the routing rule update method in another embodiment;

[0058] Figure 8 This is a diagram illustrating the application environment of the routing rule update method in another embodiment;

[0059] Figure 9 This is a structural block diagram of a routing rule update device in one embodiment;

[0060] Figure 10This is a structural block diagram of a routing rule update device in another embodiment;

[0061] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0064] The routing rule update method provided in this application can be applied to, for example, Figure 1 The application environment is shown. The routing management backend 102 communicates with the application server 104 via a network. A data storage system can store the data that the routing management backend 102 needs to process. The data storage system can be integrated into the routing management backend 102 or placed on a cloud or other network server. The routing management backend 102 receives routing rule update requests triggered by users. These requests include a business port identifier. Based on the request, the backend determines the rule update type, obtains the target update rule, and sends the target update rule and the business port identifier to the application server 104. The application server 104 receives the target update rule and the business port identifier, performs dynamic compilation and loading of the target update rule to obtain the updated route, and distributes the business data based on the updated route and the business port identifier. The routing management backend 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The application server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0065] In one embodiment, such as Figure 2 As shown, a routing rule update method is provided, which is applied to... Figure 1 Taking the routing management backend in [the system] as an example, the steps are as follows:

[0066] Step 202: Receive a routing rule update request. The routing rule update request includes the service port identifier.

[0067] Routing refers to the process by which a router receives a data packet from one interface, directs it based on its destination address, and forwards it to another interface. In a business routing system, different business scenarios correspond to different business data processing channels. This channel can be considered the route corresponding to that business scenario, responsible for receiving business data from the business port and distributing the business data to various data centers according to certain routing rules.

[0068] A route typically includes, but is not limited to, the following: outgoing call node, route order (priority), processing strategy after route matching, one or more routing rules, and the relationships between routing rules. Routing rules can be related by either OR or AND. For example, if a route contains multiple rules, an AND relationship means that the route is successfully matched only if all rules are met, while an OR relationship means that the route is successfully matched if only one rule is matched.

[0069] Routing rules generally include, but are not limited to, the following: rule matching logic code, rule matching attributes, and rule matching attribute values. Taking request message rule matching logic as an example, the matching process of a routing rule is as follows: obtain the value of the corresponding field in the message based on the rule matching attribute field, and then compare the obtained field value with the attribute value configured in the routing rule. If the two match, it means that the routing rule has been successfully matched.

[0070] A routing rule update request is a request triggered by a user when they need to update the routing rules in the application server. Specifically, when a user needs to update the routing rules in the application server, they can trigger the generation of a routing rule update request through the interface displayed by the routing manager. The routing rule update request contains a service port identifier, which is used to identify the port of the service access terminal. The routing management backend receives the routing rule update request generated by the user.

[0071] Step 204: Determine the rule update type based on the routing rule update request.

[0072] Rule update type refers to the type of routing rule that needs to be updated. Different user needs result in different types of routing rule updates. Generally, rule update types can be divided into adjustment update type and new update type. Adjustment update type refers to rule update type that modifies the content of existing routing rules in the application server, while new update type refers to rule update type that completely adds a new routing rule to the application server.

[0073] Specifically, after receiving a routing rule update request, the routing management backend determines the type of rule update that the user needs to update based on the request identifier of the routing rule update request.

[0074] Step 206: Based on the rule update type, obtain the target update rule, send the target update rule and the business port identifier to the application server, the application server receives the target update rule and the business port identifier, performs dynamic compilation and loading operation on the target update rule to obtain the update route, and distributes the business data based on the update route and the business port identifier.

[0075] The application server, or gateway server, is used to receive business data sent from each business port and distribute the business data to the corresponding data center according to routing rules.

[0076] Specifically, the routing management backend, based on the determined rule update type, obtains the corresponding target update rule, binds the target update rule with the business port identifier, and sends it to the application server. Upon receiving the target update rule and business port identifier, the application server, without downtime, dynamically compiles and loads the target update rule using its internally configured route resolver, determining the processing chain including route sequence number, route node, route rule, and relationships between route rules, to obtain the final update route. Upon receiving business data transmitted from the business port, the application server determines the corresponding update route based on the business port identifier and distributes it accordingly.

[0077] In the above routing rule update method, after receiving a routing rule update request containing the service port identifier, the routing management backend can determine the required rule update type based on the routing update rules, obtain the corresponding target update rule based on the required rule update type, and send the target update rule to the application server. Upon receiving the target update rule from the routing management backend, the application server can directly perform dynamic compilation and loading operations on the target update rules for various rule update types within the application server to obtain the updated route. This eliminates the need for downtime for redeveloping and deploying the route. When business data is received from the business port corresponding to the service port identifier, the business data can be distributed according to the updated route. Through the collaborative efforts of the routing management backend and the application server, routing rules for various rule update types can be dynamically updated without downtime of the application server, improving the simplicity of routing rule updates and the stability of system operation.

[0078] In one embodiment, the rule update type includes rule adjustment updates, such as... Figure 3 As shown, based on the rule update type, the target update rule is obtained, including:

[0079] Step 302: If the rule update type is rule adjustment update, then obtain the rule adjustment content.

[0080] Rule adjustment and updates refer to the update operation that adjusts existing routing rules in the application server. Adjustments can be made to the content of existing routing rules, such as adjusting the data distribution ratio in each data center or changing the data center for business data distribution, or they can be recombined from existing routing rules. It's important to understand that rule adjustment and updates do not change the number of routing rules in the application server, nor do they add new routing rules.

[0081] Specifically, if the routing management backend determines that the rule update type corresponding to the rule update request is a rule adjustment update, it will obtain the rule adjustment content.

[0082] In one embodiment, the user logs into the visual interface of the routing management backend, selects the routing rule to be adjusted in the interface, and then adjusts the content that needs to be adjusted in the routing rule through the interface. The routing management backend obtains the content input by the user based on the visual interface and determines the content as the rule adjustment content.

[0083] Step 304: Obtain the existing routing rules to be updated from the cache library based on the service port identifier.

[0084] The cache library is a database used to store routing rules. As you can understand, the cache library records all the routing rules in the application server, which is beneficial for the reuse of each routing rule.

[0085] Specifically, the routing management backend retrieves the existing routing rule corresponding to the service port identifier from the cache library based on the service port identifier, and identifies the routing rule as the routing rule to be updated.

[0086] Step 306: Adjust and update the routing rule to be updated based on the rule adjustment content to obtain the target update rule.

[0087] Specifically, the routing management backend adjusts the content of the routing rule to be updated based on the obtained rule adjustment content, resulting in the updated target rule. Understandably, if the rule adjustment content modifies only a portion of the routing rule to be updated, such as distribution ratios or data centers, the rule adjustment content is then inserted into the corresponding location within the routing rule to be updated. If the rule adjustment content involves recombining routing rules, the routing rule to be updated is recombined according to the combination method specified in the rule adjustment content.

[0088] In the above embodiments, when the rule update type corresponding to the routing rule update request is rule adjustment update, the routing management backend obtains the existing routing rules to be updated according to the business port identifier, uses the obtained rule adjustment content to adjust and update the routing rules to be updated, and obtains the target update rule, which provides a basis for the application server to dynamically update the routes according to the target update rule.

[0089] As business operations change and expand, routing rules not only require adjustments but also new additions. Therefore, in one embodiment, rule update types include simple rule additions and updates, such as... Figure 4 As shown, based on the rule update type, the target update rule is obtained, including:

[0090] Step 402: If the rule update type is simple rule addition update, then obtain the newly added content of the rule.

[0091] In this context, "simple rule addition and update" refers to adding some general, simple routing rules to the application server. The difference between the target update rule and the existing routing rules in the application server lies in their different rule matching attributes. Examples include routing rules based on business service codes or routing rules based on business service identifiers. The added content of the rule is precisely the rule matching attribute that needs to be changed.

[0092] Specifically, after the routing management backend determines that the rule update type corresponding to the rule update request is a simple rule addition update, it obtains the rule matching attributes that need to be changed.

[0093] In one embodiment, the user logs into the visualization interface of the routing management backend, enters the business port identifier and selects the rule update type in the visualization interface, and enters the rule matching attribute to be changed in the rule addition window. The routing management backend obtains the content entered by the user and determines the content as the rule addition content.

[0094] Step 404: Obtain the corresponding routing rule template based on the service port identifier.

[0095] Among them, the routing rule template is a standardized template corresponding to the routing rule. It contains commonly used template information for routing rules in this business scenario and can be used to generate general routing rules for this business scenario.

[0096] Specifically, the routing management backend searches for the corresponding routing rule template in the routing rule memory container based on the business port identifier.

[0097] Step 406: Generate target update rules based on the routing rule template and the newly added rule content.

[0098] Specifically, the routing management backend calls the internally configured low-code platform to generate a new route matching rule in the rule memory container based on the obtained route rule template and the newly added rule content. This route matching rule is then designated as the target update rule. Understandably, the target update rule differs from existing route rules only in its rule matching attributes; its rule matching logic code remains unchanged.

[0099] Let's take the request message rule matching logic as an example. For instance, if there's an existing routing rule called the message-service identifier rule, under this rule, the application server will match the service identifier in the retrieved message and distribute the service data to the corresponding data center. If a new routing rule called the message-service code rule is added, under this rule, the application server will match the service code in the retrieved message and distribute the service data to the corresponding data center. It can be seen that although the existing routing rule and the newly added routing rule are two different routing rules, their rule matching logic is the same: retrieving a field value from the message and matching it with a preset value. Therefore, it can be considered that the rule matching logic code of the existing and newly added routing rules has not changed; only the rule matching attributes have changed.

[0100] In the above embodiments, when the rule update type corresponding to the routing rule update request is a simple rule addition update, the routing management backend calls its own low-code platform to generate the corresponding target update rule based on the obtained rule addition content and routing rule template. This effectively reduces the difficulty of generating routing rules and provides a foundation for the application server to dynamically update the route according to the target update rule.

[0101] Furthermore, in one embodiment, the rule update type update includes complex rule addition update. Based on the rule update type, the target update rule is obtained, including: if the rule update type is complex rule addition update, then the target update rule uploaded by the user is received.

[0102] Among them, adding and updating complex rules refers to adding complex or specific routing rules to the application server. For example, obtaining the organization number by a specific field of a business service and then distributing routing rules based on the organization number. The difference between the target update rule obtained from adding and updating complex rules and the existing routing rules in the application server is that the target update rule and the existing routing rules have different rule matching logic code.

[0103] Taking request message rule matching logic as an example, if the existing routing rule obtains the corresponding field from the message and matches it with the preset field, and now the user needs to add a new route to obtain a certain field from the HTTP request header for matching, then it can be considered that the matching logic of the routing rule has changed.

[0104] Understandably, since adding or updating complex rules will change the rule matching logic of routing rules, the target update rules corresponding to adding or updating complex rules are uploaded by the users themselves.

[0105] Specifically, the routing management backend determines that the rule update request corresponds to a complex rule addition update, receives the target update rule uploaded by the user, sends the target update rule to the application server for processing to obtain the new route and apply it.

[0106] In this embodiment, when the rule update type corresponding to the routing rule update request is a complex rule addition update, the routing management backend directly receives the target update rule uploaded by the user, sends the target update rule to the application server for processing to obtain a new route and apply it. This can realize the dynamic addition of routing rules without stopping the application server, improving the simplicity of routing rule updates and the stability of system operation.

[0107] In one embodiment, such as Figure 5 As shown, a method for updating routing rules is provided. Taking the application of this method to an application server as an example, the method includes:

[0108] Step 502: Receive the target update rule and service port identifier sent by the routing management backend; wherein, the routing rule update request is received through the routing management backend, the routing rule update request contains the service port identifier, the rule update type is determined according to the routing rule update request, and the target update rule is obtained based on the rule update type.

[0109] Specifically, the application server receives the target update rules and service port identifiers sent by the routing management backend. It is understood that the specific method for generating the target update rules has already been described in the above embodiments and will not be repeated here.

[0110] Step 504: Perform dynamic compilation and loading of the target update rules to obtain the update route.

[0111] Among them, the dynamic compilation and loading operation is the route generation operation used by the application server to generate corresponding routes according to the routing rules.

[0112] Specifically, after receiving the target update rule, the application server calls the route resolver to dynamically compile the target update rule, obtain the compiled route rule, and then loads the compiled route rule to obtain the updated route.

[0113] Step 506: Distribute service data based on updated routes and service port identifiers.

[0114] Specifically, after the application server obtains the updated route, it binds the updated route with the service port identifier locally. When it receives the service data transmitted from each service port, it matches the identifier to be matched for each service port with the service port identifier corresponding to the updated route. If the match is successful, the service data is distributed to the corresponding data center according to the updated route.

[0115] The above-described routing rule update method allows the application server to dynamically compile the target update rule and business port identifier after receiving them from the routing management backend. Instead of shutting down, the application server uses its own configured route resolver to obtain the compiled routing rule. This compiled routing rule is then loaded to generate the updated route. The updated route is bound to the business port identifier and configured on the server. Subsequently, the updated route can be used to distribute the business data corresponding to the business port identifier. Through the collaborative efforts of the routing management backend and the application server, routing rules of various update types can be dynamically updated without shutting down the application server, improving the ease of routing rule updates and the stability of system operation.

[0116] Furthermore, in one embodiment, the dynamic compilation and loading operation of the target update rule to obtain the update route includes: dynamically compiling the target update rule using a preset compilation method to obtain the compiled update rule, and loading the compiled update rule into the running virtual machine through a preset loader to obtain the update route.

[0117] Among them, the preset compilation method is a compilation method that is pre-set by the designer according to the actual configuration of the application server. It is used to dynamically compile the received target update rules to obtain the compiled update rules.

[0118] In one embodiment, the default compilation method is to use the Java Virtual Machine to dynamically compile the target update rules.

[0119] Specifically, after receiving the target update rule, the application server calls the route resolver to dynamically compile the target update rule using a preset compilation method, resulting in a compiled update rule in bytecode. Then, a preset loader is used to dynamically load the compiled update rule into the running virtual machine, where it is used in conjunction with existing rules to obtain the update route.

[0120] In one embodiment, the virtual machine is a Java Virtual Machine.

[0121] In the above embodiments, the application server implements dynamic compilation and loading of target update rules through a route resolver, which can generate updated routes based on target update rules without stopping the system, thereby improving the ease of updating route rules and the stability of system operation.

[0122] Because the target update rule obtained from the addition and update of complex rules changes the rule matching logic code of the routing rule, therefore, in one embodiment, such as Figure 6 As shown, the routing rule update method also includes the following steps:

[0123] Step 602: Determine the rule update type of the target update rule.

[0124] Specifically, after receiving the target update rule sent by the routing management backend, the application server determines the rule update type of the target update rule.

[0125] Step 604: If the rule update type of the target update rule is a complex rule addition update, then perform a feasibility verification on the target update rule.

[0126] Specifically, if the rule update type of the target update rule is a complex rule addition update, it means that the rule matching logic code in the target update rule is different from the rule matching logic code of the existing routing rules in the application server. In order to ensure the stability of the application server, the feasibility of the target update rule needs to be verified.

[0127] Step 606: When the feasibility verification of the target update rule is successful, perform a dynamic compilation and loading operation on the target update rule to obtain the update route.

[0128] Specifically, the application server verifies the feasibility of the target update rule. If the feasibility verification is successful, it means that the target update rule can generate a usable update route. The application server then dynamically compiles and loads the target update rule to obtain the update route. If the feasibility verification fails, it means that the rule matching logic code in the target update rule is incomplete or incorrect, and a usable update route cannot be generated based on the target update rule. In this case, the application server will stop dynamically compiling and loading the target update rule to avoid application server malfunctions due to update route generation errors, thus improving the stability of the application server.

[0129] With the development of social informatization and banking technology, especially the rapid growth of mobile internet in recent years, the volume of mobile business services has increased rapidly. Banking systems are handling increasingly larger volumes of business, placing higher demands on their disaster recovery capabilities, transaction offloading capabilities, and multi-center active-active capabilities. In the process of building multi-active and disaster recovery systems and implementing multi-center traffic control in banks, flexible traffic offloading and adjustment of business services are necessary. This includes switching business services from a disaster-affected data center to a normal data center and controlling the proportion of business service traffic across different data centers.

[0130] Based on this, in one embodiment, such as Figure 7 As shown, a routing rule update method is provided, which can be applied to, for example, Figure 8 The following is a detailed explanation using the application scenario shown.

[0131] like Figure 8 As shown, the routing management backend 801 is connected to both the cache database 802 and the routing resolver 803 in the application server. The routing resolver 803 is connected to the routing matching platform 804 in the application server.

[0132] The routing management backend 801 provides functions for routing configuration, low-code development, and routing rule management. Routing configuration refers to configuring the configuration information of a single route, including route name, outbound data center node, route order, routing rules (one or more), relationships between routing rules (AND, OR, NOT), and routing processing links. Low-code development refers to configuring simple routing rules, such as service code routes and service identifier routes, through the low-code platform configured within the routing management backend. Routing rule management allows users to upload routing rules developed by developers and manage existing routing rules.

[0133] The route resolver 803 is pre-configured in the application server, providing functions such as route resolution, route refresh detection, and route rule loading. Route resolution refers to parsing routes in the cache database, combining the relationships between multiple route rules within a single route, and sorting the routes. Route refresh detection determines whether route rules have changed and whether the route information cached by the program matches the route information in the cache database 802; if changes have occurred, the route in the cache database 802 is loaded. Route rule loading refers to dynamically compiling and loading newly added single route rules.

[0134] The routing rule update method, applied in the above application scenarios, specifically includes the following steps:

[0135] The routing management backend receives routing rule update requests, which include service port identifiers. The type of rule update is determined based on the routing rule update request.

[0136] If the rule update type is rule adjustment update, it can be considered as changing the rule matching attribute value of an existing routing rule. The routing management backend obtains the rule adjustment content, retrieves the existing routing rule to be updated from the cache database according to the business port identifier, and updates the rule matching attribute value in the routing rule to be updated to obtain the target update rule.

[0137] If the rule update type is a simple rule addition update, then this update can be considered as requiring a new routing rule with different matching attribute values ​​from existing routing rules. The routing management backend retrieves the new rule content, obtains the corresponding routing rule template from the rule memory container in the cache database based on the business port identifier, and calls the low-code platform to automatically generate the target update rule based on the routing rule template and the new rule content.

[0138] If the rule update type is a complex rule addition update, the routing management backend directly receives the target update rule uploaded by the user.

[0139] After obtaining the target update rules from the routing management backend, the target update rules are sent to the cache database and the application server respectively.

[0140] After receiving the target update rule, the application server first determines the rule update type. If the update type is a rule adjustment update or a simple rule addition update, the route resolver dynamically compiles and loads the rule. Specifically, it calls the Java Virtual Machine (JVM) to compile the rule into bytecode, then calls the class loader to load the bytecode into the JVM to obtain the update route. Finally, it adds the matching rule to the route rule memory container. Understandably, a new rule can only be used with existing rules after it has been loaded into the JVM.

[0141] If the target update rule is a complex rule addition update, then the feasibility of the target update rule is checked. If the feasibility check of the target update rule is successful, the step of using the route resolver to dynamically compile and load the target update rule is executed. If the feasibility check of the target update rule is unsuccessful, then the generation of update routes based on the target update rule is stopped.

[0142] After the route resolver binds the obtained updated route with the service port identifier, it sends it to the route matching platform. When the route matching platform receives the service data distribution request generated by each service end, it matches the port identifier to be matched carried in the service data with the service port identifier of each route, and distributes the service data to the corresponding data center based on the successfully matched route.

[0143] The routing rule update method in this embodiment allows for two main approaches: First, existing routing rules in the application routing can be configured and modified through the routing management backend. Second, for non-existent routing rules, they can be added through either low-code implementation or by uploading them to the routing management backend after development. Newly added routing rules can be dynamically compiled, loaded, and take effect in real time. The entire routing change process achieves both dynamic adjustment of routing rules within a single transaction route and dynamic addition of routing rules, without requiring an application restart and having zero impact on transaction operations.

[0144] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0145] Based on the same inventive concept, this application also provides a routing rule updating apparatus for implementing the routing rule updating method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more routing rule updating apparatus embodiments provided below can be found in the limitations of the routing rule updating method described above, and will not be repeated here.

[0146] In one embodiment, such as Figure 9 As shown, a routing rule update device 900 is provided, which is set in the routing management backend, including: a request receiving module 901, an update type confirmation module 902, and an update rule sending module 903, wherein:

[0147] The request receiving module 901 is used to receive routing rule update requests, which contain the service port identifier.

[0148] The update type confirmation module 902 is used to determine the rule update type based on the routing rule update request. The rule update type includes rule adjustment update and rule addition update.

[0149] The update rule sending module 903 is used to obtain the target update rule based on the rule update type, send the target update rule and the business port identifier to the application server, the application server obtains the target update rule and the business port identifier, performs dynamic compilation and loading operation on the target update rule to obtain the update route, and distributes the business data based on the update route and the business port identifier.

[0150] The aforementioned routing rule update device, upon receiving a routing rule update request containing a service port identifier, allows the routing management backend to determine the required rule update type based on the routing update rules. It then obtains the corresponding target update rule based on the required update type and sends it to the application server. Upon receiving the target update rule from the routing management backend, the application server dynamically compiles and loads the target update rules for various rule update types within the application server to obtain the updated route. This eliminates the need for downtime for redeveloping and deploying the route. When service data is received from the service port corresponding to the service port identifier, the service data can be distributed according to the updated route. Through the collaborative efforts of the routing management backend and the application server, routing rules for various update types can be dynamically updated without downtime of the application server, improving the simplicity of routing rule updates and the stability of system operation.

[0151] In one embodiment, the rule update type includes rule adjustment update; the rule update sending module is further configured to: if the rule update type is rule adjustment update, obtain the rule adjustment content; obtain the existing routing rule to be updated from the cache library according to the service port identifier; adjust and update the routing rule to be updated based on the rule adjustment content to obtain the target update rule.

[0152] In one embodiment, the rule update type update includes simple rule addition update; the update rule sending module is further configured to: if the rule update type is simple rule addition update, obtain the new rule content; obtain the corresponding routing rule template according to the business port identifier; and generate the target update rule based on the routing rule template and the new rule content.

[0153] In one embodiment, the rule update type update includes complex rule addition update, and the update rule sending module is further configured to: if the rule update type is complex rule addition update, then receive the target update rule uploaded by the user.

[0154] In one embodiment, such as Figure 10 As shown, a routing rule update device 1000 is provided, which is set in an application server, including: a rule receiving module 1001, a dynamic compilation and loading module 1002, and a data distribution module 1003, wherein:

[0155] The rule receiving module 1001 is used to receive the target update rule and the service port identifier sent by the routing management backend. Specifically, it receives the routing rule update request through the routing management backend. The routing rule update request contains the service port identifier. The rule update type is determined according to the routing rule update request. Based on the rule update type, the target update rule is obtained.

[0156] The dynamic compilation and loading module 1002 is used to dynamically compile and load the target update rules to obtain the update route.

[0157] The data distribution module 1003 is used to distribute business data based on the updated route and the business port identifier.

[0158] The aforementioned routing rule update device, upon receiving the target update rule and service port identifier sent by the routing management backend, allows the application server to dynamically compile the target update rule using its own configured route resolver. This results in a compiled routing rule, which is then loaded to obtain an updated route. The updated route is then bound to the service port identifier and configured on the server. Subsequently, the updated route can be used to distribute the service data corresponding to the service port identifier. Through the collaborative efforts of the routing management backend and the application server, routing rules of various update types can be dynamically updated without shutting down the application server, improving the ease of routing rule updates and the stability of system operation.

[0159] In one embodiment, the dynamic compilation and loading module is further configured to: dynamically compile the target update rule using a preset compilation method to obtain the compiled update rule; and load the compiled update rule into the running virtual machine through a preset loader to obtain the update route.

[0160] In one embodiment, the routing rule update device further includes: a verification module, configured to determine the rule update type of the target update rule; if the rule update type of the target update rule is a complex rule addition update, then perform a feasibility verification on the target update rule; if the feasibility verification of the target update rule is successful, perform a step of dynamically compiling and loading the target update rule to obtain the updated route.

[0161] Each module in the aforementioned routing rule update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0162] In one embodiment, a computer device is provided, which may be a terminal integrating a routing management backend, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a routing rule update method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0163] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0164] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0165] Receive routing rule update requests, which include the service port identifier;

[0166] Determine the rule update type based on the routing rule update request;

[0167] Based on the rule update type, the target update rule is obtained, and the target update rule and the business port identifier are sent to the application server. The application server receives the target update rule and the business port identifier, performs dynamic compilation and loading operations on the target update rule to obtain the update route, and distributes the business data based on the update route and the business port identifier.

[0168] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0169] If the rule update type is rule adjustment update, then retrieve the rule adjustment content;

[0170] Retrieve existing routing rules to be updated from the cache based on the business port identifier;

[0171] Based on the rule adjustment content, the routing rule to be updated is adjusted and updated to obtain the target update rule.

[0172] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0173] If the rule update type is simple rule addition update, then retrieve the newly added content of the rule;

[0174] Obtain the corresponding routing rule template based on the service port identifier;

[0175] Target update rules are generated based on routing rule templates and newly added rule content.

[0176] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0177] If the rule update type is a complex rule addition update, then the target update rule uploaded by the user will be received.

[0178] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0179] Receive the target update rule and service port identifier sent by the routing management backend; wherein, the routing rule update request is received through the routing management backend, the routing rule update request contains the service port identifier, the rule update type is determined according to the routing rule update request, and the target update rule is obtained based on the rule update type;

[0180] The target update rules are dynamically compiled and loaded to obtain the update route;

[0181] Service data is distributed based on updated routes and service port identifiers.

[0182] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0183] The target update rules are dynamically compiled using a preset compilation method to obtain the compiled update rules;

[0184] The compilation update rules are loaded into the running virtual machine through a preset loader to obtain the update route.

[0185] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0186] Determine the rule update type for the target update rule;

[0187] If the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified.

[0188] When the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the updated route is performed.

[0189] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0190] Receive routing rule update requests, which include the service port identifier;

[0191] Determine the rule update type based on the routing rule update request;

[0192] Based on the rule update type, the target update rule is obtained, and the target update rule and the business port identifier are sent to the application server. The application server receives the target update rule and the business port identifier, performs dynamic compilation and loading operations on the target update rule to obtain the update route, and distributes the business data based on the update route and the business port identifier.

[0193] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0194] If the rule update type is rule adjustment update, then retrieve the rule adjustment content;

[0195] Retrieve existing routing rules to be updated from the cache library based on the business port identifier;

[0196] Based on the rule adjustment content, the routing rule to be updated is adjusted and updated to obtain the target update rule.

[0197] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0198] If the rule update type is simple rule addition update, then retrieve the newly added content of the rule;

[0199] Obtain the corresponding routing rule template based on the service port identifier;

[0200] Target update rules are generated based on routing rule templates and newly added rule content.

[0201] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0202] If the rule update type is a complex rule addition update, then the target update rule uploaded by the user will be received.

[0203] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0204] Receive the target update rule and service port identifier sent by the routing management backend; wherein, the routing rule update request is received through the routing management backend, the routing rule update request contains the service port identifier, the rule update type is determined according to the routing rule update request, and the target update rule is obtained based on the rule update type;

[0205] The target update rules are dynamically compiled and loaded to obtain the update route;

[0206] Service data is distributed based on updated routes and service port identifiers.

[0207] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0208] The target update rules are dynamically compiled using a preset compilation method to obtain the compiled update rules;

[0209] The compilation update rules are loaded into the running virtual machine through a preset loader to obtain the update route.

[0210] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0211] Determine the rule update type for the target update rule;

[0212] If the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified.

[0213] When the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the updated route is performed.

[0214] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0215] Receive routing rule update requests, which include the service port identifier;

[0216] Determine the rule update type based on the routing rule update request;

[0217] Based on the rule update type, the target update rule is obtained, and the target update rule and the business port identifier are sent to the application server. The application server receives the target update rule and the business port identifier, performs dynamic compilation and loading operations on the target update rule to obtain the update route, and distributes the business data based on the update route and the business port identifier.

[0218] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0219] If the rule update type is rule adjustment update, then retrieve the rule adjustment content;

[0220] Retrieve existing routing rules to be updated from the cache based on the business port identifier;

[0221] Based on the rule adjustment content, the routing rule to be updated is adjusted and updated to obtain the target update rule.

[0222] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0223] If the rule update type is simple rule addition update, then retrieve the newly added content of the rule;

[0224] Obtain the corresponding routing rule template based on the service port identifier;

[0225] Target update rules are generated based on routing rule templates and newly added rule content.

[0226] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0227] If the rule update type is a complex rule addition update, then the target update rule uploaded by the user will be received.

[0228] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0229] Receive the target update rule and service port identifier sent by the routing management backend; wherein, the routing rule update request is received through the routing management backend, the routing rule update request contains the service port identifier, the rule update type is determined according to the routing rule update request, and the target update rule is obtained based on the rule update type;

[0230] The target update rules are dynamically compiled and loaded to obtain the update route;

[0231] Service data is distributed based on updated routes and service port identifiers.

[0232] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0233] The target update rules are dynamically compiled using a preset compilation method to obtain the compiled update rules;

[0234] The compilation update rules are loaded into the running virtual machine through a preset loader to obtain the update route.

[0235] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:

[0236] Determine the rule update type for the target update rule;

[0237] If the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified.

[0238] When the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the updated route is performed.

[0239] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0240] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0241] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0242] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A routing rule update method, applied to a routing management backend, characterized in that, The method includes: A routing rule update request is received, the routing rule update request including a service port identifier; the service port identifier is used to identify the port of the service access terminal; the routing rule includes rule matching logic code, rule matching attributes, and rule matching attribute values; Determine the rule update type based on the routing rule update request; Based on the rule update type, a target update rule is obtained, and the target update rule and the business port identifier are sent to the application server. The application server receives the target update rule and the business port identifier, and uses a preset compilation method to dynamically compile the target update rule to obtain a compiled update rule in bytecode. The compiled update rule is loaded into the running virtual machine through a preset loader to obtain an update route. Based on the update route and the business port identifier, business data is distributed. The rule update type includes rule adjustment update; obtaining the target update rule based on the rule update type includes: If the rule update type is a rule adjustment update, then obtain the rule adjustment content; Retrieve existing routing rules to be updated from the cache library based on the service port identifier; adjust and update the routing rules to be updated based on the rule adjustment content to obtain the target update rule.

2. The method according to claim 1, characterized in that, The rule update type update includes simple rule addition and update; Obtaining the target update rule based on the rule update type includes: If the rule update type is a simple rule addition update, then obtain the newly added rule content; Obtain the corresponding routing rule template based on the service port identifier; Target update rules are generated based on the routing rule template and the newly added content of the rules.

3. The method according to claim 1, characterized in that, The rule update type update includes complex rule addition updates, and the step of obtaining the target update rule based on the rule update type includes: If the rule update type is a complex rule addition update, then the target update rule uploaded by the user will be received.

4. A routing rule update method, applied to an application server, characterized in that, The method includes: The system receives target update rules and service port identifiers sent from the routing management backend. Specifically, it receives routing rule update requests via the routing management backend, each containing a service port identifier. The system determines the rule update type based on the routing rule update request and obtains the target update rule based on the rule update type. The routing rule includes rule matching logic code, rule matching attributes, and rule matching attribute values. The target update rule is dynamically compiled using a preset compilation method to obtain a compiled update rule that is bytecode. The compilation and update rules are loaded into the running virtual machine using a preset loader to obtain the update route; Service data is distributed based on the updated route and the service port identifier.

5. The method according to claim 4, characterized in that, Following the step of receiving the target update rule and service port identifier sent by the routing management backend, the following is also included: Determine the rule update type of the target update rule; If the rule update type of the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified. When the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the update route is performed.

6. A routing rule update device, characterized in that, The device includes: The request receiving module is used to receive routing rule update requests. The routing rule update request contains the business port identifier; the routing rule includes the rule matching logic code, the rule matching attribute, and the rule matching attribute value. The update type confirmation module is used to determine the rule update type based on the routing rule update request. An update rule sending module is used to obtain a target update rule based on the rule update type, and send the target update rule and the business port identifier to an application server. The application server obtains the target update rule and the business port identifier, dynamically compiles the target update rule using a preset compilation method to obtain a compiled update rule in bytecode, and loads the compiled update rule into a running virtual machine through a preset loader to obtain an update route. Based on the update route and the business port identifier, the application server distributes business data. The rule update type includes rule adjustment update; the update rule sending module is used to obtain rule adjustment content if the rule update type is rule adjustment update; obtain existing routing rules to be updated from the cache library according to the service port identifier; wherein, the routing rule includes rule matching logic code, rule matching attribute and rule matching attribute value; adjust and update the routing rules to be updated based on the rule adjustment content to obtain the target update rule.

7. The apparatus according to claim 6, characterized in that, The rule update type update includes simple rule addition update; the update rule sending module is further configured to: if the rule update type is simple rule addition update, then search for the corresponding routing rule template in the cache library according to the service port identifier; and generate the target update rule based on the routing rule template.

8. The apparatus according to claim 6, characterized in that, The rule update type update includes complex rule addition update, and the update rule sending module is further configured to: if the rule update type is complex rule addition update, then receive the target update rule uploaded by the user.

9. A routing rule update device, characterized in that, The device includes: The rule receiving module is used to receive target update rules and service port identifiers sent by the routing management backend; wherein, it receives routing rule update requests through the routing management backend, the routing rule update requests include service port identifiers, and the routing rules include rule matching logic code, rule matching attributes, and rule matching attribute values; it determines the rule update type according to the routing rule update request, and obtains the target update rule based on the rule update type; The dynamic compilation and loading module is used to dynamically compile the target update rule using a preset compilation method to obtain the compiled update rule; and load the compiled update rule into the running virtual machine through a preset loader to obtain the update route; The data distribution module is used to distribute service data based on the updated route and the service port identifier.

10. The apparatus according to claim 9, characterized in that, The device further includes: The verification module is used to determine the rule update type of the target update rule; if the rule update type of the target update rule is a complex rule addition update, then the feasibility of the target update rule is verified; when the feasibility verification of the target update rule is successful, the step of dynamically compiling and loading the target update rule to obtain the update route is executed.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Service governance rule configuration method, device and system and electronic equipment

    CN110324167A

  • Routing rule obtaining method, device and system

    CN111654433A

  • Dynamic configuration method and device of business rule information, equipment and storage medium

    CN113312113A