Route selection method, and network device and computer-readable medium

By dynamically reordering the routes with authentication configuration information in the gateway router, the problem of routing failure caused by routing priority configuration in the existing technology is solved, and efficient forwarding and authentication requirements for microservice call requests are achieved. Improve the efficiency of microservices openness.

WO2024255319A1PCT designated stage expired Publication Date: 2024-12-19EBAOTECH CORP

Patent Information

Application Number
PCT/CN2024/079361
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-13
Filing Date
2024-02-29
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

Under the routing order priority configuration, the existing gateway routers cannot take effect and cannot specialize in microservice call requests, affecting the call success rate and user experience.

Method used

By dynamically reordering the routes using authentication configuration information in the data control module of the gateway router, reconfiguring the routing order according to the authentication requirements, ensuring that routes matching the authentication requirements are forwarded first.

Benefits of technology

It realizes efficient forwarding of multiple microservice call requests, improves the efficiency of microservice opening, avoids authentication conflicts, and ensures accurate forwarding of call requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079361_19122024_PF_FP_ABST
    Figure CN2024079361_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and particularly relates to a route selection method, and a network device and a computer-readable medium. The method comprises: a data control module of a network device acquiring route metadata which is registered by a first microservice to the network device, determining, according to authentication configuration information in the route metadata, a reordering result of a plurality of routes maintained in the network device, and providing the reordering result for a gateway core of the network device; and according to the reordering result of the plurality of routes, the gateway core configuring a first route among the plurality of routes to forward a first call request, wherein the first route is a route which can match the first call request and is ranked first in the reordering result, and the first call request is used for requesting the first microservice from a cloud platform. In this way, call requests corresponding to a plurality of microservices can be efficiently forwarded on some gateway routers with order priorities, thereby improving the opening efficiency of the microservices.
Need to check novelty before this filing date? Find Prior Art

Description

Routing method, network device and computer readable medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 13, 2023, with application number 202310699751.6 and application name “Routing Selection Method, Network Device and Computer-Readable Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of communication technology, and in particular to a routing selection method, network equipment and computer-readable medium. Background Art

[0003] With the development of cloud platforms, software service providers can host their own microservices on cloud platforms. These microservices can, for example, be software services within a developed software service system that implement different functions and process different types of data. After hosting, tenants can open the hosted microservice call interfaces (APIs) on the cloud platform, allowing software users to call these microservices and implement the corresponding service functions.

[0004] When tenants choose to open microservices, they can register the developed microservice APIs with the gateway router configured on the cloud platform server. This allows the cloud platform to assign a route to a request for a corresponding microservice through the gateway router, forwarding the request to the corresponding microservice. However, some current gateway cores only support assigning routes to requests according to a fixed routing order in a maintained routing list. This can cause some request requests to be prioritized for general routes that are ranked higher, rather than routes that are ranked lower. This can cause the routes ranked lower to become invalid, making it impossible to handle certain requests specifically.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a routing selection method, a network device, and a computer-readable medium, which can realize efficient forwarding of call requests corresponding to multiple microservices on some sequential priority gateway routers, thereby improving the efficiency of microservice opening.

[0007] In a first aspect, an embodiment of the present application provides a routing selection method, which is applied to a network device including a gateway core and a data control module, wherein the network device is applied to a cloud platform for storing microservices, and the method includes: the data control module obtains routing metadata registered by a first microservice to the network device, wherein the routing metadata is stored in a database storage space allocated by the cloud platform to the network device, and the routing metadata includes at least path information of a first interface provided by the first microservice and authentication configuration information for the first microservice; the data control module determines the reordering results of multiple routes maintained in the network device based on the authentication configuration information in the routing metadata, and provides the reordering results to the gateway core; the gateway core configures a first route among the multiple routes to forward a first call request based on the reordering results of the multiple routes, wherein the first route is a route that can match the first call request and is ranked first in the reordering results, and the first call request is used to request the first microservice in the cloud platform.

[0008] For example, the above-mentioned network device can be a gateway router applied on a cloud platform server, which is used to access call requests for microservices managed on the cloud platform. The supplier of microservices can host the developed microservices on the cloud platform and register the call interface (API) of the corresponding microservice with the gateway router of the cloud platform to open the microservice to the user. It can be understood that the gateway router can manage multiple routes, each of which is responsible for forwarding call requests for microservices of different types or with different authentication requirements. This type of gateway router can control the priority of the route based on the route order on the maintained route list, thereby forwarding the call request of the connected microservice. Among them, the route metadata refers to the original route data stored in the database. The data control module can parse the route metadata and push the parsed data to the gateway core, which eventually becomes the route configuration adopted by the gateway core when forwarding the microservice call request.

