Route processing logic adjustment method and device, electronic equipment and computer medium
By expanding and adjusting the processing logic of the routing nodes, the problem that a single route cannot meet the needs of diversified service is solved, and more efficient resource utilization and stronger protection capabilities are achieved.
Patent Information
- Application Number
- CN202311533493.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, a single route cannot be routed according to different service needs, resulting in limited processing capabilities and service needs cannot be processed in a timely manner, resulting in processing blockage and waste of system resources. At the same time, the routing node expansion is inflexible and cannot effectively control access rights, resulting in low protection capabilities.
By obtaining the responsibility chain and services in the intelligent routing project, providing a discovery interface set, expanding multiple routing nodes to generate an extended routing node set, dynamically obtaining built-in standard variable information and parameter information using reflection, performing graphical display, and adjusting the routing processing logic and displaying early warning notifications when a processing logic exception is detected.
It improves routing processing capabilities, reduces system resource waste, enhances the flexibility of routing processing logic adjustment, and improves protection capabilities.
Smart Images

Figure CN120017583A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and computer medium for adjusting routing processing logic. Background Art
[0002] The processing logic adjustment of the route is a technology for adjusting the processing logic of the route. At present, the processing logic adjustment of the route is usually carried out in the following way: using a single routing channel source to implement the processing logic adjustment of the route.
[0003] However, when the above method is adopted, the following technical problems often occur:
[0004] First, using a single route cannot select routes according to different service requirements, resulting in limited routing processing capabilities. When the number of service requirements is greater than the number of routes, the service requirements cannot be processed in a timely manner, causing processing congestion and waste of system resources. In addition, when an exception occurs in the route, the processing logic of the route execution cannot be flexibly adjusted, causing the system to crash.
[0005] Second, since abnormal requests may occur when executing the processing logic of the service provider discovery interface, the priority of the processing logic cannot be adjusted in time, resulting in the inability to reasonably allocate resources dynamically, leading to waste of resources. In addition, since the abnormal requests cannot be reasonably processed, the security of executing the processing logic is reduced.
[0006] Third, when expanding routing nodes, it is impossible to dynamically adjust according to different needs, the routing nodes cannot be expanded flexibly, and the access rights of routing nodes cannot be effectively controlled when accessing routing nodes, resulting in low protection capabilities for routing processing logic adjustments.
[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0009] Some embodiments of the present disclosure propose a method, device, electronic device, and computer medium for adjusting routing processing logic to solve one or more of the technical problems mentioned in the above background technology section.
[0010] In a first aspect, some embodiments of the present disclosure provide a method for adjusting the processing logic of routing, the method comprising: obtaining a responsibility chain and a service provider discovery interface set in an intelligent routing project, wherein a service provider discovery interface in the service provider discovery interface set corresponds to a routing node in a plurality of routing nodes in the responsibility chain; extending each routing node in the plurality of routing nodes to generate an extended routing node, and obtaining an extended routing node set, wherein each routing node represents the processing logic of routing execution; dynamically obtaining built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection, and obtaining a built-in standard variable information set and parameter information set; graphically displaying the above-mentioned extended routing node set according to the above-mentioned built-in standard variable information set and parameter information set to obtain a graphical display interface; for each extended routing node in the above-mentioned extended routing node set, executing the following first processing step: calling the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set; executing the processing logic corresponding to the called service provider discovery interface; in response to detecting the execution exception information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying a warning notification on the above-mentioned graphical display interface, wherein the route is the route for which the above-mentioned processing logic execution exception is detected.
[0011] In a second aspect, some embodiments of the present disclosure provide a routing processing logic adjustment device, the device comprising: a first acquisition unit, configured to acquire a responsibility chain and a service provider discovery interface set in an intelligent routing project, wherein a service provider discovery interface in the service provider discovery interface set corresponds to a routing node in a plurality of routing nodes in the responsibility chain; an expansion unit, configured to expand each routing node in the plurality of routing nodes to generate an expanded routing node, and obtain an expanded routing node set, wherein each routing node represents the processing logic of routing execution; a second acquisition unit, configured to dynamically acquire built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection, and obtain a built-in standard A variable information set and a parameter information set; a display unit configured to graphically display the above-mentioned extended routing node set according to the above-mentioned built-in standard variable information set and parameter information set to obtain a graphical display interface; an execution unit configured to perform the following first processing step for each extended routing node in the above-mentioned extended routing node set: calling the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set; executing the processing logic corresponding to the called service provider discovery interface; in response to detecting execution exception information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying an early warning notification on the above-mentioned graphical display interface, wherein the route is the route for which the above-mentioned processing logic execution exception is detected.
[0012] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0013] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0014] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the processing logic adjustment method of the routing of some embodiments of the present disclosure, the waste of system resources is reduced, and the flexibility of adjusting the processing logic of routing execution is improved. Specifically, the processing capacity of the routing is limited, the service demand cannot be processed in time, the processing is blocked, and the waste of system resources is generated because: using a single routing cannot select routing according to different service demands, resulting in limited processing capacity of the routing. When the number of service demands is greater than the number of routes, the service demands cannot be processed in time, resulting in processing blockage, and waste of system resources. Because the processing logic of routing execution cannot be flexibly adjusted when the routing is abnormal, the system crashes. Based on this, the processing logic adjustment method of the routing of some embodiments of the present disclosure, first, obtains the responsibility chain and the service provider discovery interface set in the intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to the routing node in the multiple routing nodes in the responsibility chain. Thus, subsequent operations can be facilitated. Then, each routing node in the above-mentioned multiple routing nodes is expanded to generate an extended routing node, and an extended routing node set is obtained, wherein each routing node represents the processing logic of routing execution. Thus, the singleness of routing nodes can be avoided, and more service requirements can be met by expanding each routing node in multiple routing nodes, thereby improving the processing capacity of routing. Afterwards, the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the above-mentioned service provider discovery interface set are dynamically obtained by reflection, and the built-in standard variable information set and parameter information set are obtained. Thus, the user can be helped to understand the specific information of the service provider discovery interface. Then, according to the above-mentioned built-in standard variable information set and parameter information set, the above-mentioned extended routing node set is graphically displayed to obtain a graphical display interface. Thus, the user can intuitively view the specific information of each routing node. Then, for each extended routing node in the above-mentioned extended routing node set, the following first processing step is performed: the first step is to call the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set. Here, by calling the service provider discovery interface corresponding to each extended routing node, the service requirements corresponding to each extended routing node can be processed in time, the probability of processing congestion can be reduced, and thus the waste of system resources can be reduced. The second step is to execute the processing logic corresponding to the called service provider discovery interface. Here, the flexibility of adjusting the processing logic executed by routing can be improved. The third step is to adjust the processing logic executed by the route in response to detecting the abnormal execution information of the processing logic for the called service provider discovery interface, and display an early warning notification on the above-mentioned graphical display interface, wherein the route is the route where the abnormal execution of the above-mentioned processing logic is detected.Therefore, by expanding each of the multiple routing nodes, more service demands can be met and the routing processing capability can be improved. Also, by calling the service provider discovery interface corresponding to each expanded routing node, the service demand corresponding to each expanded routing node can be processed in a timely manner, reducing the probability of processing congestion, thereby reducing the waste of system resources, and thus improving the flexibility of adjusting the processing logic of routing execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0016] Figure 1 is a flowchart of some embodiments of a method for adjusting routing processing logic according to the present disclosure;
[0017] Figure 2 is a schematic diagram of the structure of some embodiments of the routing processing logic adjustment device according to the present disclosure;
[0018] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0020] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0025] Figure 1 This is a process 100 of some embodiments of the routing processing logic adjustment method disclosed in the present invention. The routing processing logic adjustment method includes the following steps:
[0026] Step 101: Obtain the responsibility chain and service provider discovery interface set in the intelligent routing project.
[0027] In some embodiments, the executor of the routing processing logic adjustment method (for example, a computing device) can obtain the responsibility chain and the service provider discovery interface set in the intelligent routing project through a wired connection or a wireless connection, wherein the service provider discovery interface in the service provider discovery interface set corresponds to a routing node among multiple routing nodes in the responsibility chain.
[0028] Here, the intelligent routing project may refer to a project for intelligently adjusting routing decisions. The routing decision may refer to a decision on how to forward data packets. For example, the routing decision may refer to assuming that there is an enterprise network composed of multiple network devices (e.g., routers), including subnets of multiple departments, each department having its own servers and user devices. Now there is a user device A that wants to communicate with server B of another department. First, user device A sends a data packet to the local router. Then, the local router checks the routing table of user device A, which contains information about different destination networks. Then, the router selects the next hop router according to the information in the routing table. The router forwards the data packet to the next hop router until it finally reaches the subnet where server B is located. Finally, after receiving the data packet, the router of the target department delivers it to server B. The chain of responsibility may refer to a routing decision chain including multiple routing nodes. The chain of responsibility may be used to pass a routing request from one routing node to another routing node. The service provider discovery interface in the service provider discovery interface set may refer to a service provider discovery mechanism (ServiceProvider Interface, SPI) built into JDK. The JDK may refer to the Java Development Kit (Java Development Kit, JDK).
[0029] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0030] Step 102: Expand each routing node among the plurality of routing nodes to generate an expanded routing node, thereby obtaining an expanded routing node set.
[0031] In some embodiments, the execution subject may expand each of the plurality of routing nodes to generate an expanded routing node, thereby obtaining an expanded routing node set, wherein each routing node represents the processing logic of routing execution.
[0032] As an example, the execution subject may analyze each of the plurality of routing nodes to generate an analyzed routing node and obtain an analyzed routing node set. Then, the capacity of each analyzed routing node in the analyzed routing node set is increased to generate an increased routing node and obtain an increased routing node set. Finally, configuration information is added to each increased routing node in the increased routing node set to generate an added routing node and obtain an added routing node set as an extended routing node set. The configuration information addition may refer to routing protocol information addition.
[0033] Optionally, the execution subject may expand each of the plurality of routing nodes to generate an expanded routing node and obtain an expanded routing node set by the following steps:
[0034] In the first step, for each of the plurality of routing nodes, the following second processing step is performed:
[0035] In the first sub-step, in response to determining that the above-mentioned routing node represents the processing logic based on the upper limit of the value transfer related information, the time upper limit information is added to the above-mentioned routing node to obtain the added routing node as the extended routing node.
[0036] Here, the upper limit of the above-mentioned value transfer related information may refer to the restriction information of the maximum value transfer that can be performed (for example, amount limit information). For example, the upper limit of the above-mentioned value transfer related information may refer to no more than 1,000 yuan. The above-mentioned time upper limit information may refer to the latest time information (for example, time limit information) allowed in the processing logic of the above-mentioned value transfer related information upper limit. For example, the above-mentioned time upper limit information may refer to no more than 5 pm. Value transfer may refer to value flow. For example, value transfer may refer to the flow of funds that occurs due to trading activities in the financial market. The above-mentioned trading activities may refer to the circulation of commodities. The above-mentioned processing logic based on the upper limit of value transfer related information may refer to the operating method for the upper limit of value transfer related information. The above-mentioned operating method may refer to the processing method. For example, the above-mentioned operating method may refer to detecting whether the upper limit of value transfer related information exceeds the preset upper limit. Here, the above-mentioned preset upper limit may refer to a preset maximum limit.
[0037] In a second sub-step, in response to determining that the routing node represents a processing logic based on the order owner's condition, the location condition information is added to the routing node to obtain an added routing node as an extended routing node.
[0038] Here, the above-mentioned order owner condition may refer to the operation restriction information for the order owner (for example, merchant restriction information). For example, the above-mentioned order owner condition may refer to the number of operations within one day not exceeding 5 times. The above-mentioned location condition information may refer to the information for restricting the location information of the order owner in the processing logic of the above-mentioned order owner condition (for example, location restriction information). For example, the above-mentioned location condition information may refer to the place of origin information of the order owner. The above-mentioned order owner may refer to the user who generates the order. The above-mentioned processing logic based on the order owner condition may refer to the operation method for the order owner condition. The above-mentioned operation method may refer to detecting whether the order owner condition exceeds the preset location condition. Here, the above-mentioned preset location condition may refer to the preset location condition of the order owner. For example, the above-mentioned preset location condition may refer to the order owner whose place of origin is preset to be Beijing.
[0039] The third sub-step is, in response to determining that the routing node represents the processing logic based on the channel source condition, adding the frequency condition information to the routing node to obtain the added routing node as the extended routing node.
[0040] Here, the above-mentioned channel source condition may refer to restriction information on the source of the operating channel (for example, payment channel restriction information). For example, the above-mentioned channel source condition may mean that only fixed mobile channels can be used for operation. The above-mentioned frequency condition information may refer to the number of times the operating channel is allowed to be executed in the processing logic of the above-mentioned channel source condition (for example, frequency restriction information). For example, the above-mentioned frequency condition information may mean that the operating channel is allowed to be executed 5 times in the processing logic of the above-mentioned channel source condition. The above-mentioned operating channel may refer to the channel of operation. For example, the above-mentioned operating channel may refer to a POS machine. The above-mentioned processing logic based on the channel source condition may refer to an operating method for the channel source condition. The above-mentioned operating method may refer to detecting whether the channel source condition meets the preset channel source. The above-mentioned preset channel source may refer to a pre-set channel source.
[0041] The fourth sub-step is, in response to determining that the above-mentioned routing node represents the processing logic based on the channel surplus value condition, adding the surplus value upper and lower limit information to the above-mentioned routing node to obtain the added routing node as the expanded routing node.
[0042] Here, the above-mentioned channel residual value condition may refer to the restriction information on the residual value of the operating channel (for example, channel balance restriction information). The above-mentioned residual value upper and lower limit information may refer to the residual value upper limit information (for example, maximum balance restriction information) and residual value lower limit information (for example, minimum balance restriction information) allowed in the processing logic of the above-mentioned channel residual value condition. The above-mentioned residual value may refer to the remaining amount of available resources. For example, the above-mentioned residual value may refer to the account balance. The above-mentioned processing logic based on the channel residual value condition may refer to the operating method for the channel residual value condition. The above-mentioned operating method may refer to detecting whether the channel residual value condition meets the preset residual value condition. The above-mentioned preset residual value condition may refer to the condition of not exceeding a preset residual value of 50,000 yuan.
[0043] In the second step, the obtained expanded routing nodes are determined as an expanded routing node set.
[0044] Optionally, the execution subject may expand each of the plurality of routing nodes to generate an expanded routing node and obtain an expanded routing node set by the following steps:
[0045] In the first step, plug-in information is added to each of the plurality of routing nodes to generate a post-addition routing node, thereby obtaining a post-addition routing node set.
[0046] Here, the plug-in information may refer to information related to additional functions. The plug-in information may be used to enhance the functions of the routing node. The additional functions may refer to additional functions. For example, the additional functions may refer to a traffic statistics function. The traffic statistics function may refer to a function for counting traffic information of the routing node. For example, the traffic statistics function may refer to a function for detecting the number of requests per second. The plug-in information may refer to parameter configuration information. The parameter configuration information may refer to parameter information for configuring the routing node. For example, the parameter configuration information may refer to port number information.
[0047] In the second step, configuration information is loaded for each added routing node in the added routing node set to generate a loaded routing node, thereby obtaining a loaded routing node set.
[0048] As an example, the execution subject may set routing parameter information for each added routing node in the added routing node set to generate a set routing node as a loaded routing node to obtain a loaded routing node set. The routing parameter information may refer to parameter information related to routing. For example, the routing parameter information may refer to routing response duration information.
[0049] In the third step, for the service provider discovery interface corresponding to each loaded routing node in the loaded routing node set, the following fourth processing step is performed:
[0050] The first sub-step is to add label information to the service provider discovery interface to obtain an interface containing label information.
[0051] Here, the above-mentioned tag information may be tag information used to identify the above-mentioned service provider discovery interface.
[0052] The second sub-step is to perform parameter expansion on the above-mentioned interface containing tag information to obtain an interface after parameter expansion.
[0053] As an example, the execution subject may add parameters to the above-mentioned interface containing tag information to obtain the added interface containing tag information, and then modify the parameters of the above-mentioned interface containing tag information to obtain the interface after parameter modification as the interface after parameter expansion.
[0054] The fourth step is to execute the processing logic corresponding to each parameter-extended interface in the obtained at least one parameter-extended interface to obtain an executed interface set.
[0055] The fifth step is to encrypt the routing node corresponding to each post-execution interface in the post-execution interface set to generate an encrypted routing node and obtain an encrypted routing node set.
[0056] As an example, the execution subject may use an Advanced Encryption Standard (AES) encryption algorithm to encrypt the routing nodes corresponding to each post-execution interface in the post-execution interface set to generate encrypted routing nodes and obtain an encrypted routing node set.
[0057] In the sixth step, each encrypted routing node in the encrypted routing node set is marked to generate a marked routing node, thereby obtaining a marked routing node set.
[0058] As an example, the execution subject may first analyze each encrypted routing node in the encrypted routing node set to generate an analyzed routing node and obtain an analyzed routing node set. Then, keyword extraction may be performed on each analyzed routing node in the analyzed routing node set to generate keywords corresponding to the routing node and obtain a keyword set corresponding to the routing node. Finally, keyword tagging may be performed on the analyzed routing node using the keywords corresponding to each routing node in the keyword set corresponding to the routing node to generate a tagged routing node and obtain a tagged routing node set.
[0059] Step 7: Verify access rights on the marked routing node set to obtain the accessible routing node set.
[0060] In the eighth step, each accessible routing node in the above accessible routing node set is authorized to obtain an authorized routing node set as an extended routing node set.
[0061] As an example, the execution subject may use an access token to authorize each accessible routing node in the accessible routing node set to obtain an authorized routing node set as the extended routing node set.
[0062] The relevant contents in the first step to the eighth step above are an inventive point of the present disclosure, which solves the technical problem three mentioned in the background technology: "When the routing node is expanded, it is impossible to dynamically adjust according to different requirements, the routing node cannot be flexibly expanded, and the access rights of the routing node cannot be effectively controlled when accessing the routing node, resulting in a low protection capability of the routing processing logic adjustment." The factors that lead to the inability to dynamically adjust according to different requirements, the inability to flexibly expand the routing node, the inability to effectively control the access rights of the routing node when accessing the routing node, and the low protection capability of the routing processing logic adjustment are often as follows: when the routing node is expanded, it is impossible to dynamically adjust according to different requirements, the inability to flexibly expand the routing node, and the inability to effectively control the access rights of the routing node when accessing the routing node, resulting in a low protection capability of the routing processing logic adjustment. If the above factors are solved, the effect of being able to dynamically adjust according to different requirements when expanding the routing node and effectively controlling the access rights of the routing node when accessing the routing node can be achieved. In order to achieve this effect, first, in the first step, plug-in information is added to each of the above multiple routing nodes to generate an added routing node and obtain a set of added routing nodes. Thus, when the routing node is extended, dynamic adjustment can be achieved according to different requirements by adding plug-in information. The second step is to load configuration information for each added routing node in the above-mentioned added routing node set to generate a loaded routing node and obtain a loaded routing node set. Thus, the routing node can be flexibly extended by loading configuration information. The third step is to perform the following fourth processing step for the service provider discovery interface corresponding to each loaded routing node in the above-mentioned loaded routing node set: the first sub-step is to add label information to the above-mentioned service provider discovery interface to obtain an interface containing label information. Thus, subsequent operations can be facilitated. The second sub-step is to perform parameter extension on the above-mentioned interface containing label information to obtain a parameter-extended interface. Thus, parameter information of the above-mentioned interface containing label information can be increased. The fourth step is to execute the processing logic corresponding to each parameter-extended interface in the obtained at least one parameter-extended interface to obtain a post-execution interface set. The fifth step is to encrypt the routing node corresponding to each post-execution interface in the above-mentioned post-execution interface set to generate an encrypted routing node and obtain an encrypted routing node set. Thus, the protection capability when executing the processing logic can be improved. Step 6: Mark each encrypted routing node in the above encrypted routing node set to generate a marked routing node and obtain a marked routing node set. Step 7: Verify access rights on the marked routing node set to obtain an accessible routing node set. In this way, the access rights of routing nodes can be effectively controlled when accessing routing nodes. Step 8: Authorize each accessible routing node in the above accessible routing node set to obtain an authorized routing node set as an extended routing node set.Therefore, when expanding routing nodes, dynamic adjustments can be made according to different needs. When accessing routing nodes, the access rights of routing nodes can be effectively controlled, thereby improving the protection capability of routing processing logic adjustment.
[0063] Step 103: dynamically obtain the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by reflection, and obtain a built-in standard variable information set and a parameter information set.
[0064] In some embodiments, the execution subject may dynamically obtain the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by reflection, and obtain a built-in standard variable information set and a parameter information set.
[0065] Here, the built-in standard variable information in the above-mentioned built-in standard variable information set may refer to standardized variable information predefined in the service provider discovery interface. For example, the built-in standard variable information in the above-mentioned built-in standard variable information set may refer to request method information. The parameter information in the above-mentioned parameter information set may refer to the transmission parameter information required by the service provider discovery interface. For example, the parameter information in the above-mentioned parameter information set may refer to static parameter information.
[0066] Optionally, the execution subject may dynamically obtain the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by reflection through the following steps to obtain a built-in standard variable information set and a parameter information set:
[0067] In the first step, for each service provider discovery interface in the service provider discovery interface set, the following third processing step is performed:
[0068] In the first sub-step, the type of the service provider discovery interface is obtained by using reflection to obtain the interface type.
[0069] Here, the above interface type may refer to the method type of the interface. For example, the above interface type may refer to the return value type of the interface.
[0070] The second sub-step is to determine the method object array of the above interface type.
[0071] Here, the method object in the above method object group can represent an object of a method.
[0072] The third sub-step is to obtain annotation information of the above method object array to obtain built-in standard variable information.
[0073] As an example, the execution subject may first use the getAnnotations() method to obtain the annotation information of each method object in the method object array to obtain the built-in standard variable information. The annotation information may refer to tag information.
[0074] The fourth sub-step is to determine the parameter information according to the attributes of the method object array.
[0075] As an example, the execution subject may first obtain the properties of the method object array to obtain the property information of the method object array. Then, the getParameterTypes() method in the Method class is used to obtain the parameter type array of the property information to obtain the parameter type array as the parameter information. In the second step, the obtained at least one built-in standard variable information and at least one parameter information are respectively determined as a built-in standard variable information set and a parameter information set.
[0076] Step 104: graphically display the expanded routing node set according to the built-in standard variable information set and parameter information set to obtain a graphical display interface.
[0077] In some embodiments, the execution subject may graphically display the expanded routing node set according to the built-in standard variable information set and parameter information set to obtain a graphical display interface.
[0078] As an example, the execution subject may create a routing node object set according to the built-in standard variable information set and parameter information set. Then, a routing relationship graph is created for each routing node object in the routing node object set using the data structure. Afterwards, a graphical tool is used to graphically display the created routing relationship graph to obtain a graphical display interface. For example, the data structure may be a graph data structure. The graphical tool may refer to Graphviz (Graph Visualization Software).
[0079] Step 105: for each expanded routing node in the expanded routing node set, perform the following first processing step:
[0080] Step 1051, calling the service provider discovery interface in the service provider discovery interface set corresponding to the above-mentioned extended routing node.
[0081] In some embodiments, the execution subject may call a service provider discovery interface in a service provider discovery interface set corresponding to the extended routing node.
[0082] Optionally, the execution subject may call the service provider discovery interface corresponding to the extended routing node in the service provider discovery interface set through the following steps:
[0083] In the first step, the method signature of the service provider discovery interface corresponding to the service provider discovery interface of the extended routing node in the service provider discovery interface set is determined as the interface method signature.
[0084] Here, the interface method signature may refer to a unique identifier that defines the interface method. The interface method signature includes but is not limited to at least one of the following: the name of the interface method.
[0085] The second step is to call the interface method according to the above interface method signature.
[0086] Here, the above interface method can be used to obtain information of a specified user. For example, the above interface method can refer to the getUser(userId) method.
[0087] As an example, the execution subject may use a programming language to call the interface method according to the interface method signature. The programming language may be JAVA language.
[0088] In the third step, in response to determining that there is an abnormal return value in the above interface method, the above abnormal return value is subjected to exception processing to obtain a processed interface method.
[0089] Here, the above-mentioned abnormal return value may refer to a parameter abnormal value.
[0090] As an example, the execution subject may perform exception handling on the exception return value in a try-catch block to obtain a processed interface method.
[0091] The fourth step is to call the corresponding service provider discovery interface according to the above processed interface method.
[0092] As an example, the execution subject may analyze the processed interface method to obtain the analyzed interface method, and finally call the service provider discovery interface corresponding to the analyzed interface method.
[0093] Step 1052: Execute the processing logic corresponding to the called service provider discovery interface.
[0094] In some embodiments, the above-mentioned execution subject can execute the processing logic corresponding to the called service provider discovery interface.
[0095] Step 1053, in response to detecting abnormal execution information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the routing, and displaying a warning notification on the above-mentioned graphical display interface.
[0096] In some embodiments, the above-mentioned execution entity can adjust the processing logic executed by the route in response to detecting execution exception information of the processing logic for the called service provider discovery interface, and display an early warning notification on the above-mentioned graphical display interface, wherein the route is the route where the above-mentioned processing logic execution exception is detected.
[0097] As an example, the execution subject may first determine the type of abnormal information. Then, according to the type of abnormal information, the processing logic of the route execution is updated to obtain an updated route. Finally, the updated route is detected, and an early warning notification is displayed on the graphical display interface.
[0098] Optionally, the execution subject may respond to the detection of abnormal execution information of the processing logic for the called service provider discovery interface by adjusting the processing logic of the routing execution and displaying a warning notification on the graphical display interface through the following steps:
[0099] In the first step, in response to determining that the abnormal information is access failure information for a channel source, the network indicators of the channel source are detected to obtain the detected network indicators.
[0100] Here, the above network indicators may include but are not limited to at least one of the following: a delay indicator and an error rate indicator.
[0101] The second step is to mark the channel source as unusable in response to determining that the value of the network indicator after the detection exceeds a preset indicator threshold, and to display a first warning notification on the graphical display interface.
[0102] Here, the first warning notification may refer to a warning notification that marks the channel source as unavailable. For example, the first warning notification may refer to "channel source unavailable".
[0103] The third step is to detect the access failure status of the channel sources marked as unavailable.
[0104] As an example, the execution subject may use a system monitoring tool to detect the access status of the channel source marked as unavailable to obtain a detection result, and then determine that the access status of the detection result is an access failure status.
[0105] In a fourth step, in response to determining that the duration of the access failure state exceeds a preset duration, reconnecting the channel source that exceeds the preset duration.
[0106] Here, the preset duration may refer to the preset duration of the access failure state. For example, the preset duration may refer to 3 minutes.
[0107] The fifth step, in response to determining that the above abnormal information is order failure information for the channel source, the status code information of the above channel source is detected to obtain the status code information after detection.
[0108] Here, the above-mentioned status code information may refer to returned processing status information, for example, the above-mentioned status code information may refer to success code information.
[0109] Step 6: In response to determining that the above-mentioned post-detection status code information is failure code information, a second warning notification is displayed on the above-mentioned graphical display interface, and the above-mentioned channel source is retried.
[0110] Here, the second warning notification may refer to a warning notification when the status code information after detection is a failure code information. For example, the second warning notification may refer to "channel source error".
[0111] In the seventh step, in response to determining that the number of retries exceeds the preset number of retries, the channel source is adjusted to obtain an adjusted channel source, and a third warning notification is displayed on the graphical display interface.
[0112] Here, the third warning notification may refer to a warning notification when the number of retries exceeds a preset number of retries. For example, the third warning notification may refer to "the source of the channel has been adjusted". Here, the preset number of retries may refer to a preset number of resending requests.
[0113] Optionally, the execution subject may respond to the detection of abnormal execution information of the processing logic for the called service provider discovery interface by adjusting the processing logic of the routing execution and displaying a warning notification on the graphical display interface through the following steps:
[0114] The first step is to, in response to determining that the abnormal information is error rate information, adjust the priority of the processing logic executed by the routing according to the error rate information.
[0115] As an example, the execution subject may compare the error rate information with the preset error rate information. Then, the priority of the processing logic of the routing execution corresponding to the error rate information less than the preset error rate information is preferentially adjusted. The preset error rate information may refer to the preset error rate information.
[0116] The second step is to control the allocation of resource capacity according to the adjusted processing logic priority.
[0117] Here, the resource capacity may refer to the amount of resources available in the system. For example, the resource capacity may refer to the CPU usage of the server.
[0118] As an example, the execution subject may increase the allocation of resource capacity in response to determining that the adjusted processing logic priority is priority processing, or reduce the allocation of resource capacity in response to determining that the adjusted processing logic priority is waiting for processing.
[0119] In the third step, in response to determining that the load corresponding to the allocation of the resource capacity exceeds a preset load threshold, dynamically script loading is performed on the processing logic executed by the routing to obtain a post-loading processing logic.
[0120] Here, the above-mentioned dynamic script may refer to script code that is dynamically loaded and executed at runtime.
[0121] As an example, the execution subject may perform a load detection on the processing logic executed by the routing in response to determining that the load corresponding to the allocation of the resource capacity exceeds a preset load threshold, and obtain a detection result. Then, in response to determining that the detection result exceeds the preset load threshold, the processing logic executed by the routing is dynamically adjusted using a dynamic script loading tool to obtain the adjusted processing logic as the loaded processing logic. The dynamic script loading tool may refer to Node.js.
[0122] In the fourth step, in response to determining that the above-mentioned post-loading processing logic executes abnormal request information, the above-mentioned abnormal request information is intercepted.
[0123] The fifth step is to perform security verification on the intercepted request information and obtain the verified request information.
[0124] The sixth step is to send the verified request information to the information list that meets specific conditions, and issue an abnormal warning for the abnormal request information.
[0125] Here, the information list meeting the specific conditions may refer to a list of information that needs to be intercepted. For example, the information list meeting the specific conditions may refer to a blacklist.
[0126] The seventh step is to display a warning notification on the above-mentioned graphical display interface through abnormal warning.
[0127] In the eighth step, in response to determining that the above-mentioned post-loading processing logic executes non-abnormal request information, identity authentication is performed on the above-mentioned non-abnormal request information.
[0128] As an example, the execution subject may perform single sign-on (SSO) verification on the non-abnormal request information in response to determining that the post-loading processing logic executes the non-abnormal request information.
[0129] In step 9, in response to determining that the identity authentication is successful, the above-mentioned non-abnormal request information is authenticated.
[0130] In the tenth step, in response to determining that the authentication is successful, a non-abnormal warning is issued for the above-mentioned non-abnormal request information.
[0131] The eleventh step is to display a warning notification on the above-mentioned graphical display interface through a non-abnormal warning.
[0132] The relevant contents in the first step to the eleventh step above serve as an inventive point of the present disclosure, and solve the technical problem 2 mentioned in the background technology, "Because abnormal requests appear when executing the processing logic of the service provider discovery interface, the priority of the processing logic cannot be adjusted in time, resulting in that resources cannot be reasonably dynamically allocated, resulting in waste of resources, and because the abnormal requests cannot be reasonably processed, the security when executing the processing logic is reduced." The factors that lead to reduced security when executing the processing logic are often as follows: Because abnormal requests appear when executing the processing logic of the service provider discovery interface, the priority of the processing logic cannot be adjusted in time, resulting in that resources cannot be reasonably dynamically allocated, resulting in waste of resources, and because the abnormal requests cannot be reasonably processed, the security when executing the processing logic is reduced. If the above factors are solved, the effect of improving the security when executing the processing logic can be achieved. In order to achieve this effect, first, in the first step, in response to determining that the above abnormal information is error rate information, the priority of the processing logic executed by the routing is adjusted according to the above error rate information. Thus, the priority of the processing logic can be adjusted in time. In the second step, according to the adjusted priority of the processing logic, the allocation of resource capacity is controlled. Thus, resources can be dynamically allocated to reduce resource waste. In the third step, in response to determining that the load corresponding to the allocation of the resource capacity exceeds the preset load threshold, the processing logic executed by the routing is dynamically scripted and loaded to obtain the post-loading processing logic. In the fourth step, in response to determining that the post-loading processing logic executes abnormal request information, the abnormal request information is intercepted. In this way, the abnormal request can be reasonably processed to improve the security when executing the processing logic. In the fifth step, the intercepted request information is security verified to obtain the post-verification request information. In the sixth step, the post-verification request information is sent to the information list that meets the specific conditions, and the abnormal request information is abnormally warned. In the seventh step, a warning notification is displayed on the graphical display interface through the abnormal warning. In the eighth step, in response to determining that the post-loading processing logic executes non-abnormal request information, the non-abnormal request information is authenticated. In the ninth step, in response to determining that the identity authentication is passed, the non-abnormal request information is authenticated. In the tenth step, in response to determining that the authentication is successful, a non-abnormal warning is issued for the non-abnormal request information. In the eleventh step, a warning notification is displayed on the graphical display interface through the non-abnormal warning. Therefore, resources can be allocated dynamically to reduce resource waste. Abnormal requests can be handled reasonably, which improves the security of executing processing logic.
[0133] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the processing logic adjustment method of the routing of some embodiments of the present disclosure, the waste of system resources is reduced, and the flexibility of adjusting the processing logic of routing execution is improved. Specifically, the processing capacity of the routing is limited, the service demand cannot be processed in time, the processing is blocked, and the waste of system resources is generated because: using a single routing cannot select routing according to different service demands, resulting in limited processing capacity of the routing. When the number of service demands is greater than the number of routes, the service demands cannot be processed in time, resulting in processing blockage, and waste of system resources. Because the processing logic of routing execution cannot be flexibly adjusted when the routing is abnormal, the system crashes. Based on this, the processing logic adjustment method of the routing of some embodiments of the present disclosure, first, obtains the responsibility chain and the service provider discovery interface set in the intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to the routing node in the multiple routing nodes in the responsibility chain. Thus, subsequent operations can be facilitated. Then, each routing node in the above-mentioned multiple routing nodes is expanded to generate an extended routing node, and an extended routing node set is obtained, wherein each routing node represents the processing logic of routing execution. Thus, the singleness of routing nodes can be avoided, and more service requirements can be met by expanding each routing node in multiple routing nodes, thereby improving the processing capacity of routing. Afterwards, the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the above-mentioned service provider discovery interface set are dynamically obtained by reflection, and the built-in standard variable information set and parameter information set are obtained. Thus, the user can be helped to understand the specific information of the service provider discovery interface. Then, according to the above-mentioned built-in standard variable information set and parameter information set, the above-mentioned extended routing node set is graphically displayed to obtain a graphical display interface. Thus, the user can intuitively view the specific information of each routing node. Then, for each extended routing node in the above-mentioned extended routing node set, the following first processing step is performed: the first step is to call the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set. Here, by calling the service provider discovery interface corresponding to each extended routing node, the service requirements corresponding to each extended routing node can be processed in time, the probability of processing congestion can be reduced, and thus the waste of system resources can be reduced. The second step is to execute the processing logic corresponding to the called service provider discovery interface. Here, the flexibility of adjusting the processing logic executed by routing can be improved. The third step is to adjust the processing logic executed by the route in response to detecting the abnormal execution information of the processing logic for the called service provider discovery interface, and display an early warning notification on the above-mentioned graphical display interface, wherein the route is the route where the abnormal execution of the above-mentioned processing logic is detected.Therefore, by expanding each of the multiple routing nodes, more service demands can be met and the routing processing capability can be improved. Also, by calling the service provider discovery interface corresponding to each expanded routing node, the service demand corresponding to each expanded routing node can be processed in a timely manner, reducing the probability of processing congestion, thereby reducing the waste of system resources, and thus improving the flexibility of adjusting the processing logic of routing execution.
[0134] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a method for adjusting routing processing logic. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0135] like Figure 2 As shown, the routing processing logic adjustment device 200 of some embodiments includes: a first acquisition unit 201, an expansion unit 202, a second acquisition unit 203, a display unit 204 and an execution unit 205. The first acquisition unit 201 is configured to acquire the responsibility chain and the service provider discovery interface set in the intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to a routing node in a plurality of routing nodes in the responsibility chain; the expansion unit 202 is configured to expand each routing node in the plurality of routing nodes to generate an expanded routing node and obtain an expanded routing node set, wherein each routing node represents the processing logic of routing execution; the second acquisition unit 203 is configured to dynamically acquire the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection, and obtain a built-in standard variable information set and a parameter information set; the display unit 204 is configured to dynamically acquire the built-in standard variable information set and a parameter information set by using reflection, and obtain a built-in standard variable information set and a parameter information set; the display unit 205 is configured to dynamically acquire the built-in standard variable information set and a parameter information set by using reflection, and obtain a built-in standard variable information set and a parameter information set; the display unit 205 is configured to dynamically acquire the built-in standard variable information set and a service provider discovery interface set in the intelligent routing project ... node set and a service provider discovery interface set in the intelligent routing project; the display unit 205 is configured to dynamically acquire the built-in standard variable information set and a service provider discovery interface set in the intelligent routing project, and obtain a built-in standard variable node set and a service provider Element 204 is configured to graphically display the above-mentioned extended routing node set according to the above-mentioned built-in standard variable information set and parameter information set to obtain a graphical display interface; the execution unit 205 is configured to perform the following first processing step for each extended routing node in the above-mentioned extended routing node set: calling the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set; executing the processing logic corresponding to the called service provider discovery interface; in response to detecting the execution exception information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying a warning notification on the above-mentioned graphical display interface, wherein the route is the route for which the above-mentioned processing logic execution exception is detected.
[0136] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.
[0137] Reference below Figure 3 , which shows a schematic structural diagram of an electronic device (such as a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0138] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 304. In RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, ROM 302, and RAM 304 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0139] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0140] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the functions defined in the method of some embodiments of the present disclosure are executed.
[0141] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0142] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0143] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the responsibility chain and the service provider discovery interface set in the intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to a routing node in the multiple routing nodes in the responsibility chain; expands each routing node in the above-mentioned multiple routing nodes to generate an extended routing node, and obtains an extended routing node set, wherein each routing node represents the processing logic of routing execution; dynamically obtains the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the above-mentioned service provider discovery interface set by reflection, and obtains the built-in standard Quasi-variable information set and parameter information set; according to the above-mentioned built-in standard variable information set and parameter information set, the above-mentioned extended routing node set is graphically displayed to obtain a graphical display interface; for each extended routing node in the above-mentioned extended routing node set, the following first processing step is performed: calling the service provider discovery interface corresponding to the above-mentioned extended routing node in the service provider discovery interface set; executing the processing logic corresponding to the called service provider discovery interface; in response to detecting the execution exception information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying a warning notification on the above-mentioned graphical display interface, wherein the route is the route for which the above-mentioned processing logic execution exception is detected.
[0144] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0146] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising: a first acquisition unit, an expansion unit, a second acquisition unit, a display unit, and an execution unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the display unit may also be described as "a unit that graphically displays the above-mentioned expanded routing node set according to the above-mentioned built-in standard variable information set and parameter information set to obtain a graphical display interface".
[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0148] The above descriptions are only some preferred embodiments of the present disclosure and the explanation of the technical principles used above. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for adjusting routing processing logic, comprising: Obtain a responsibility chain and a service provider discovery interface set in the intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to a routing node in the plurality of routing nodes in the responsibility chain; Expanding each routing node among the plurality of routing nodes to generate an expanded routing node, thereby obtaining an expanded routing node set, wherein each routing node represents a processing logic of routing execution; Dynamically obtain built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection, and obtain a built-in standard variable information set and a parameter information set; According to the built-in standard variable information set and parameter information set, the expanded routing node set is graphically displayed to obtain a graphical display interface; For each extended routing node in the extended routing node set, the following first processing step is performed: Calling the service provider discovery interface corresponding to the extended routing node in the service provider discovery interface set; The service provider that executes the call provides the processing logic corresponding to the discovery interface; In response to detecting execution exception information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying an early warning notification on the graphical display interface, wherein the route is the route where the execution exception of the processing logic is detected.
2. The method according to claim 1, wherein: The step of expanding each of the plurality of routing nodes to generate an expanded routing node and obtain an expanded routing node set includes: For each routing node in the plurality of routing nodes, performing the following second processing step: In response to determining that the routing node represents the processing logic based on the upper limit of the value transfer related information, adding the time upper limit information to the routing node to obtain the added routing node as the extended routing node; In response to determining that the routing node represents a processing logic based on the order owner condition, adding location condition information to the routing node to obtain an added routing node as an expanded routing node; In response to determining that the routing node represents the processing logic based on the channel source condition, adding frequency condition information to the routing node to obtain an added routing node as an extended routing node; In response to determining that the routing node represents the processing logic based on the channel residual value condition, adding the residual value upper and lower limit information in the routing node to obtain the added routing node as the expanded routing node; The obtained expanded routing nodes are determined as an expanded routing node set.
3. The method according to claim 1, wherein: The method of dynamically obtaining the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection to obtain the built-in standard variable information set and parameter information set includes: For each service provider discovery interface in the service provider discovery interface set, the following third processing step is performed: Obtain the type of the service provider discovery interface by using reflection to obtain the interface type; Determine an array of method objects of the interface type; Obtaining annotation information of the method object array to obtain built-in standard variable information; Determining parameter information according to the attributes of the method object array; The obtained at least one built-in standard variable information and at least one parameter information are respectively determined as a built-in standard variable information set and a parameter information set.
4. The method according to claim 1, wherein: The calling service provider discovery interface set corresponding to the service provider discovery interface of the extended routing node includes: Determine the method signature of the service provider discovery interface corresponding to the extended routing node in the service provider discovery interface set as the interface method signature; Calling the interface method according to the interface method signature; In response to determining that there is an abnormal return value in the interface method, performing exception processing on the abnormal return value to obtain a processed interface method; According to the processed interface method, the corresponding service provider discovery interface is called.
5. The method according to claim 1, wherein: The step of adjusting the processing logic executed by the routing in response to detecting abnormal execution information of the processing logic of the called service provider discovery interface, and displaying a warning notification on the graphical display interface includes: In response to determining that the abnormal information is access failure information for a channel source, detecting a network indicator of the channel source to obtain a detected network indicator; In response to determining that the value of the detected network indicator exceeds a preset indicator threshold, marking the channel source as unusable, and displaying a first warning notification on the graphical display interface; Perform access failure detection on channel sources marked as unavailable; In response to determining that the duration of the access failure state exceeds a preset duration, reconnecting the channel source that exceeds the preset duration; In response to determining that the abnormal information is order failure information for a channel source, detecting the status code information of the channel source to obtain detected status code information; In response to determining that the post-detection status code information is failure code information, displaying a second warning notification on the graphical display interface, and retrying the channel source; In response to determining that the number of retries exceeds a preset number of retries, the channel source is adjusted to obtain an adjusted channel source, and a third warning notification is displayed on the graphical display interface.
6. A routing processing logic adjustment device, comprising: A first acquisition unit is configured to acquire a responsibility chain and a service provider discovery interface set in an intelligent routing project, wherein the service provider discovery interface in the service provider discovery interface set corresponds to a routing node in a plurality of routing nodes in the responsibility chain; An expansion unit is configured to expand each routing node of the plurality of routing nodes to generate an expanded routing node, and obtain an expanded routing node set, wherein each routing node represents a processing logic of routing execution; The second acquisition unit is configured to dynamically acquire the built-in standard variable information and parameter information corresponding to each service provider discovery interface in the service provider discovery interface set by using reflection, and obtain a built-in standard variable information set and a parameter information set; A display unit configured to graphically display the expanded routing node set according to the built-in standard variable information set and parameter information set to obtain a graphical display interface; The execution unit is configured to perform the following first processing step for each extended routing node in the extended routing node set: calling the service provider discovery interface corresponding to the extended routing node in the service provider discovery interface set; executing the processing logic corresponding to the called service provider discovery interface; in response to detecting abnormal execution information of the processing logic for the called service provider discovery interface, adjusting the processing logic executed by the route, and displaying an early warning notification on the graphical display interface, wherein the route is the route for which the abnormal execution of the processing logic is detected.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.