[0009] It can be understood that the above-mentioned routing selection method provided by the present application stores the corresponding authentication configuration information when the microservice registers the routing metadata, and then reorders the routing metadata according to the changes in the routing metadata when the call request for the microservice is accessed, and then accurately matches the routing that meets its type or authentication requirements for each currently accessed call request according to the reordered updated routing list for forwarding. Among them, if the gateway router can match a group of routes for the corresponding call request in the updated routing list, it can select the route ranked first from the group of routes as the route for forwarding the corresponding call request. In this way, it is possible to achieve efficient forwarding of call requests corresponding to multiple microservices on some gateway routers with sequential priorities, thereby improving the efficiency of microservice opening.

[0010] In a possible implementation of the first aspect above, the authentication configuration information includes a first identifier for marking that no permission authentication is required, and a second identifier for marking that permission authentication is required, wherein the permission authentication is used to identify whether the call requester has the calling permission to call the corresponding microservice or the calling permission to the related data processed by the corresponding microservice, and the first group of routes corresponding to the first identifier are arranged before the second group of routes corresponding to the second identifier.

[0011] For example, the first identifier and the second identifier can be letters, symbols or numerical values ​​that are distinguishable from each other. As mentioned above, the first identifier and the second identifier can be used to mark whether authorization authentication is required or not, and when the corresponding microservice call request is subsequently forwarded, the corresponding routes can be matched according to the call requests of microservices with different authentication requirements. It can be understood that for microservice call requirements that do not require authorization authentication, the corresponding matching routes that do not require authentication can be sorted in the front sequence position, and for microservice call requirements that require authorization authentication, the corresponding matching routes that require authentication can be sorted in the back sequence position. In this way, if there are some wildcard routes with a large matching range in the route list maintained by the gateway router, after reordering multiple routes according to the corresponding authentication configuration information, there will be no problem that some call requests that do not require authentication are configured to the wildcard routes that require authentication and are sorted in the front, thereby ensuring the accurate and effective forwarding of various microservice call requests that are connected.

[0012] In other embodiments, a larger number of identifiers may be preset in the data control module of the gateway router, for example, a first identifier, a second identifier, and a third identifier may be preset to mark other authentication conditions selected when the microservice registers routing metadata, etc., which is not limited here.

[0013] In a possible implementation of the first aspect above, the network device configures authentication configuration information for the first microservice in the following manner: the data control module detects that the first microservice selects not requiring permission authentication when registering the first interface with the network device, and configures the first identifier for the first microservice as the authentication configuration information; the data control module detects that the first microservice selects requiring permission authentication when registering the first interface with the network device, and configures the second identifier for the first microservice as the authentication configuration information.

[0014] In a possible implementation of the first aspect, the authentication configuration information is a ranking value that can determine the sequence position of the corresponding route in the reordering result, and the ranking value corresponding to the first identifier is greater than the ranking value corresponding to the second identifier.

[0015] For example, the authentication configuration information corresponds to a preset order value. The first identifier may correspond to a larger order value, while the second identifier may correspond to a smaller order value. Routes that match the larger order value may be assigned a higher position in the reordering process, while routes that match the smaller order value may be assigned a lower position in the reordering process.

[0016] In a possible implementation of the first aspect above, the data control module determines the reordering results of multiple routes maintained in the network device based on the authentication configuration information in the routing metadata, including: the data control module determines at least one group of routes in the multiple routes that respectively match at least one call request, wherein the at least one group of routes includes a first group of routes that matches the first call request; the data control module determines the first batch of writing the first group of routes into the sorting space based on the authentication configuration information, wherein the sorting space is a storage space allocated by the network device to the data control module for storing the reordering results; the data control module determines the reordering results of the multiple routes based on the batch order of each group of routes written in the sorting space.

[0017] Specifically, the gateway router's data control module can group individual routes and write them to a sorting space in batches based on authentication configuration information such as order values. Routes matching the same order value are grouped together and written to the sorting space. Routes with larger order values ​​are written to the sorting space in earlier batches, while routes with smaller order values ​​are written to the sorting space in later batches. This sorting space can be storage space allocated by the gateway router to the data control module for storing reordering information for each route or a list of reordered routes.

[0018] In a possible implementation of the first aspect, the reordering result includes sequence information after reordering the multiple routes, and providing the reordering result to the gateway core includes: the gateway core reads the sequence information generated corresponding to the reordering of the multiple routes from the sorting space.

[0019] In a possible implementation of the first aspect above, the gateway core configures a first route among the multiple routes to forward the first call request based on the reordering results of the multiple routes, including: the gateway core updates the sequence positions of the multiple routes in the route list based on the read sequence information; the gateway core determines the first group of routes in the route list that matches the first call request, and determines the route ranked first in the first group of routes as the first route.

[0020] In a possible implementation of the first aspect, the reordering result includes a reordered routing list, and providing the reordering result to the gateway core includes: the gateway core reading the reordered routing list from the sorting space.

[0021] In a possible implementation of the first aspect above, the gateway core configures a first route among the multiple routes to forward the first call request based on the reordering results of the multiple routes, including: the gateway core determines a first group of routes that matches the first call request based on the read reordered route list, and determines the route ranked first in the first group of routes as the first route.

[0022] In a second aspect, an embodiment of the present application provides a network device, which is applied to a cloud platform storing microservices, and the network device includes: a data control module, which is used to obtain routing metadata registered by a first microservice to the network device, wherein the routing metadata is stored in a database storage space allocated by the cloud platform to the network device, and the routing metadata includes at least path information of a first interface provided by the first microservice and authentication configuration information for the first microservice; and the data control module is used to determine the reordering results of multiple routes maintained in the network device based on the authentication configuration information in the routing metadata, and provide the reordering results to the gateway core; the gateway core is used to configure a first route among multiple routes to forward a first call request based on the reordering results of the multiple routes, wherein the first route is a route that can match the first call request and is ranked first in the reordering results, and the first call request is used to request the first microservice in the cloud platform.

[0023] In a third aspect, an embodiment of the present application provides a network device, comprising: one or more processors; one or more memories; one or more memories storing one or more programs, which, when executed by one or more processors, enables the electronic device to execute the routing selection method provided by the first aspect and various possible implementations.

[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having instructions stored thereon, which, when executed on a computer, causes the computer to execute the routing selection method provided by the first aspect and various possible implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 shows a schematic diagram of an application scenario of open microservices.

[0026] FIG2a is a schematic diagram showing a routing configuration scenario that depends on routing order.

[0027] FIG2 b is a schematic diagram showing the principle of a routing selection method provided in an embodiment of the present application being applied to a gateway router to adjust the routing order according to changes in routing metadata.

[0028] FIG3 is a schematic diagram showing the structure of a network device provided in an embodiment of the present application.

[0029] FIG4 is a schematic diagram showing an implementation flow of a routing selection method provided in an embodiment of the present application.

[0030] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] FIG1 shows a schematic diagram of an application scenario of open microservices.

[0032] As shown in Figure 1, the supplier of microservices can host the developed microservices on the cloud platform 200 through the development terminal 100a. For microservices that need to be open, the supplier can register the API with the gateway router 210 of the cloud platform 200. After registration, the corresponding microservice API and other data can be stored in the corresponding database 220 of the cloud platform 200. When needed, the user of the microservice can send a microservice call request to the cloud platform 200 through the terminal 100b. At this time, the gateway router 210 of the cloud platform 200 can forward the received microservice call request to the corresponding microservice based on the corresponding microservice API and other data stored in the database 220. It can be understood that the process of forwarding the call request through the gateway router 210 on the cloud platform 200 can be, for example, as follows: the gateway router 210 copies the message including the above-mentioned call request and forwards the copied message to the corresponding router according to the requested routing path. This application does not impose any restrictions on this.

[0033] Some current gateway routers can determine the priority of routes based on the route configuration, such as the gateway route priority determined by the Kong core, which determines the priority based on the number of route rules configured. The process of this type of gateway determining route priority is, for example: Route rule A configured on route A: {"hosts":["*example.com","foo-service.com"], "paths":[" / foo"," / bar"],"methods":["GET"]}; Route rule B configured on route B: {"hosts":["*example.com","foo-service.com"]}. Obviously, the configuration item of route rule A specifies three attributes, while route rule B specifies only one attribute. If a call request requests an API that meets both route rules A and B, route A will be matched first, that is, route A will have a higher priority.

[0034] However, if this type of gateway router relies solely on the maintained route order and does not support other routing configurations to determine gateway route priority, a call request that needs to be forwarded by a certain route may be prioritized by a higher-order wildcard route. In this case, the route originally requested by the call request may not be valid.

[0035] Furthermore, if the configuration for the first wildcard route requires authentication for the forwarded call request, while the route originally requested by the call request does not require authentication, there is a conflict between the two authentication conditions. In this case, if the gateway router continues to prioritize the first wildcard route for the call request according to the route order, it will not be able to meet the call request, which may eventually cause the microservice call to fail, affecting the user experience of the software user.

[0036] FIG2 a shows a schematic diagram of a routing configuration scenario that depends on routing order according to an embodiment of the present application.

[0037] As shown in Figure 2a, the routes used to forward call requests or related data packets in gateway router 210 using the Envoy core may include, but are not limited to, routes 101, 102, 103, ..., and n. The Envoy core may maintain a route list that, for example, stores path configuration information and configured routing rules for each of the routes listed above from top to bottom. Routes at the top of the list are prioritized and can be configured by the Envoy core as priority for forwarding call requests.

[0038] For example, route 101 is ordered before route 102, where the path configuration information for route 101 is " / aaa-service / **" and the path configuration information for route 102 is " / aaa-service / aa / cc." In this case, gateway router 210 will prioritize routing requests that can be forwarded to route 102 over requests that can be forwarded to route 101. This will prevent the specialized configuration for route 102 from taking effect, potentially leading to service call failures.

[0039] Furthermore, if the routing rule configured on route 101, for example, requires authentication processing for forwarded call requests, and the routing rule configured on route 102, for example, directly forwards the call request without authentication processing, if gateway router 210 still prioritizes forwarding the received call request by route 101 based on the routing order shown in FIG2a, the forwarding of the call request may fail, and the call request may not be delivered to the corresponding microservice. Clearly, the authentication conditions corresponding to the forwarded call request conflict with the authentication conditions configured on the wildcard route 101.

[0040] Therefore, for gateway routers that determine priority based on the order of routes maintained in the routing list, such as the gateway router of the Envoy core mentioned above, it is necessary to solve the problem that the routes ranked later cannot take effect according to the fixed routing order.

[0041] In order to solve the above problems, an embodiment of the present application provides a routing selection method. Specifically, the method applies an order mechanism in the gateway router, and when adding or modifying routing metadata, it dynamically configures an order value for the route according to the authentication configuration information. Afterwards, the data control module obtains the routing metadata registered with the network device and reorders the configurable routes according to the order value, and sorts the routes that can meet the above authentication configuration information before the wildcard routes. In this way, after the gateway core of the gateway router adjusts the order of the routes in the routing list according to the reordered order information, it can preferentially configure the forwarding of the routes that are ranked first at this time to implement the above microservice call request.

[0042] The above-mentioned authentication configuration information can be, for example, an order value assigned to the corresponding microservice. The order value can be stored in the database of the cloud server together with the routing metadata registered by the microservice, or the order value can also be marked on the routing metadata registered by the corresponding microservice. Among them, if the microservice chooses not to perform permission authentication when registering, the routing metadata corresponding to the registration of the microservice can be marked with a higher order value. Conversely, if the microservice chooses to perform permission authentication when registering, the routing metadata corresponding to the registration of the microservice can be marked with a lower order value. Routing metadata refers to the original routing data stored in the database. The data control module can parse the routing metadata and push the parsed data to the gateway core, which eventually becomes the routing configuration adopted by the gateway core when forwarding the microservice call request.

[0043] It can be understood that the above-mentioned permission authentication is used to identify whether the call requester has the permission to call the corresponding microservice or the permission to call the relevant data processed by the corresponding microservice, and is not limited here.

[0044] As an example, FIG2b shows a schematic diagram showing the principle of applying a routing selection method to a gateway router to adjust routing configuration accordingly according to an embodiment of the present application.

[0045] When routing metadata changes, gateway router 210', which implements the aforementioned sorting mechanism, can generate corresponding sorting information based on the changed sorting values ​​in the routing metadata, such as the order values ​​marked on data such as microservice interfaces. This sorting information can dynamically adjust the order of routes in the routing list maintained by the gateway core.

[0046] It can be understood that the change of the above-mentioned routing metadata can be triggered by the supplier's tenant changing the authentication configuration of the corresponding microservice, etc., and the change of the routing metadata can include a change in the corresponding authentication configuration information.

[0047] As shown in Figure 2b, for example, a call request to a microservice that does not require authentication would be prioritized for forwarding to route 101 in the routing list shown in Figure 2a. After adjusting the order information generated based on the order value, gateway router 210''s routing list is adjusted to second place. At this point, the first-ranked route in the routing list may be route 102.

[0048] Thus, in the aforementioned example, for microservice call requests that do not require authorization authentication, route 102 that does not require authentication processing can be preferentially configured for forwarding. Microservice call requests that require authentication processing can be sequentially configured to route 101 for forwarding. It can be seen that even if the wildcard route 101 can be configured to receive call requests that need to be forwarded by route 102, at this time, due to the sorting adjustment in the route list, route 101 will not affect the process of configuring route 102 to forward the corresponding call request. That is, route 102 or other routes can be configured preferentially in the dynamic sorting adjustment so that they can take effect, and therefore will not lead to a waste of some routing resources in the gateway router.

[0049] Furthermore, for microservice call requests that don't require authentication, the gateway router dynamically reorders routes that don't require authentication to the top of the route list. This prevents authentication conflicts caused by wildcard routes that require authentication but are configured to forward microservice call requests that don't require authentication, ensuring that microservice call requests are effectively forwarded, thereby improving microservice call efficiency.

[0050] It can be understood that the routing selection method provided by this application can achieve efficient forwarding of microservice call requests corresponding to multiple microservices without changing the original gateway router's rule of determining routing priority based on routing order, thereby improving the efficiency of microservice opening. Furthermore, this implementation process only optimizes and improves the routing configuration of existing network devices such as the Envoy gateway, and does not increase the equipment cost of the gateway router.

[0051] The routing selection method provided in the embodiments of the present application is applicable to electronic devices including, but not limited to, cloud servers, server clusters, mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, netbooks, smart TVs, in-vehicle devices, reader devices, and other electronic devices embedded or coupled with one or more processors and capable of accessing the Internet. Electronic devices such as cloud servers and server clusters can serve as the operating entities of the cloud platform 200 in the scenario shown in FIG. Mobile phones, tablet computers, desktop computers, and other electronic devices can serve as the terminals 100a or 100b in the scenario shown in FIG. This application does not impose any restrictions on this.

[0052] Among them, electronic devices such as cloud servers that support the operation of the cloud platform 200 can be equipped with network devices that apply the routing selection solution provided by this application, such as gateway routers using the envoy core, etc., and this application does not impose any restrictions on this.

[0053] Figure 3 shows a schematic diagram of the structure of a gateway router according to an embodiment of the present application. It is understood that the gateway router shown in Figure 3 can be, for example, gateway router 210' for implementing the principle shown in Figure 2b above, or can be another gateway router for forwarding corresponding call requests or other related data packets to open microservices, and this application does not impose any restrictions on this.

[0054] As shown in FIG. 3 , the gateway router 300 may include a gateway core 310 and a data control module 320 .

[0055] The gateway core 310 is used to execute the routing configuration on the gateway router 300 and maintain the routing order in the routing list. In the embodiment of the present application, the gateway core 310 can reorder the routes maintained in the routing list according to the routing order information sent by the data control module 320, that is, update the routing order in the routing list.

[0056] The data control module 320 is used to read the routing metadata generated when the corresponding microservice registers the open interface from the database according to the changes in the routing metadata. In addition, the data control module 320 can determine the route that matches the above-mentioned microservice call request based on the authentication configuration information carried in the registration data, such as the high or low order value, and execute the preset sorting mechanism to generate sorting information accordingly. In the generated sorting information, for example, the above-mentioned matched route can be sorted at the top of the routing list, that is, the first in the sequence. Furthermore, the data control module 320 can send the above-mentioned generated sorting information to the gateway core 310, so that the gateway core 310 can configure the order of each route maintained in the routing list.

[0057] It is understood that the structure shown in FIG3 does not constitute a structural limitation on the gateway router applicable to the routing selection method provided in this application. In other embodiments, the gateway router used to implement the routing selection method provided in this application may include more or fewer structures than those shown in FIG3, and this application does not impose any limitation on this.

[0058] Based on the structure shown in FIG3 above, FIG4 shows a schematic diagram of an interaction process of a routing selection method according to an embodiment of the present application.

[0059] It is understood that in the embodiment of the present application, the interaction process shown in FIG4 may involve the interaction between the gateway core 310 and the data control module 320 in the gateway router 300 shown in FIG3. In other embodiments, the structure of the gateway router used to implement the interaction process shown in FIG4 may also be other, and this application does not limit this.

[0060] As shown in FIG4 , the interaction process may include the following steps:

[0061] 401: The data control module 320 reads the routing metadata registered by the corresponding microservice from the database.

[0062] Exemplarily, when a supplier opens a microservice, when registering the API of the microservice with the gateway router 300, the corresponding interface information and the authentication configuration information corresponding to whether authentication is selected can be stored as routing metadata of the corresponding microservice in the corresponding database provided by the cloud platform 200. Among them, the authentication configuration information can be used to identify whether the corresponding microservice performs permission authentication on the corresponding call request when it is called. For example, the above-mentioned authentication configuration information can be a numerical value, such as the order value configured by the data control module 320 of the gateway router 300 according to the result of whether to perform permission authentication when the microservice is registered. Therefore, when the routing metadata changes, the data control module 320 of the gateway router 300 will read the detailed configuration information from the above-mentioned database according to the changed data.

[0063] It can be understood that the routing metadata read by the data control module 320 may include the requested microservice API information and authentication configuration information, such as order value.

[0064] It is understood that the order mechanism used by the data control module 320 in the gateway router 300 can essentially be a numerical matching mechanism. For example, based on this order mechanism, the data control module 320 can automatically configure the corresponding order value when selecting whether to perform permission authentication when registering a microservice.

[0065] As an example, for microservices that require permission authentication, the automatically configured order value can be lower; for microservices that do not require permission authentication, the automatically configured order value can be higher.

[0066] In other embodiments, when registering an open interface with the gateway router, the microservice opened by the supplier may also set routing rules other than authentication. Accordingly, the sorting mechanism implemented by the data control module 320 may automatically configure a corresponding order value for the microservice. This order value may include two values, a higher and a lower value, or multiple values ​​of varying magnitudes, although this application does not impose any restrictions on this.

[0067] 402: The data control module 320 determines the sorting result of each route maintained in the current route list according to the authentication configuration information in the route metadata.

[0068] Exemplarily, the data control module 320 can identify authentication configuration information, such as an order value, from the read routing metadata. Furthermore, the data control module 320 can determine the priority of the routes that can be used to forward the above-mentioned call request, or the routing priority, based on the order value. For example, a higher order value corresponds to a higher priority of the configurable route, and a lower order value corresponds to a lower priority of the configurable route. If the order values ​​in the routing metadata of the microservices corresponding to the multiple microservice call requests to be forwarded are the same, the priorities of the corresponding configurable routes can be the same. Therefore, based on the order value in the data interface, the data control module 320 can determine the sorting result of each route in the routing list currently maintained in the gateway router 300.

[0069] 403: The data control module 320 generates re-ordered routing order information according to the order result.

[0070] For example, referring to the routing list illustrated in FIG2b above, the routes with higher priorities determined by the order value can be sorted at the top of the routing list, such as route 102; the routes with lower priorities determined by the order value can be sorted at the bottom of the routing list, such as route 101, etc. Among them, the routing rules corresponding to the configuration of route 102 do not need to authenticate the forwarded call request, so that it can match the authentication configuration marked with the higher order value above, that is, the corresponding microservice does not need to be authenticated when it is called. The routing rules corresponding to the configuration of the wildcard route 101 need to authenticate the forwarded call request, so that it can match the authentication configuration marked with the lower order value above, that is, the corresponding microservice needs to be authenticated when it is called.

[0071] After the data control module 320 performs step 402 to determine the sorting results for each route based on the order value, it can write each route into the designated storage space of the gateway router 300 in ascending order of the corresponding order value. The process of writing the route information can generate corresponding route sorting information and store it in the storage space. The above writing process can group and write in batches according to order values ​​of different sizes. For example, routes corresponding to lower order values ​​can be written to the designated storage space first, while routes corresponding to higher order values ​​can be written to the designated storage space later. If the order values ​​corresponding to multiple routes are the same, these routes can be divided into the same group and written to the designated storage space in the same batch. This helps improve the efficiency of generating the re-sorted route sorting information, and thus helps improve the efficiency of the gateway router 300 in processing incoming microservice call requests.

[0072] Furthermore, in the process of reordering the generated routing order information, the above-mentioned delayed writing in batches can ensure the execution accuracy of the reordering, which is conducive to ensuring the correctness of the forwarding function of each routing execution for the corresponding call request.

[0073] 404: The gateway core 310 reads the reordered routing information from the data control module 320 and updates the routing list.

[0074] Exemplarily, the routing ordering information formed by the routing information written by the data control module 320 to the designated storage space can be read by the gateway core 310 and used to update the routing list maintained on the gateway router 300. For example, if the routing information written to the designated storage space is given priority in step 403, then the routes indicated by the routing information can be preferentially configured at the bottom of the routing list after the gateway core 310 updates the routing list. Conversely, for one or a group of routing information that is written later, the routes indicated by the routing information will be configured at the top of the routing list after the gateway core 310 updates the routing list.

[0075] In other embodiments, the routing ordering information generated by the data control module 320 in step 403 can also be used to directly apply to the routing list maintained by the gateway router 300. For example, the data control module 320 can update the routing list while writing routing information in groups and batches to a designated storage space. Furthermore, the data control module 320 can directly provide the updated routing list to the gateway core 310 for use. In this manner, the routing table received by the gateway core 310 is already sorted. This application does not impose any restrictions on this.

[0076] 405: The gateway core 310 configures a route for the microservice call request to be forwarded according to the updated routing list.

[0077] For example, the updated routing list can refer to the routing list shown in FIG. 2b above. Based on this routing list, the gateway core 310 can prioritize routing 102 for the microservice call request to be forwarded that does not require authentication. Referring to the scenario shown in FIG. 1 above, after a user sends a microservice call request to the cloud platform 200 via terminal 100b, the gateway router on the cloud platform 200 can access and forward the call request. This call request is the microservice call request to be forwarded.

[0078] 406: The gateway core 310 forwards the call request using the configured routing.

[0079] It is understood that the relationship between the number of microservices and the routes maintained in the routing list can be a one-to-many relationship. Each microservice may be requested by multiple users, and the request information for each user's call request for the same microservice is different. Therefore, for different call requests from different users to call the same microservice, the gateway router 300 can control the order of the routes in the routing list according to the execution process of steps 401 to 406 above to meet the forwarding requirements of these different call requests.

[0080] In this scenario, the microservices requested by different call requests may select the same authentication rules when registering the API, and the gateway router 300 is configured with the same order value. However, this shared order value can determine a set of routes used to forward different call requests from different users. Each route can be configured for different users to forward the corresponding call requests.

[0081] Figure 5 shows a schematic diagram of the structure of an electronic device 500 according to an embodiment of the present application. In this embodiment of the present application, the electronic device 500 may be a cloud server, server, or server cluster that supports the operation of the aforementioned cloud platform 200. The cloud platform 200 may be, for example, a cloud service platform that supports the operation of an insurance business system, without limitation herein.

[0082] As shown in Figure 5, in some embodiments, the electronic device 500 may include one or more processors 504, a system control logic 508 connected to at least one of the processors 504, a system memory 512 connected to the system control logic 508, a non-volatile memory (NVM) 516 connected to the system control logic 508, and a network interface 520 connected to the system control logic 508.

[0083] In some embodiments, the processor 504 may include one or more single-core or multi-core processors. In some embodiments, the processor 504 may include any combination of general-purpose processors and specialized processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments where the electronic device 500 employs an eNB (evolved Node B) or a RAN (Radio Access Network) controller, the processor 504 may be configured to execute various embodiments, for example, one or more of the multiple embodiments shown in FIG. 1 to FIG. 5 .

[0084] In some embodiments, system control logic 508 may include any suitable interface controller to provide any suitable interface to at least one of processors 504 and / or any suitable device or component in communication with system control logic 508 .

[0085] In some embodiments, the system control logic 508 may include one or more memory controllers to provide an interface to the system memory 512. The system memory 512 may be used to load and store data and / or instructions. In some embodiments, the system memory 512 of the electronic device 500 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0086] NVM 516 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM 516 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of an HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0087] NVM 516 may include a portion of storage resources on a device on which electronic device 500 is installed, or it may be accessible to the device but not necessarily part of the device. For example, NVM 516 may be accessed over a network via network interface 520.

[0088] In particular, system memory 512 and NVM / storage 516 may include, respectively, a temporary copy and a permanent copy of instructions 524. Instructions 524 may include instructions that, when executed by at least one of processors 504, cause electronic device 500 to implement the methods illustrated in Figures 3-4. In some embodiments, instructions 524, hardware, firmware, and / or software components thereof may additionally or alternatively reside in system control logic 508, network interface 520, and / or processor 504.

[0089] The network interface 520 may include a transceiver for providing a radio interface for the electronic device 500, thereby communicating with any other suitable device (such as a front-end module, an antenna, etc.) via one or more networks. In some embodiments, the network interface 520 may be integrated with other components of the electronic device 500. For example, the network interface 520 may be integrated with at least one of the processor 504, the system memory 512, the NVM 516, and a firmware device (not shown) having instructions. When at least one of the processors 504 executes the instructions, the electronic device 500 implements the methods shown in Figures 1 to 5 above.

[0090] The network interface 520 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 520 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0091] In one embodiment, at least one of the processors 504 may be packaged together with logic for one or more controllers of the system control logic 508 to form a system-in-package (SiP). In one embodiment, at least one of the processors 504 may be integrated on the same die with logic for one or more controllers of the system control logic 508 to form a system-on-chip (SoC).

[0092] Electronic device 500 may further include an input / output (I / O) device 532. I / O device 532 may include a user interface that enables a user to interact with electronic device 500; peripheral component interfaces may also be designed to enable peripheral components to interact with electronic device 500. In some embodiments, electronic device 500 may further include a sensor for determining at least one of environmental conditions and location information related to electronic device 500.

[0093] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0094] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0095] In some embodiments, the sensors may include, but are not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 520 to communicate with components of a positioning network (e.g., Global Positioning System (GPS) satellites).

[0096] References in the specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one exemplary implementation or technique disclosed according to the embodiment of the present application. The appearances of the phrase "in one embodiment" in various places in the specification do not necessarily all refer to the same embodiment.

[0097] The disclosure of the embodiments of the present application also relates to an operating device for executing the text. The device can be constructed specifically for the required purpose or it can include a general-purpose computer that is selectively activated or reconfigured by a computer program stored in the computer. Such a computer program can be stored in a computer-readable medium, such as, but not limited to, any type of disk, including a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC) or any type of medium suitable for storing electronic instructions, and each can be coupled to a computer system bus. In addition, the computer mentioned in the specification can include a single processor or can be an architecture involving multiple processors for increased computing power.

[0098] In addition, the language used in this specification has been primarily selected for readability and instructional purposes and may not be selected to describe or limit the disclosed subject matter. Therefore, the present disclosure of embodiments is intended to illustrate, not to limit, the scope of the concepts discussed herein.

Claims

1. A routing selection method, It is characterized in that Applied to a network device including a gateway core and a data control module, wherein the network device is applied to a cloud platform storing microservices, the method comprising: The data control module obtains routing metadata registered by the first microservice to the network device, wherein the routing metadata is stored in a database storage space allocated by the cloud platform to the network device, and the routing metadata includes at least path information of a first interface provided by the first microservice and authentication configuration information for the first microservice; The data control module determines a reordering result of a plurality of routes maintained in the network device according to the authentication configuration information in the routing metadata, and provides the reordering result to the gateway core; The gateway core configures a first route among the multiple routes to forward a first call request according to the reordering results of the multiple routes, wherein the first route is a route that can match the first call request and is ranked first in the reordering results, and the first call request is used to request a first microservice in the cloud platform.

2. The method according to claim 1, It is characterized in that The authentication configuration information includes a first identifier for marking that no authorization authentication is required, and a second identifier for marking that authorization authentication is required, wherein: The authority authentication is used to identify whether the call requester has the authority to call the corresponding microservice or the authority to call the relevant data processed by the corresponding microservice, and The first group of routes that match the first identifier are arranged before the second group of routes that match the second identifier.

3. The method according to claim 2, It is characterized in that The network device configures the authentication configuration information for the first microservice in the following manner: The data control module detects that the first microservice registers the first interface with the network device and selects that no permission authentication is required, and configures the first identifier as authentication configuration information for the first microservice; The data control module detects that the first microservice needs to authenticate the first interface when registering the first interface with the network device, and configures the second identifier as authentication configuration information for the first microservice.

4. The method according to claim 3, It is characterized in that The authentication configuration information is a ranking value capable of determining a sequence position of a corresponding route in the reordering result, and, The ranking value corresponding to the first identifier is greater than the ranking value corresponding to the second identifier.

5. The method according to claim 1, It is characterized in that The data control module determines, according to the authentication configuration information in the routing metadata, a reordering result of the plurality of routes maintained in the network device, including: The data control module determines at least one group of routes among the plurality of routes that respectively matches the at least one call request, wherein the at least one group of routes includes a first group of routes that matches the first call request; The data control module determines, according to the authentication configuration information, to write the first group of routes into a first batch of a sorting space, wherein the sorting space is a storage space allocated by the network device to the data control module for storing reordering results; The data control module determines a reordering result of the plurality of routes according to a batch order of each group of routes written into the sorting space.

6. The method according to claim 5, It is characterized in that The reordering result includes sequence information after the multiple routes are reordered, and, Providing the reordering result to the gateway core includes: The gateway core reads sequence information corresponding to the reordering of the multiple routes from the sorting space.

7. The method according to claim 6, It is characterized in that The gateway core configures a first route among the multiple routes to forward the first call request according to the reordering results of the multiple routes, including: The gateway core updates the sequence positions of the multiple routes in the route list according to the sequence information read; The gateway core determines a first group of routes in the route list that match the first call request, and determines a route that is ranked first in the first group of routes as the first route.

8. The method according to claim 5, It is characterized in that The reordering result includes a reordered routing list, and, Providing the reordering result to the gateway core includes: The gateway core reads the reordered routing list from the sorting space.

9. The method according to claim 8, It is characterized in that The gateway core configures a first route among the multiple routes to forward the first call request according to the reordering results of the multiple routes, including: The gateway core determines a first group of routes matching the first call request based on the read reordered route list, and determines the route ranked first in the first group of routes as the first route.

10. A network device, It is characterized in that Applied to a cloud platform storing microservices, and the network device includes: A data control module is used to obtain routing metadata registered by the first microservice to the network device, wherein the routing metadata is stored in a database storage space allocated by the cloud platform to the network device, and the routing metadata at least includes path information of the first interface provided by the first microservice and authentication configuration information for the first microservice; and The data control module is used to determine the reordering result of the multiple routes maintained in the network device according to the authentication configuration information in the routing metadata, and provide the reordering result to the gateway core; The gateway core is used to configure a first route among the multiple routes to forward a first call request according to the reordering results of the multiple routes, wherein the first route is a route that can match the first call request and is ranked first in the reordering results, and the first call request is used to request a first microservice in the cloud platform.

11. A network device, It is characterized in that include: one or more processors; One or more memories; wherein, The one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the network device executes the routing selection method according to any one of claims 1 to 9.

12. A computer readable medium, It is characterized in that The readable medium stores instructions, which, when executed on a computer, cause the computer to execute the routing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Micro-service access scheduling method, device, medium and electronic device

    CN109491801A

  • Routing method and device based on micro service, equipment and storage medium

    CN114118560A

  • Micro-service request processing method and device, equipment and medium

    CN114866617A

  • Route selection method, network equipment and computer readable medium

    CN116684493A

  • Policy based service routing

    US20190319885A1

Cited By

  • Micro-service optimization method and device, medium and electronic equipment

    CN120216102A