Network request processing method, apparatus, device, medium, and program product

By employing a full-link perspective routing algorithm that updates routes in real time and calculates routing costs from multiple dimensions, the problem of selecting the optimal path in network request traffic routing is solved, thereby improving service quality and business stability.

CN117956033BActive Publication Date: 2026-11-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211277952.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2026-11-24
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

In the process of routing network request traffic, existing technologies have difficulty accurately selecting the optimal routing path, leading to service quality issues.

Method used

By dynamically updating the routing cost of each call path in real time, and combining multi-dimensional cost calculation metrics, a routing algorithm based on the whole-link perspective is adopted to dynamically calculate and update the optimal path from the starting business node to the target business node in real time.

Benefits of technology

It improved the service quality of network requests, reduced the failure rate of online services and the problem of high request response, and ensured the service quality and user experience of business channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117956033B_ABST
    Figure CN117956033B_ABST
Patent Text Reader

Abstract

This application provides a network request processing method, apparatus, device, medium, and program product. The method includes: receiving a first network request; obtaining a first routing path and routing traffic of the first network request according to the first routing path; the first routing path is a routing path from a starting service node to a target service node that satisfies a path selection rule related to routing cost among multiple routing paths; obtaining the current routing cost of each call path in the first routing path, re-determined based on a cost calculation index; and determining a second routing path that satisfies the path selection rule from multiple routing paths based on the current routing cost, so as to route traffic of the second network request according to the second routing path. Through this application embodiment, traffic can be routed for network requests according to a better routing path, effectively improving the service quality of network requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to network request processing methods, network request processing apparatus, computer equipment, computer-readable storage media, and computer program products. Background Technology

[0002] With the rapid development of internet technology, the internet network structure has become increasingly complex. When a network request travels from a source node to a destination node, it can be achieved through different routing paths. However, significant quality differences can exist when network requests are routed based on different paths. Executing traffic routing based on a superior path improves the service quality of network requests, thereby enhancing the user experience. Conversely, executing traffic routing based on a inferior path severely impacts service quality, leading to a series of online service quality issues. Therefore, accurately selecting the optimal routing path for the current stage to achieve network request traffic routing is a pressing problem that needs to be solved. Summary of the Invention

[0003] This application provides a network request processing method, apparatus, device, medium, and program product, which can route network requests according to a better routing path, effectively improving the service quality of network requests.

[0004] Firstly, this application provides a network request processing method, the method comprising:

[0005] Receive the first network request and determine the starting service node and the target service node corresponding to the first network request;

[0006] Obtain the first routing path of the current record, and perform traffic routing for the first network request according to the first routing path; the first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node, and the path selection rules are associated with the routing cost of each call path in the routing path.

[0007] Obtain the current routing cost of each call path in the first routing path; the current routing cost is a routing cost re-determined based on the cost calculation index obtained in the target stage of the traffic routing process. The target stage includes at least one of the following: the stage in which the master control point in the call path processes the first network request by calling the controlled point, and the processing stage after obtaining the processing result of the first network request.

[0008] Based on the current routing cost, a second routing path that satisfies the path selection rules is determined from the multiple routing paths, so that when a second network request is received, the traffic of the second network request is routed according to the second routing path; the second network request corresponds to the starting service node and the target service node.

[0009] Secondly, this application provides a network request processing apparatus, the apparatus comprising:

[0010] The data acquisition module is used to receive the first network request and determine the starting service node and the target service node corresponding to the first network request.

[0011] The traffic routing module is used to obtain the first routing path currently recorded, and to perform traffic routing for the first network request according to the first routing path. The first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node. The path selection rules are associated with the routing cost of each call path in the routing path.

[0012] The calculation module is used to obtain the current routing cost of each call path in the first routing path. The current routing cost is a routing cost re-determined based on the cost calculation index obtained in the target stage of the traffic routing process. The target stage includes at least one of the following: a stage in which the main control point in the call path processes the first network request by calling the controlled point, and a processing stage after obtaining the processing result of the first network request.

[0013] The aforementioned calculation module is further configured to determine a second routing path that satisfies the aforementioned path selection rules from the aforementioned multiple routing paths based on the aforementioned current routing cost, so that when a second network request is received, the traffic of the second network request is routed according to the aforementioned second routing path; the aforementioned second network request corresponds to the aforementioned starting service node and the aforementioned target service node.

[0014] Thirdly, this application provides a computer device, including: a processor, a storage device, and a communication interface, wherein the processor, the communication interface, and the storage device are interconnected, wherein the storage device stores executable program code, and the processor is used to call the executable program code to implement the network request processing method described above.

[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions that are executed by a processor to implement the network request processing method described above.

[0016] Fifthly, this application provides a computer program product, which includes a computer program or computer instructions, which are executed by a processor to implement the network request processing method described above.

[0017] This application routes network requests according to a preferred first routing path upon receipt. During this routing process, it determines the current routing cost of each call path within the first routing path and then recalculates a preferred second routing path based on these costs. This second routing path is then used to route subsequent network requests. This method ensures that the search for a preferred routing path is based on the routing costs of each call path and path selection rules. Furthermore, the routing cost of each call path is determined based on cost calculation metrics obtained during the routing process. This allows the calculation of routing costs to incorporate multi-dimensional metric features, leading to more accurate acquisition of preferred routing paths and improved reliability. Compared to fixed routing paths obtained by assigning routing costs using configuration data from business nodes, this application dynamically updates the routing costs of each call path after network request routing. This enables accurate and real-time calculation of preferred routing paths, allowing for network request routing according to these preferred paths. This effectively improves the quality of service (GHS) of network requests and resolves GHS issues caused by unreasonable network traffic routing. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0019] Figure 1A This is a schematic diagram of a weighted round-robin routing algorithm provided in an exemplary embodiment of this application;

[0020] Figure 1B This is a schematic diagram of a routing algorithm based on local link routing cost provided in an exemplary embodiment of this application;

[0021] Figure 1C This is a schematic diagram of the architecture of a network request processing system provided in an exemplary embodiment of this application;

[0022] Figure 2 This is a flowchart illustrating a network request processing method provided in an exemplary embodiment of this application;

[0023] Figure 3This is a schematic diagram of a network structure of multi-level service nodes provided in an exemplary embodiment of this application;

[0024] Figure 4 This is a flowchart illustrating another network request processing method provided in an exemplary embodiment of this application;

[0025] Figure 5 This is a flowchart illustrating a traffic routing process provided in an exemplary embodiment of this application;

[0026] Figure 6 This is a schematic block diagram of a network request processing apparatus provided in an exemplary embodiment of this application;

[0027] Figure 7 This is a schematic block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0029] It should be noted that the terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature specified with "first" or "second" may explicitly or implicitly include at least one of those features.

[0030] To better understand the solutions of the embodiments of this application, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below.

[0031] 1. Network traffic: Network requests in a distributed microservice system.

[0032] 2. Request chain: A chain of requests consisting of the main control points and their corresponding controlled points in the business nodes at multiple levels.

[0033] 3. Heuristic Algorithm: Provides a feasible solution for each instance of the combinatorial optimization problem to be solved within an acceptable cost (referring to the cost in the time and space dimensions of computation), and the feasible solution needs to have a small deviation from the optimal solution.

[0034] 4. Main control point: The node that actively initiates the call in the network request.

[0035] 5. Regulated Node: The node that is invoked in a network request. For a master regulator, there may be multiple regulated nodes. The link formed by each master regulator and its corresponding regulated node is the call path.

[0036] 6. Routing Cost: The cost of resources such as machines, network, and time used by the primary control point in selecting downstream controlled points to execute network requests. This cost can be a single feature or a combination of multiple features. The lower the routing cost, the greater the probability that a node will be selected and execute a network request; the higher the routing cost, the lower the probability that a node will be selected and execute a network request.

[0037] 7. Route Weight: The probability that a node will be used when the master control point selects a downstream controlled point. It is usually an inverse function of the routing cost. The larger the route weight value, the greater the probability that the node will be selected and the network request will be executed; the smaller the route weight value, the lower the probability that the node will be selected and the network request will be executed.

[0038] 8. Routing algorithm (i.e., path selection rules in this application): The strategy algorithm or rule used by the main control point to select which downstream node to allocate traffic to based on routing weight or routing cost.

[0039] The embodiments of this application can be applied to various fields or scenarios such as cloud computing, cloud IoT, cloud gaming, artificial intelligence, vehicle scenarios, smart transportation, and assisted driving. Several typical fields or scenarios will be introduced below.

[0040] Cloud computing refers to the delivery and usage model of IT infrastructure, meaning obtaining necessary resources through the network in an on-demand and easily scalable manner. In a broader sense, cloud computing refers to the delivery and usage model of services, meaning obtaining necessary services through the network in an on-demand and easily scalable manner. These services can be IT and software, internet-related, or other services. This application can store data such as the current routing cost and secondary routing path at the current moment on a cloud server. When different data are needed, they can be directly retrieved from the cloud server, greatly improving data retrieval speed. This application is applied to traffic routing scenarios in cloud-related microservice systems, reducing the failure rate and response time of online services, and solving the online service quality problems of high failure rates and high request response times that may be caused by unreasonable network traffic routing.

[0041] Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. It enables thin clients with relatively limited graphics processing and data processing capabilities to run high-quality games. In cloud gaming, the game does not reside on the player's terminal but runs on a cloud server. The cloud server renders the game scene as a video and audio stream, which is then transmitted to the player's terminal via the network. This application applies to cloud gaming, dynamically updating the routing cost of the corresponding call path based on the actual processing status of each game service node, and calculating the optimal routing path in real time to provide the game service with a better quality of service, thereby improving the gaming experience for players.

[0042] In addition, this application can be applied to fields such as vehicle-mounted systems and traffic monitoring. For example, the traffic routing method proposed in this application can intelligently select appropriate traffic routing paths for systems such as traffic management systems, thereby improving the efficiency of law enforcement officers in handling violations while providing rapid feedback on system operations.

[0043] Currently, when calculating the optimal routing path, the configuration data of each business node is typically used to assign the routing cost of the corresponding call path, thereby calculating the current optimal routing path. However, the routing cost of each call path is a fixed value, and it is impossible to update the routing cost according to the actual situation of the call path.

[0044] Based on this, this application first provides a weighted round-robin routing algorithm. Please see [link to application]. Figure 1A This figure is a schematic diagram of a weighted round-robin routing algorithm provided in an exemplary embodiment of this application. Specifically, the master regulating point calculates the routing cost based on the service quality indicators returned by the regulated point or the hardware information of the downstream node machine, and combines it with the round-robin algorithm to select the downstream regulated point for execution. For example, Northern Request 1 (or Southern Request 1) determines the downstream regulated point according to the round-robin algorithm and routes it to the Northern data center (or Southern data center). The round-robin method can also be replaced by a random algorithm.

[0045] The above method can determine the downstream adjustment point based on the service quality indicators returned by the business nodes. However, it also has the following problems: different requests for the same service may have different performance costs, and sometimes requests with high performance costs may be randomly concentrated on a few service instances, resulting in high latency. At the same time, in a cold start state, the lack of cached data makes the processing capacity of the instance poor at startup.

[0046] Based on this, this application provides a routing algorithm based on local link routing weights. Specifically, the master control point obtains a list of downstream nodes (numbered 1-n), calculates the routing cost of each node (which can be obtained based on multiple cost calculation metrics), and then, according to the calculated routing cost, uses a routing algorithm strategy to select the node with the smallest routing cost from the nodes numbered 1-n.

[0047] Please see Figure 1B This figure is a schematic diagram of a routing algorithm based on local link routing cost provided by an exemplary embodiment of this application. The figure illustrates the relationship between throughput and latency for each regulated point (including regulated point 1 and regulated point 2). Assuming regulated point 2 is initially selected (note that the throughput of regulated point 1 cannot be 0; a default minimum value can be set, otherwise it will never be selected by subsequent requests), as the throughput of regulated point 2 increases, its latency also increases. When its throughput is Q2, the latency of regulated point 2 is the same as the latency of regulated point 1 at a throughput of Q1 (both are L1). If traffic continues to be allocated to regulated point 2, the latency of regulated point 2 will gradually exceed the latency of regulated point 1, so traffic will be allocated to regulated point 1. As the throughput of regulated point 1 increases, its latency gradually exceeds the latency of regulated point 2. At this point, traffic will be routed to regulated point 2 again, and so on, with traffic being allocated alternately. In the above process, the routing cost of a request only considers the situation of the regulated point directly below it, that is, it selects the regulated point with the lowest routing cost for traffic allocation. The above method only focuses on the routing cost of "this layer" between the current master adjustment point and the adjusted point, and fails to select nodes from the total routing cost from the perspective of the entire link, which will reduce the accuracy of selecting the best route path.

[0048] Based on the above method, this application provides a routing algorithm based on the sum of routing costs from a full-link perspective. This algorithm is a heuristic intelligent routing method for microservice traffic based on the N nearest neighbor mechanism, focusing on the complete path search for end-to-end time optimization of a network request, exploring a more global and optimized solution. It mainly includes two stages: The first stage starts from the initial service node (root node) of the network request. After a regulated point completes its network request, the routing cost from its master regulating point to it is dynamically updated in real time, ensuring that the routing cost reflects the latest quality status of the service network in real time. The second stage, after receiving cost update signals from the master regulating point and the regulated point, calculates the set of sums of routing costs for all possible paths in the end-to-end full-link of the network request under the current node, starting from the root node. These sums are then sorted in ascending order, retaining N candidate routing paths as possible routing paths from the current master regulating point to downstream regulated points. In the next step, based on the tail node of each path in the N candidate sets from the previous step, the process is repeated until the optimized solution path for the complete link is finally found. This application reduces the failure rate and response time of online services in content processing scenarios involving routing requests at the billion-level, effectively ensuring the quality of service (SLA) of business channels. Furthermore, the method proposed in this application, as a general algorithm mechanism, can be extended to microservice-related traffic routing scenarios, solving the online service quality problems of high failure rates and high request response times that may result from unreasonable network traffic routing in microservices.

[0049] The method proposed in this application effectively solves the problem of selecting the regulated point based on routing cost from a local perspective, providing a holistic view of the complete link quality of a network request from a global, sensitive, and business-oriented perspective. When a network request routes through a regulated point, the service quality indicators of that point are collected in real time, and the routing cost of each pair of primary and regulated points is updated in real time. The routing cost can be generated through diverse mechanisms, supporting both cost calculation based on a single dimension (e.g., time consumption, availability) and multi-feature fusion methods. Then, based on the latest updated routing cost in the network service topology and a heuristic algorithm using N nearest neighbors, the optimal path from the starting business node to the target business node is dynamically calculated and updated in real time. When the next request arrives, traffic is routed according to the latest optimal path, ensuring optimal traffic allocation from a global perspective. Compared to traditional solutions, this application ensures that the microservice system can provide real-time feedback on multi-dimensional network service quality indicators to routing costs, and at the same time, it provides a complete view of the overall routing cost of a network request from a full-link perspective, thereby planning the routing path of network traffic more comprehensively, ensuring online service quality, and providing stable business services.

[0050] It is understood that in the specific implementation of this application, data related to network requests, cost calculation indicators, etc. are involved. When the above embodiments of this application are applied to specific products or technologies, the collection, use and processing of related data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0051] This application will be specifically illustrated through the following embodiments:

[0052] Please see Figure 1C This figure is a schematic diagram of the architecture of a network request processing system provided in an exemplary embodiment of this application. The network request processing system may specifically include a terminal device 101, a first server 102, and a second server 103. The terminal device 101, the first server 102, and the second server 103 are connected via a network, such as a local area network (LAN), a wide area network (WAN), or the mobile internet. The user operates on the browser or client application of the terminal device 101, generating corresponding network requests (e.g., access requests, data retrieval requests). The server 102 can respond to these network requests, providing various services related to the network requests to the user.

[0053] In one embodiment, the terminal device 101 may be the initiator of the network request, the second server 103 may be a service node corresponding to multiple services (e.g., service A, service B, service C, etc.), and the first server 102 may be a management server for managing each service node and the terminal device.

[0054] Specifically, terminal device 101 can send a first network request to first server 102; first server 102 receives the first network request and determines the starting business node, target business node, and intermediate-level business node corresponding to the first network request from among the multiple business nodes included in second server 103; first server 102 obtains the currently recorded first routing path and performs traffic routing for the first network request according to the first routing path (for example, if the routing path recorded in the first routing path is: business node corresponding to business A - business node corresponding to business C - business node corresponding to business B, then traffic routing for the first network request is performed according to the order of business node corresponding to business A, business node corresponding to business C, and business node corresponding to business B); during the above traffic routing process, first server 102 obtains the routing cost index returned by each business node in the first routing path when performing traffic routing, and recalculates the current routing cost of each call path according to the returned routing cost index, and generates a second routing path based on the current routing cost; when first server 102 receives a second network request, it obtains the second routing path and performs traffic routing for the second network request based on the second routing path.

[0055] Terminal equipment 101 is also referred to as terminal, user equipment (UE), access terminal, user unit, mobile device, user terminal, wireless communication equipment, user agent, or user device. Terminal equipment can be smart home appliances, handheld devices with wireless communication capabilities (such as smartphones and tablets), computing devices (such as personal computers (PCs), in-vehicle terminals, smart voice interaction devices, wearable devices, or other smart devices, but is not limited to these).

[0056] The server (first server 102 or second server 103) can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0057] In one embodiment, the second server 103 (or the first server 102) may be a business server group storing business data (the business server group may be one business server or multiple business servers. The business server group may be a combination of a main server and multiple edge servers, or a combination of a main server, multiple intermediate servers, and multiple edge servers).

[0058] In one embodiment, the architecture of the network request processing system proposed in this application may further include a database. The database can store the current routing path and related data used to calculate the routing path. This data can be recorded in different database tables. For example, the database can be a database located on a server, i.e., a database built into or integrated with the server; the database can also be an external database connected to the server, such as a cloud database (i.e., a database deployed in the cloud). Specifically, it can be deployed based on any of the following: private cloud, public cloud, hybrid cloud, edge cloud, etc., thus allowing the cloud database to focus on different functions. For example, a database deployed in a private cloud uses basic cloud hardware that is the user's personal device, focusing more on serving a small group of users. A database deployed in a public cloud, on the other hand, is based on a third-party cloud platform, allowing the data stored in the database to be shared. Any user's data can be stored in this database, and similarly, any user can use the data in the database.

[0059] It is understood that the system architecture diagrams described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. For example, the network request processing method provided in the embodiments of this application can be executed not only by the first server 102, but also by other servers or server clusters that are different from the first server 102 and can communicate with the terminal device 101 and / or the second server 103. As another example, the method provided in the embodiments of this application can be performed by the second server 103 to perform functions such as dynamic updating of routing costs and real-time calculation of routing paths, without the need for a first server 102 to manage the terminal device 101 and the second server 103.

[0060] As will be known to those skilled in the art, Figure 1C The number of terminal devices and servers shown is merely illustrative. Any number of terminal devices and servers can be configured according to business needs. Furthermore, as system architecture evolves and new business scenarios emerge, the technical solutions provided in this application are also applicable to similar technical problems. In subsequent embodiments, "terminal device" will refer to the aforementioned terminal device 101, "management server" will refer to the aforementioned first server 102, and "business node" will refer to the aforementioned second server 103; these details will not be repeated in subsequent embodiments.

[0061] Please see Figure 2 This figure is a flowchart illustrating a network request processing method provided in an exemplary embodiment of this application, applied to a management server (referring to...). Figure 1C Taking the first server 102 in the example, the method may include the following steps:

[0062] S201. Receive the first network request and determine the starting service node and target service node corresponding to the first network request.

[0063] In this embodiment, the first network request is a network request sent by the terminal device to the management server, such as a data acquisition request or an access request. Executing the first network request requires the joint participation of multiple business nodes, which together form a call relationship chain. The management server routes the traffic of the first network request according to the order of the business nodes in the call relationship chain. The first network request corresponds to a starting business node, and the starting business node corresponds to a target business node. After determining the starting and target business nodes, multiple routing paths from the starting business node to the target business node can be determined. However, when the first network request is routed based on different routing paths, there will be significant quality differences. Executing traffic routing based on a poor routing path will greatly affect service quality and user experience. Therefore, this embodiment first determines multiple candidate routing paths based on the starting and target business nodes, and then determines the optimal routing path from these candidate paths for the first network request to route traffic.

[0064] In one embodiment, the starting service node can be carried in the first network request. When the management server receives the first network request, it can determine the corresponding target service node based on the starting service node carried in the first network request. Alternatively, the starting service node can be a service node selected by the management server based on the first network request. For example, if the first network request is a game data retrieval request, and the target game data is stored on different service servers, traffic routing is required. In this case, when selecting the starting service node, the management server can determine the starting service node based on selection rules (e.g., proximity access rules), and then determine the corresponding target service node based on the starting service node. The above method improves the flexibility of starting service node selection and facilitates providing a more suitable data root node for business services.

[0065] S202. Obtain the first routing path of the current record, and perform traffic routing for the first network request according to the first routing path; the first routing path is the routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node.

[0066] In this embodiment, the path selection rule is associated with the routing cost of each call path in the routing path. The first routing path is a routing path determined by the management server from multiple routing paths from the starting business node to the target business node according to the path selection rule. Specifically, when determining the first routing path according to the path selection rule, the management server obtains the routing cost of each call path in each routing path (a call path refers to the road segment between two adjacent business nodes in a routing path; a call path includes a primary adjustment point and a secondary adjustment point). Then, based on the routing cost of each call path in each routing path, the first routing path is determined. This ensures that the routing path is determined based on the routing cost of each call path, so as to obtain a better routing path more accurately and improve the reliability of the selection of the better routing path.

[0067] In one embodiment, the management server determines a superior routing path based on the routing costs of each call path among the currently known routing paths, stores it as the first routing path, and updates it in real time (e.g., updating the first routing path every second based on the updated routing costs of each call path among the routing paths). When the management server receives a network request at a certain time, it retrieves the stored, real-time updated first routing path for traffic routing of that network request. The first routing path can be the routing path with the minimum total routing cost among multiple routing paths from the starting service node to the target service node, or it can be the routing path with a smaller total routing cost selected according to path selection rules. The specific implementation of the superior path selection based on path selection rules will be described in detail in subsequent embodiments and will not be repeated here.

[0068] In one embodiment, the starting business node is a first-level business node, the target business node is an M-th level business node, and there are M-2 intermediate levels between the first level and the M-th level. Each intermediate level includes one or more intermediate business nodes, where M is an integer greater than or equal to 3. There is a call path between adjacent business nodes, which connects the main adjustment point and the adjusted point. The main adjustment point is the business node that initiates the call, and the adjusted point is the business node that is called. The level to which the adjusted point belongs is the next level below the level to which the main adjustment point belongs.

[0069] The following will be through Figure 3 To illustrate this, in Figure 3 In this example, with M=4, the starting business node is the first-level business node, and the target business node is the fourth-level business node. Please refer to [link / reference]. Figure 3This diagram illustrates a network structure of multi-level service nodes according to an embodiment of this application. The diagram includes multiple levels of service nodes, such as first-level, second-level, third-level, and fourth-level service nodes. Service nodes at adjacent levels can have a calling relationship. The starting service node (ip00 in the diagram) is a first-level service node, and the target service node (ip07 in the diagram) is a fourth-level service node. The starting service node (ip00) has calling relationships with multiple intermediate service nodes in the second-level service nodes, such as ip08, ip01, and ip02. ip08 has calling relationships with ip09 and ip03 in the third-level service nodes, ip01 has calling relationships with ip03 and ip04 in the third-level service nodes, and ip02 has calling relationships with ip05 and ip06 in the third-level service nodes. ip09, ip03, ip04, ip05, and ip06 in the third-level service nodes each have calling relationships with the target service node (ip07).

[0070] For example, for ip00 and ip08, the connection arrow between ip00 and ip08 represents the call path between ip00 and ip08, in which ip00 is the primary control point and ip08 is the controlled point. The "Cost: 1" between ip00 and ip02 means that the routing cost of the call path between ip00 and ip02 is 1.

[0071] It should be noted that each level of the multi-level business nodes can handle a certain type of business service request. The first-level business node ip00 in this application is only an example. In the first-level business node, there can be multiple business nodes (e.g., ip10, ip20, ip30, used to handle different requests under this level). ip10 (or ip20, or ip30) can also be used as the starting business node, and one of the corresponding fourth-level business nodes (e.g., ip19, ip29, or ip39) is the target business node. There are also multi-level business nodes between the starting business node and the target business node, which will not be elaborated in this embodiment.

[0072] S203. Obtain the current routing cost of each call path in the first routing path; the current routing cost is the routing cost re-determined based on the cost calculation index obtained in the target stage during the traffic routing process.

[0073] In this embodiment, when routing traffic for a first network request according to a first routing path, the management server can obtain the cost calculation metrics returned by the adjusted points when each master adjustment point in the first routing path calls the corresponding adjusted point for traffic routing. These cost calculation metrics returned by the adjusted point are determined by the adjusted point based on its own processing status or node-related information during traffic routing. By re-determining the current routing cost of each calling path using the cost calculation metrics obtained during traffic routing, the routing cost of the calling path can be dynamically updated. This allows the management server to calculate optimal routing paths in real time for subsequent network requests, thereby ensuring service quality and improving user experience.

[0074] In one embodiment, the cost calculation metrics include one or more of service quality metrics, resource metrics, and business attribute metrics. Service quality metrics include one or more of error rate, latency rate, service availability, network status, and response time. Resource metrics are determined based on node configuration data. Business attribute metrics include one or more of network request priority and network request complexity.

[0075] Among them, service quality metrics are generated based on the actual processing situation of the adjusted point when handling network requests, including error rate, service availability, network status, response time, etc. This type of metric can well represent the actual processing capacity of the adjusted point. Resource metrics are determined based on the node's configuration data, such as the adjusted point's processing rate, bandwidth, and server resource configuration data. This type of metric can well represent the theoretical processing capacity of the adjusted point. Business attribute metrics include network request priority and network request complexity. This type of metric incorporates business characteristics, such as high-priority traffic and urgent traffic. This type of metric can well represent the priority of the adjusted point when executing certain types of request data, so as to route network requests to business nodes that are more compatible with business attributes. By calculating the current routing cost of each call path from service quality metrics, resource metrics, and business attribute metrics using the above methods, the routing cost can be combined with business characteristics. By integrating multi-dimensional metrics, the accuracy of calculating the current routing cost is improved, so as to calculate the optimal routing path in real time. By performing traffic routing through optimized routing paths, the high failure rate and high request response rate that may be caused by unreasonable network traffic routing are reduced, ensuring service quality, improving user experience, and reducing the cost of traffic routing.

[0076] In one embodiment, the target stage includes at least one of the following: a stage in which the master control point in the call path processes the first network request by calling the controlled point, and a processing stage after obtaining the processing result of the first network request.

[0077] When the target stage is the first scenario (i.e., the stage where the primary control point in the call path processes the first network request by calling the controlled point), the management server can obtain cost calculation metrics during any primary control point's call to the controlled point to process the first network request. For example, service quality metrics, resource metrics, and business attribute metrics in cost calculation can all be obtained during the process of the primary control point calling the controlled point to process the first network request (including before and during processing).

[0078] When the target stage is the second scenario (i.e., the processing stage after obtaining the processing result of the first network request), the management server can calculate the cost metrics based on the processing result after obtaining the processing result of the first network request. For example, the error rate, latency rate, service availability, and response time in the service quality metrics require the management server to perform statistical analysis based on the current processing results after the master control point calls the controlled point to process the first network request (including at least two scenarios: the first is that any master control point in the first routing path calls the controlled point to complete the traffic routing, or it can be that all nodes in the first routing path have completed the traffic routing task), and finally obtain the service quality metrics.

[0079] It should be noted that the aforementioned service quality indicators, resource indicators, and business attribute indicators can be obtained in both the first and second scenarios, and this application does not limit them.

[0080] For traffic routing service providers, it is typically desirable to provide different routes for data traffic from objects of varying importance. For example, they may want to provide faster, higher-quality routes for high-priority data traffic related to important users, or offer a superior experience for applications with high network requirements, such as games and videos. This application incorporates these business characteristics, improving the matching degree between routing paths and business needs, achieving intelligent and differentiated routing path allocation, thereby improving service quality and user experience.

[0081] In one embodiment, since cost calculation metrics include multiple metrics, the methods for obtaining these metrics will differ. Obtaining cost calculation metrics can include two methods: First, the management server obtains them during the process of the master control point in the call path calling the controlled point to process the first network request. For example, resource metrics, network request priority, network request complexity, and some real-time processing status data (such as the processing rate over a certain period) can be obtained during the controlled point's processing of the first network request. Second, the management server obtains them after the master control point in the call path has completed processing the first network request. For example, data characterizing the status of the entire processing process, such as error rate, service availability, network status, and response time, can be obtained after the controlled point has completed processing the first network request. These methods improve the flexibility of obtaining cost calculation metrics.

[0082] In one embodiment, re-determining the current routing cost of each call path based on cost calculation metrics can include two methods: The first is that the management server determines the cost after any master regulating point in the call path has processed the first network request by calling the regulated point. The second is that the management server determines the cost after all master regulating points in all call paths within the routing path have processed the first network request by calling the regulated points.

[0083] The following will be based on Figure 3 The two scenarios are explained below: Assuming the first routing path is [ip00, ip01, ip03, ip07], in the first scenario, immediately after ip00 calls ip01 for processing, the routing cost of the calling path between ip00 and ip01 is updated and stored; immediately after ip01 calls ip03 for processing, the routing cost of the calling path between ip01 and ip03 is updated and stored; immediately after ip03 calls ip07 for processing, the routing cost of the calling path between ip03 and ip07 is updated and stored, thus updating the routing cost of the entire routing path. In the second scenario, only after each service node among ip00, ip01, ip03, and ip07 has completed its processing is the routing cost of each calling path in the routing path updated and stored, thus updating the routing cost of the entire routing path. The above method improves the flexibility of obtaining routing costs. The management server can periodically obtain the latest routing costs from the routing costs of each calling path in the stored routing paths in real time, so as to calculate the better routing path in real time and improve the accuracy of the better routing path calculation.

[0084] S204. Based on the current routing cost, determine a second routing path that meets the path selection rules from multiple routing paths, so that when a second network request is received, the traffic of the second network request is routed according to the second routing path.

[0085] In this embodiment, the current routing cost is the real-time updated routing cost of each call path determined by the management server based on the cost calculation indicators obtained during the traffic routing process. Based on the current routing cost, the management server determines a second routing path from multiple routing paths that meets the path selection rules, which is then used for traffic routing of the second network request. Since the second routing path is a superior routing path obtained by the management server based on the fusion of multiple cost calculations, the service quality of the second network request during traffic routing is guaranteed, improving the user experience.

[0086] In this embodiment, the second network request corresponds to both the starting service node and the target service node. That is, when the management server receives the second network request, it can determine a unique starting service node from among the multiple service nodes included in the first level based on the information carried in the second network request. This starting service node corresponds to a unique target service node, which is one of the multiple service nodes included in the final level. Between the first level and the final level, there are multiple intermediate levels (e.g., second and third levels). Multiple matching second-level nodes can be determined from the second level using the starting service node. Then, based on these multiple second-level nodes, multiple matching third-level nodes can be determined from the third level. All of these third-level nodes are connected to the target service node, ultimately forming a complete call chain from the starting service node through multiple intermediate levels to the target service node. It should be noted that this embodiment uses a minimum of two intermediate levels for illustration; other values ​​for the number of intermediate levels will not be discussed further in this embodiment.

[0087] In one embodiment, the management server needs to execute traffic routing for a network request before obtaining the latest routing costs for each call path to facilitate subsequent real-time calculation of a better routing path. However, in the initial state of the node network, there are no routing costs for each call path, making it impossible to calculate a better routing path based on the routing costs in the initial state of the node network. Therefore, it is necessary to assign values ​​to the routing costs of each call path in the initial state of the node network. The initial routing cost assignment method can be based on the resource indicators of the adjusted point (e.g., based on the processing rate, bandwidth, server resource configuration data of the adjusted point, etc.) or based on a random algorithm (i.e., randomly assigning routing costs within a certain range to each call path). It should be noted that the above initial routing cost assignment method should be reasonably selected according to the actual business situation to achieve better processing results. This application does not limit the initial routing cost assignment method. The above method ensures rapid startup in the initial state of the node network and improves the efficiency of calculating the better routing cost.

[0088] This application, as a general-purpose technical solution, can be widely applied to online systems based on microservice architecture, especially systems with high requirements for availability and timeliness service quality indicators such as system failure rate and response time. Examples include content processing platform (FIT) systems and online services such as settlement processing. FIT stands for Fiduciary Information. From a preventative perspective, this application achieves a more stable service experience through global traffic routing planning, thereby reducing the manpower cost of system maintenance. For online system service quality maintenance, there are two perspectives: proactive prevention and reactive remediation. This application, based on a proactive problem-solving approach, uses a proactive perspective to prevent problems from occurring during traffic routing based on routing algorithms, better ensuring service quality and avoiding the need for manpower to retrospectively remediate and resolve problems after they occur.

[0089] Based on the above embodiments, the beneficial effects of this application are as follows:

[0090] This application routes network requests according to the current optimal first routing path upon receiving them. During this routing process, it determines the current routing cost of each call path within the first routing path and then recalculates the current optimal second routing path based on these costs. This second routing path is then used to route subsequent network requests. This method ensures that the optimal routing path is determined based on the routing costs of each call path combined with path selection rules. Furthermore, the routing cost of each call path is determined based on cost calculation metrics obtained during the routing process. This allows the calculation of routing costs to incorporate multi-dimensional metric features, leading to more accurate acquisition of the optimal routing path and improving the reliability of optimal routing path selection. Compared to fixed routing paths obtained by assigning routing costs using configuration data from business nodes, this application dynamically updates the routing costs of each call path after network request routing. This facilitates accurate and real-time calculation of optimal routing paths by the management server for subsequent network request routing, resolving service quality issues caused by unreasonable network traffic routing, thereby ensuring service quality and improving user experience.

[0091] This application also proposes that the initial service node can be carried in the first network request or selected based on the first network request, improving the flexibility of initial service node selection and facilitating the provision of more suitable data root nodes for business services. The cost calculation metrics in this application can include service quality metrics, resource metrics, and business attribute metrics. By calculating the current routing cost of each call path using multiple cost calculation metrics, the routing cost can be integrated with multi-dimensional metric characteristics, improving the accuracy of current routing cost calculation. By combining business characteristics, the matching degree between routing paths and services is improved, enabling intelligent and differentiated routing path allocation, thereby improving service quality and user experience. This application also proposes assigning values ​​to the routing costs of each call path in the initial state of the node network based on the resource metrics of the adjusted point or a random algorithm, so as to calculate the optimal routing path in the cold start state, ensuring rapid startup in the initial state of the node network and improving the efficiency of optimal routing cost calculation.

[0092] This application also proposes that the cost calculation metric can be obtained in two ways: either it is obtained during the process of the master regulating point calling the regulated point to process the first network request, or it is obtained after the master regulating point calls the regulated point to process the first network request. This improves the flexibility of obtaining the cost calculation metric. Simultaneously, the update of the current routing cost in this application can also include two methods: either it is determined after any master regulating point calls the regulated point to process the first network request, or it is determined after all master regulating points in all calling paths in the routing path have called the regulated point to process the first network request. This improves the flexibility of obtaining the routing cost. The management server can periodically obtain the latest routing cost in real time from the routing costs of each calling path in each routing path stored in the database, and use this to calculate the optimal routing path in real time, improving the accuracy of the optimal routing path calculation.

[0093] Please see Figure 4 This figure is a flowchart illustrating a network request processing method provided in an exemplary embodiment of this application, applied to a management server (referring to...). Figure 1C Taking the first server 102 in the example, the method may include the following steps:

[0094] S401. Receive the first network request and determine the starting service node and the target service node corresponding to the first network request.

[0095] S402. Obtain the first routing path of the current record, and perform traffic routing for the first network request according to the first routing path; the first routing path is the routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node, and the path selection rules are related to the routing cost of each call path in the routing path.

[0096] S403. Obtain the current routing cost of each call path in the first routing path; the current routing cost is the routing cost re-determined based on the cost calculation index obtained in the target stage during the traffic routing process.

[0097] The target phase includes at least one of the following: a phase in which the main control point in the call path processes the first network request by calling the controlled point, and a processing phase after obtaining the processing result of the first network request.

[0098] In one embodiment, when routing traffic for a first network request according to a first routing path, the management server can obtain the cost calculation metrics returned by the adjusted points when each master adjustment point in the first routing path calls the corresponding adjusted point for traffic routing. These cost calculation metrics returned by the adjusted point are determined by the adjusted point based on its own processing status or node-related information during traffic routing. By re-determining the current routing cost of each calling path using the cost calculation metrics obtained during traffic routing, the routing cost of the calling path can be dynamically updated. This allows the management server to calculate optimal routing paths in real time for subsequent network requests, thereby ensuring service quality and improving user experience.

[0099] The specific implementation methods of steps S401 to S4303 are described in the previous embodiments, and will not be repeated here. The following will provide a detailed explanation of step S204, which involves determining the second route path that satisfies the path selection rules from multiple route paths based on the current route cost, through steps S404-S405.

[0100] S404. Obtain setting parameter N; Setting parameter N is used to indicate the number of call paths to select for business nodes when selecting paths.

[0101] In this embodiment, parameter N is set to a positive integer. Parameter N indicates the number of call paths selected for each service node during path selection. When N is at its maximum value, all possible candidate routes from the starting service node to the target service node are included in the path selection. The optimal route path with the minimum total routing cost is then selected from all possible candidate routes, realizing the selection of the optimal route path based on the idea of ​​minimizing global link routing cost. When N is 1, only one path from the starting service node to the target service node is included in the path selection. However, when N is 1, the call path selection at each service node is based on the idea of ​​minimizing local link routing cost, selecting the call path with the minimum routing cost. Therefore, parameter N needs to be set according to the actual business situation to maximize the selection of the optimal route path based on the idea of ​​minimizing global link routing cost, reduce the workload of calculating the optimal route path, and improve the efficiency of the optimal route path calculation.

[0102] S405. Based on the set parameter N, the current routing cost, and the historical routing costs of each calling path in the third routing path, determine the second routing path that meets the path selection rules from multiple routing paths, so that when the second network request is received, the traffic of the second network request is routed according to the second routing path.

[0103] The second network request corresponds to the starting service node and the target service node; the third routing path is any one of the multiple routing paths except for the first routing path.

[0104] In this embodiment, the current routing cost is the updated routing cost of each calling path in the first routing path after the first network request performs traffic routing based on the first routing path; the historical routing cost of each calling path in the third routing path is the routing cost of each calling path in other routing paths besides the first routing path. The management server determines a second routing path that meets the path selection rules from multiple routing paths according to the set parameter N, the current routing cost, and the historical routing cost, so that the second network request performs traffic routing based on the second routing path calculated by the updated routing path at the current time.

[0105] In one embodiment, the above-mentioned determination of a second route path that meets the path selection rules from multiple route paths based on the set parameter N, the current route cost, and the historical route costs of each called path in the third route path can be achieved according to the following steps.

[0106] (a1) For the first candidate business node, obtain the routing cost of each call path corresponding to the first candidate business node from the current routing cost and the historical routing cost of each call path in the third routing path.

[0107] In this embodiment, the first candidate service node is either the starting service node or an intermediate service node included in any intermediate level. When the level of the first candidate service node is the first level, the first candidate service node is the starting service node; when the level of the first candidate service node is an intermediate level, the first candidate service node is any one of one or more next-level candidate service nodes determined by the second candidate service node; the level to which the first candidate service node belongs is the next level below the level to which the second candidate service node belongs; the next-level candidate service node is the adjustment point on the call path ranked in the top X positions corresponding to the second candidate service node.

[0108] The starting business node is the first-level business node, the target business node is the M-th level business node, and there are M-2 intermediate levels between the first level and the M-th level. Each intermediate level includes one or more intermediate business nodes, where M is an integer greater than or equal to 3. There is a call path between adjacent business nodes, which connects the main adjustment point and the adjusted point. The main adjustment point is the business node that initiates the call, and the adjusted point is the business node that is called. The level to which the adjusted point belongs is the next level below the level to which the main adjustment point belongs.

[0109] Please see Figure 5This figure is a flowchart of a traffic routing process provided in this application. The relevant steps in this embodiment will be described below with reference to this figure. When the first candidate service node is at the first level (i.e., the starting service node), the management server first obtains the routing costs of each call path corresponding to the starting service node from the current routing cost and the historical routing costs of each call path in the third routing path (e.g., ...). Figure 5 As shown, the starting service node is ip00. The call paths corresponding to ip00 include three paths: ip00 to ip08, ip00 to ip01, and ip00 to ip02. The routing cost of the call path from ip00 to ip08 is 4, the routing cost of the call path from ip00 to ip01 is 2, and the routing cost of the call path from ip00 to ip02 is 1.

[0110] (a2) Based on the set parameter N and the routing cost of each call path corresponding to the first candidate business node, select the first X call paths from the call paths corresponding to the first candidate business node in order of routing cost from low to high; X is determined based on the set parameter N and the number Y of call paths corresponding to the first candidate business node.

[0111] In one embodiment, the management server determines the X call paths with the lowest routing costs that satisfy the set parameter N from the routing costs of each call path corresponding to the first candidate service node. Here, X is determined based on the set parameter N and the number Y of call paths corresponding to the first candidate service node, and the specific method for determining X can be implemented according to the following steps.

[0112] (a21) Determine the number Y of the call paths corresponding to the first candidate business node, and compare the number Y with the set parameter N.

[0113] (a22) If the comparison result indicates that Y is greater than or equal to N, then the value of X is determined to be N.

[0114] (a23) If the comparison result indicates that Y is less than N, then the value of X is determined to be Y.

[0115] In steps (a21-a23), the management server determines the value of X based on the comparison between the quantity Y and the set parameter N. When the quantity Y of the calling paths is greater than or equal to the set parameter N, the value of X is N, ensuring that only N calling paths are selected when selecting paths for business nodes, reducing the computational load of subsequent calculations for optimal routes and improving computational efficiency. When the quantity Y of the calling paths is less than the set parameter N, the value of X is Y, ensuring that all calling paths corresponding to the business node can be selected, guaranteeing the amount of data for the calling paths, and improving the accuracy of subsequent calculations for optimal routes.

[0116] The following will be based on Figure 5 To explain the above steps, assuming parameter N is set to 2, the call paths for the first candidate service node (ip00) include three paths: ip00 to ip08, ip00 to ip01, and ip00 to ip02. Therefore, the number Y of call paths corresponding to ip00 is 3. Comparing the number Y with the set parameter N, we find that Y is greater than N, so we determine that X is N, which is 2. The management server sorts the total routing costs of the call paths corresponding to ip00 and selects the top X (i.e., the top 2) call paths, resulting in the call path from ip00 to ip02 (total routing cost of 1) and the call path from ip00 to ip01 (total routing cost of 2).

[0117] It should be noted that this embodiment takes ip00 as the first candidate service node as an example. When selecting the top X call paths of ip00, the total routing cost is the routing cost from ip00 to a certain service node in the second level. When processing the next level call path based on ip01 (that is, selecting the top X call paths of a certain service node in the second level), the total routing cost from the starting service node through a service node in the second level to a service node in the third level will be calculated in this step. For example, when processing the top X call paths of ip01, the call paths include ip01 to ip03 and ip01 to ip04. At this time, the total routing cost of ip00 through ip01 to ip03 is 3, and the total routing cost of ip00 through ip01 to ip04 is 7. Based on the total routing cost, the currently determined call paths are selected (including two: ip00 through ip01 to ip03 and ip00 through ip01 to ip04).

[0118] (a3) Based on the top X call paths corresponding to each first candidate business node, determine one or more candidate routing paths from multiple routing paths, and determine a second routing path from one or more candidate routing paths.

[0119] In this embodiment, the management server, through the method provided in step (a2) above, can select a calling path starting from the initial service node based on path selection rules, thereby obtaining one or more candidate routing paths. The management server then determines the optimal routing path (e.g., the routing path with the lowest total routing cost) from the one or more candidate routing paths, which is the second routing path. The above method ensures that when multiple candidate routing paths are obtained based on path selection rules, the routing path with the lowest total routing cost can be determined. This reduces the computational load of the optimal routing path while ensuring high accuracy in calculating the optimal routing path, thereby guaranteeing service quality.

[0120] The following will be based on Figure 5 The above steps are explained below. Assuming parameter N is set to 2, based on the routing costs of each call path for ip00, the determined routing paths include [ip00, ip01] and [ip00, ip02]; based on the routing costs of each call path for ip01, the determined routing paths include [ip00, ip01, ip03] and [ip00, ip01, ip04]; based on the routing costs of each call path for ip02, the determined routing paths include [ip00, ip02, ip05] and [ip00, ip02, ip06]; based on the routing costs of each call path for ip03... The routing costs of each call path determine the following routing paths: [ip00, ip01, ip03, ip07]; the routing costs of each call path based on ip04 determine the following routing paths: [ip00, ip01, ip04, ip07]; the routing costs of each call path based on ip05 determine the following routing paths: [ip00, ip02, ip05, ip07]; and the routing costs of each call path based on ip06 determine the following routing paths: [ip00, ip02, ip06, ip07]. These results in four candidate routing paths. The management server then determines a second routing path from these four candidate paths.

[0121] In one embodiment, when calculating candidate routing paths, the management server can, at any level, retain at most N candidate routing paths for the next level's routing path calculation based on a set parameter N. This ensures that the final number of candidate routing paths for the entire link is less than or equal to N, further reducing the computational load of optimal routing paths and improving processing efficiency. Alternatively, the management server can select at most N call paths for the currently selected business nodes. After selecting candidate business nodes at each level, the maximum number of allowed candidate routing paths increases in multiples of N (e.g., when processing the second level, the maximum number of allowed candidate routing paths is N; when processing the third level, the maximum number of allowed candidate routing paths is N*N, and so on). Compared to the first method, this method can increase the amount of data to a certain extent, thereby improving the accuracy of optimal routing path calculation. Any of the above methods can be flexibly selected based on different business situations, balancing processing efficiency and accuracy to achieve better processing results. This embodiment does not limit this approach.

[0122] In one embodiment, the determination of a second routing path from one or more candidate routing paths can be achieved according to the following steps.

[0123] (b1) Determine the total routing cost of each candidate routing path in one or more candidate routing paths based on the current routing cost and the historical routing cost.

[0124] In one embodiment, assuming the routing path [ip00, ip01, ip03, ip07] is the first routing path, after the first network request performs traffic routing based on the first routing path, the routing costs of each calling path in the first routing path have been updated. The updated routing costs of each calling path in the first routing path are the current routing costs. The routing costs of other calling paths besides those included in the first routing path are the historical routing costs.

[0125] (b2) Based on the total routing cost of each candidate routing path, determine the candidate routing path with the minimum total routing cost from one or more candidate routing paths.

[0126] (b3) The candidate route path with the lowest total routing cost is determined as the second route path.

[0127] In one embodiment, the four candidate paths are: [ip00, ip01, ip03, ip07], [ip00, ip01, ip04, ip07], [ip00, ip02, ip05, ip07], and [ip00, ip02, ip06, ip07]. The management server first determines the total routing cost corresponding to each of the four candidate paths, which are 4, 8, 6, and 5, respectively. Then, the candidate routing path with the lowest total routing cost, namely [ip00, ip01, ip03, ip07], is selected as the second routing path.

[0128] After obtaining the second routing path, the management server stores it. When a second network request is received, it routes the traffic to the second network request according to the second routing path. After routing the traffic of the second network request, the management server updates the routing cost of each call path included in the second routing path and stores the updated routing cost of the call path (e.g., in the master control point of the corresponding call path). The management server can periodically (e.g., every second) calculate the current optimal routing path based on the updated routing cost of each call path in each routing path, so that when a new network request is received, the traffic of that network request is routed based on the current optimal routing path.

[0129] This application, as a general-purpose technical solution, can be widely applied to online systems based on microservice architecture, as well as systems with high requirements for availability and timeliness service quality indicators such as system failure rate and response time, such as content processing platform FIT systems and online services for settlement processing. From a preventative perspective, it can achieve a more stable service experience through global traffic routing planning, thereby reducing the manpower cost of maintaining the system. For online system service quality maintenance, it can be divided into a priori prevention perspective and a post-event remediation perspective. This application, based on the idea of ​​proactive problem-solving, uses a priori perspective to avoid problems during traffic routing based on routing algorithm mechanisms, better ensuring service quality and avoiding the need to invest manpower in post-event remediation, investigation, and problem-solving after problems occur.

[0130] Please see Figure 5 This diagram is a flowchart of a traffic routing process provided in this application. The following will combine... Figure 5 The processing flow of this application in a specific application scenario is described.

[0131] The key difference in this application lies in its comprehensive evaluation and analysis of the entire routing cost based on a heuristic path search algorithm, resulting in a relatively better routing path. The core innovation lies in the updating of routing costs and the routing algorithm itself. In a cold start state, this application can assign initial routing costs to each call path based on the machine's resource performance or a random algorithm for traffic routing. After a cold start, each network request is routed to each regulated point, and the regulated point will provide real-time feedback of its service quality index data (i.e., cost calculation index) to its master regulating point. Then, the optimal end-to-end path for the network request is updated in real-time for future use.

[0132] This embodiment will explain traffic routing from two aspects. The first aspect is: dynamically searching for the optimal path planning across the entire end-to-end link. The second aspect is: updating the routing cost from the primary adjustment point to the corresponding adjusted point in real time after traffic routing is executed. Figure 5 The (5-b) sub-graph in the diagram is a schematic diagram of the processing flow of the first aspect, and also shows the microservice network topology. Figure 5 Subgraph (5-a) in the diagram is a schematic representation of the processing flow for the second aspect. It should be noted that... Figure 5 In subgraph (5-a) of the diagram, there are two IP00s of different colors. These two IP00s of different colors represent the same service node, and the different colors are used to distinguish different routing paths. The same applies to the two IP07s of different colors in the same diagram, which will not be elaborated upon in this embodiment.

[0133] Specifically, for the N nearest neighbor algorithms upon which this application is based, N = 2 is chosen. The information stored at each master regulating point may include: the routing cost (mainly composed of a cost function) between the master regulating point and each downstream regulated point, and the current optimal downstream regulated point for each level of the master regulating point.

[0134] Specifically, the first aspect can include the following steps:

[0135] Step 1: Since the downstream regulated points of ip00 are ip08, ip01, and ip02, the routing cost between ip00 and ip08 is 4, the routing cost between ip00 and ip01 is 2, and the routing cost between ip00 and ip02 is 1, and N=2, we retain the top 2, selecting ip01 and ip02 with the lower routing cost as the routing branches for this network request. Therefore, the current preferred path candidates are:

[0136] (1) [ip00, ip01].

[0137] (2) [ip00, ip02].

[0138] Step 2: Based on Step 1, the tail nodes of the current better path candidates are ip01 and ip02. At this point, the next candidate routing paths may be: [ip00, ip01, ip03], [ip00, ip01, ip04], [ip00, ip02, ip05], and [ip00, ip02, ip06]. Calculate the total cost of each of these candidate routing paths, which are 3, 7, 5, and 4 respectively. Then sort them in descending order. Since N=2, keep the top 2 to obtain the current better candidate paths:

[0139] (1) [ip00, ip01, ip03].

[0140] (2), [ip00, ip02, ip06].

[0141] Step 3: Based on Step 2, the tail nodes of the current better candidate paths are ip03 and ip06. At this point, the next candidate routing paths may be: [ip00, ip01, ip03, ip07] and [ip00, ip02, ip06, ip07]. Calculate the total routing cost of each candidate routing path, which are 4 and 5 respectively. Then sort them in descending order. Since N=2, keep the top 2, and the current better candidate routing paths are:

[0142] (1), [ip00, ip01, ip03, ip07].

[0143] (2), [ip00, ip02, ip06, ip07].

[0144] Step 4: Having reached the end-to-end tail node (target service node), sort the total routing costs of each candidate route and take the top 1 to obtain the optimal route: [ip00, ip01, ip03, ip07], with a total routing cost of 1+2+1=4.

[0145] It should be noted that if the service node with the lowest routing cost is selected as the adjustment point in each path selection, the following will be obtained: Figure 5 The routing path formed by the nodes of the diagonal pattern in subgraph (5-b) (i.e., [ip00, ip02, ip06, ip07]) is obviously not an optimal routing path from a global perspective.

[0146] Step 5: Execute the network request based on the optimal routing path obtained in Step 4. After the network request is executed, update the latest routing cost of each calling path in the optimal routing path from Step 4 and save it to ip00, ip01, and ip03. Then, return to Step 1 above and periodically recalculate the current optimal routing path based on the latest routing cost. When a new network request arrives, execute the traffic routing for that request based on the recalculated current optimal routing path. Again, after the network request is executed, update the latest routing cost of each calling path in the optimal routing path and save it. This process is repeated automatically and continuously to optimize the network.

[0147] Steps 1-5 provided in the first aspect above describe the process by which the management server, when calculating candidate routing paths, retains a maximum of N candidate routing paths for the next level's routing path calculation based on a set parameter N at any given level. This ensures that the final number of candidate routing paths for the entire link is less than or equal to N, thereby reducing the computational load of optimal routing paths and improving processing efficiency. In one embodiment, the management server can also select up to N calling paths for each currently selected business node, allowing the maximum number of allowed candidate routing paths to increase in multiples of N after selecting candidate business nodes at each level. Compared to the first method, this method can increase the amount of data to a certain extent, thereby improving the accuracy of optimal routing path calculation. Any of the above methods can be flexibly selected based on different business situations, balancing processing efficiency and accuracy to achieve better processing results.

[0148] Based on this, the first aspect mentioned above can also be achieved through the following steps:

[0149] Step 1: Since the downstream regulated points of ip00 are ip08, ip01, and ip02, the routing cost between ip00 and ip08 is 4, the routing cost between ip00 and ip01 is 2, and the routing cost between ip00 and ip02 is 1, and N=2, we retain the top 2, selecting ip01 and ip02 with the lower routing cost as the routing branches for this network request. Therefore, the current preferred path candidates are:

[0150] (1) [ip00, ip01].

[0151] (2) [ip00, ip02].

[0152] Step 2: Based on Step 1, the tail nodes of the current preferred path candidates are ip01 and ip02. At this point, the next candidate routing paths may be: [ip00, ip01, ip03], [ip00, ip01, ip04], [ip00, ip02, ip05], and [ip00, ip02, ip06]. Calculate the total cost of each of these candidate routing paths, which are 3, 7, 5, and 4 respectively. Then sort them in descending order, because N = 2 (where N limits the maximum number of calling paths that any service node can select), and ip01 and ip02 each correspond to two callable service nodes (ip01 corresponds to ip03 and ip04, and ip02 corresponds to ip05 and ip06). Therefore, the current preferred candidate path is:

[0153] (1) [ip00, ip01, ip03].

[0154] (2) [ip00, ip01, ip04].

[0155] (3), [ip00, ip02, ip05].

[0156] (4) [ip00, ip02, ip06].

[0157] Step 3: Based on Step 2, the tail nodes of the current superior candidate paths are ip03, ip04, ip05, and ip06. At this point, the next candidate routing paths might be: [ip00, ip01, ip03, ip07], [ip00, ip01, ip04, ip07], [ip00, ip02, ip05, ip07], [ip00, ip02, ip06, ip07]. Calculate the total routing cost of each candidate path, which are 4, 8, 6, and 5 respectively. Then sort them in descending order. Because N = 2 (where N limits the maximum number of calling paths that any service node can select), and ip03, ip04, ip05, and ip06 each correspond to only one callable service node (ip03 corresponds to ip07, ip04 to ip07, ip05 to ip07, and ip06 to ip07). Therefore, the current superior candidate paths are:

[0158] (1), [ip00, ip01, ip03, ip07].

[0159] (2), [ip00, ip01, ip04, ip07].

[0160] (3), [ip00, ip02, ip05, ip07].

[0161] (4), [ip00, ip02, ip06, ip07].

[0162] Step 4: Having reached the end-to-end tail node (target service node), sort the total routing costs of each candidate route and take the top 1 to obtain the optimal route: [ip00, ip01, ip03, ip07], with a total routing cost of 1+2+1=4.

[0163] It should be noted that after selecting candidate service nodes at each level, this method increases the maximum number of allowed candidate routing paths in multiples of N (for example, when processing the second level, the maximum number of allowed candidate routing paths is N; when processing the third level, the maximum number of allowed candidate routing paths is N*N, and so on). Compared with the first method, this method will increase the number of selected routing paths to some extent.

[0164] Step 5: Execute the network request based on the optimal routing path obtained in Step 4. After the network request is executed, update the latest routing cost of each calling path in the optimal routing path from Step 4 and save it to ip00, ip01, and ip03. Then, return to Step 1 above and periodically recalculate the current optimal routing path based on the latest routing cost. When a new network request arrives, execute the traffic routing for that request based on the recalculated current optimal routing path. Again, after the network request is executed, update the latest routing cost of each calling path in the optimal routing path and save it. This process is repeated automatically and continuously to optimize the network.

[0165] The second aspect will explain how the routing cost from the primary control point to the corresponding controlled point is updated in real time after the traffic routing is executed. Specifically, the second aspect may include the following steps:

[0166] Step 1: Determine the optimal downstream adjustment point in the optimal routing path.

[0167] Step 2: Call the optimal downstream regulated point to execute the network request.

[0168] Step 3: Return the cost calculation metrics based on the execution information, and update the routing costs of the adjusted point and its master adjusted point based on the cost calculation metrics. It should be noted that this is a customized mechanism; the routing cost can be updated based on a single dimension of the cost calculation metrics, such as the error rate. Alternatively, the routing cost can be updated by fusing cost calculation metrics from multiple dimensions. The calculation logic is as follows:

[0169] Cost(ip(n),ip(n+1)) = func(service quality metrics, resource metrics, business attribute metrics)

[0170] Where ip(n) represents the nth service node, cost(ip(n), ip(n+1)) represents the routing cost between the nth and (n+1)th service nodes, and func() is the routing cost calculation function. Service quality metrics can include one or more of error rate, latency rate, service availability, network status, response time, and failure rate. Resource metrics are determined based on node configuration data, and business attribute metrics include one or more of network request priority and network request complexity. For example, the lower the error rate, latency rate, and response time of the adjusted point, the lower the routing cost between the adjusted point and the corresponding primary adjustment point.

[0171] In one embodiment, when the master regulating point calls the regulated point to execute a network request, the management server can obtain the original values ​​corresponding to each cost calculation indicator from the regulated point. Then, it preprocesses the original values ​​corresponding to each cost calculation indicator (e.g., normalizing the original values ​​to map them uniformly to the [0,1] interval; or scaling the original values ​​proportionally to make them fall within a specific interval). Finally, it adds the preprocessed data corresponding to each cost calculation indicator to obtain the combined routing cost of multiple cost calculation indicators for the regulated point. This method removes the unit restrictions of each indicator, converting them into dimensionless pure values, eliminating numerical differences between different indicators, and thus ensuring the accuracy of the routing cost calculation.

[0172] Among them, the Quality of Service (QoS) metrics are indicators generated based on the actual processing performance of the adjusted node when handling network requests. These include error rate, service availability, network status, and response time. This type of metric can effectively characterize the actual processing capacity of the adjusted node. Resource metrics are determined based on the node's configuration data, such as the adjusted node's processing rate, bandwidth, and server resource configuration data. This type of metric can effectively characterize the theoretical processing capacity of the adjusted node.

[0173] Business attribute metrics include network request priority and network request complexity. These metrics incorporate business characteristics, such as high-priority traffic and urgent traffic. They effectively characterize the priority of certain types of data requests executed by the adjusted points, facilitating the routing of network requests to business nodes that better match the business attributes. The methods described above calculate the current routing cost of each call path from service quality metrics, resource metrics, and business attribute metrics. This allows the routing cost to be combined with business characteristics, improving the accuracy of current routing cost calculations by integrating multi-dimensional metrics, thus enabling real-time calculation of optimal routing paths. Executing traffic routing through optimal paths reduces online service quality issues such as high failure rates and high request response levels that may result from unreasonable network traffic routing, ensuring service quality, improving user experience, and reducing traffic routing costs.

[0174] For traffic routing service providers, it is typically desirable to provide different routes for data traffic from objects of varying importance. For example, they may want to provide faster, higher-quality routes for high-priority data traffic related to important users, or offer a superior experience for applications with high network requirements, such as games and videos. This application incorporates these business characteristics, improving the matching degree between routing paths and business needs, achieving intelligent and differentiated routing path allocation, thereby improving service quality and user experience.

[0175] exist Figure 5 In the subgraph (5-b), the routing path composed of the black service nodes is the optimal routing path calculated by the method of this application, namely [ip00, ip01, ip03, ip07]. For example... Figure 5 As shown in sub-diagram (5-a), this diagram illustrates the process using the example of ip00 calling ip01 to execute a network request. Step 1: First, obtain the optimal downstream regulated point ip01 from the optimal routing path; Step 2: Call ip01 to execute the network request; Step 3: Return the cost calculation index based on the execution information of ip01, and update the routing cost from ip00 to ip01 based on the cost calculation index. It should be noted that after any network request executes traffic routing based on the optimal routing path, each calling path in the optimal routing path can update its routing cost using the above method, which will not be elaborated further in this embodiment.

[0176] The beneficial effects of the technical solution in this application can be summarized as follows:

[0177] (1) Global: From the perspective of routing cost across the entire end-to-end link, it enables a wider range of searches for better traffic routing paths, solving the problem of the local optimal solution that the current mainstream algorithm may obtain by "only looking at one step". It can bring better response and lower service failure rate, and is applicable to all microservice traffic routing scenarios.

[0178] (2) Sensitivity: After the regulated point performs the traffic routing task, it immediately returns the service quality index of the node to its master regulating point in real time. At the same time, it triggers the search and update of the optimal routing path of the end-to-end full link in real time. It can highly sensitively and in real time perceive changes in the service quality of the network system and feed back to the next network request for traffic routing.

[0179] (3) Business attributes: In addition to service quality indicators and resource indicators, this application can also incorporate business attribute indicators into the routing weight model or routing cost model, such as high-priority traffic, urgent traffic, etc., so that network requests can be routed to better business nodes for execution according to the routing algorithm.

[0180] (4) User experience: Since this application aims to prevent problems from occurring in the problem prevention stage, rather than repairing them through compensation mechanisms after they occur, the user will not be aware of the problem at all, thus ensuring the user's experience.

[0181] Based on the above embodiments, the beneficial effects of this application are as follows: This application proposes to set a parameter N to limit the number of calling paths selected for business nodes when selecting paths. The parameter N is set according to the actual business situation so as to complete the selection of a better route path based on the idea of ​​minimizing the global link routing cost as much as possible, and reduce the workload of calculating the better route path, thereby improving the efficiency of calculating the better route path.

[0182] This application also proposes that the management server can determine the value of X based on the comparison between the number Y and the set parameter N. When the number of call paths Y is greater than or equal to the set parameter N, the value of X is N, ensuring that only N call paths are selected when selecting paths for business nodes, reducing the computational load of subsequent calculations of optimal routes and improving computational efficiency. When the number of call paths Y is less than the set parameter N, the value of X is Y, ensuring that all call paths corresponding to the business node can be selected, guaranteeing the amount of call path data, and improving the accuracy of subsequent calculations of optimal routes.

[0183] This application also proposes to select a call path based on path selection rules, starting from the initial business node, thereby obtaining one or more candidate routing paths. The management server then determines the optimal routing path from these candidate paths. This ensures that when multiple candidate routing paths are obtained based on the path selection rules, the routing path with the lowest total routing cost can be determined. This reduces the computational load of the optimal routing path while ensuring high accuracy in its calculation, thus guaranteeing service quality.

[0184] This application also proposes that during candidate routing path calculation, at any given level, only a maximum of N candidate routing paths can be retained for the next level's routing path calculation based on a set parameter N. This ensures that the final number of candidate routing paths for the entire link is less than or equal to N, further reducing the computational load of optimal routing paths and improving processing efficiency. Alternatively, a maximum of N call paths can be selected for the currently selected business nodes. After selecting candidate business nodes at each level, the maximum number of allowed candidate routing paths increases in multiples of N, increasing the data volume to a certain extent and thus improving the accuracy of optimal routing path calculation. By balancing processing efficiency and accuracy, a better processing effect is achieved. Compared to traditional solutions, this application ensures that the microservice system can provide real-time feedback on multi-dimensional network service quality indicators to routing costs, while also viewing the overall routing cost of a network request from a complete end-to-end perspective. This allows for more comprehensive planning of network traffic routing paths, ensuring online service quality and providing stable business services.

[0185] Please see Figure 6 This figure is a schematic block diagram of a network request processing device provided in an embodiment of this application. Specifically, the network request processing device may include:

[0186] The data acquisition module 601 is used to receive a first network request and determine the starting service node and the target service node corresponding to the first network request.

[0187] Traffic routing module 602 is used to obtain the first routing path currently recorded, and to perform traffic routing for the first network request according to the first routing path; the first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting service node to the target service node, and the path selection rules are associated with the routing cost of each call path in the routing path.

[0188] The calculation module 603 is used to obtain the current routing cost of each call path in the first routing path. The current routing cost is a routing cost re-determined based on the cost calculation index obtained in the target stage of the traffic routing process. The target stage includes at least one of the following: a stage in which the main control point in the call path processes the first network request by calling the controlled point, and a processing stage after obtaining the processing result of the first network request.

[0189] The aforementioned calculation module 603 is further configured to determine a second routing path that satisfies the aforementioned path selection rules from the aforementioned multiple routing paths based on the aforementioned current routing cost, so that when a second network request is received, the traffic of the second network request is routed according to the aforementioned second routing path; the aforementioned second network request corresponds to the aforementioned starting service node and the aforementioned target service node.

[0190] Optionally, when the calculation module 603 determines a second route path that satisfies the path selection rule from the multiple route paths based on the current route cost, it specifically performs the following:

[0191] Obtain the setting parameter N; the setting parameter N is used to indicate the number of call paths to select for business nodes when selecting paths, and N is a positive integer;

[0192] Based on the above-mentioned setting parameter N, the above-mentioned current routing cost, and the historical routing costs of each calling path in the third routing path, a second routing path that satisfies the above-mentioned path selection rules is determined from the above-mentioned multiple routing paths; the above-mentioned third routing path is any routing path other than the above-mentioned first routing path among the above-mentioned multiple routing paths.

[0193] Optionally, the aforementioned starting business node is a first-level business node, and the aforementioned target business node is an M-level business node. There are also M-2 intermediate levels between the first level and the M-level, and each intermediate level includes one or more intermediate business nodes, where M is an integer greater than or equal to 3. There is a call path between adjacent business nodes, and the call path connects the main adjustment point and the adjusted point. The main adjustment point is the business node that initiates the call, and the adjusted point is the business node that is called. The level to which the adjusted point belongs is the next level below the level to which the main adjustment point belongs.

[0194] Optionally, when the calculation module 603 determines the second route path that satisfies the path selection rule from the multiple route paths based on the set parameter N, the current route cost, and the historical route costs of each called path in the third route path, it is specifically used for:

[0195] For the first candidate business node, the routing cost of each call path corresponding to the first candidate business node is obtained from the current routing cost and the historical routing cost of each call path in the third routing path.

[0196] Based on the above-mentioned parameter N and the routing cost of each call path corresponding to the first candidate business node, the first X call paths are selected from the call paths corresponding to the first candidate business node in order of routing cost from low to high; X is determined based on the above-mentioned parameter N and the number Y of call paths corresponding to the first candidate business node, where Y is a positive integer.

[0197] Based on the top X call paths corresponding to each of the first candidate business nodes, one or more candidate routing paths are determined from the multiple routing paths, and a second routing path is determined from the one or more candidate routing paths.

[0198] Wherein, the first candidate business node is the starting business node, or any intermediate business node included in any intermediate level; when the level of the first candidate business node is an intermediate level, the first candidate business node is any one of one or more next-level candidate business nodes determined for the second candidate business node; the level to which the first candidate business node belongs is the next level to which the second candidate business node belongs; the next-level candidate business node is the adjustment point on the call path ranked in the top X positions corresponding to the second candidate business node.

[0199] Optionally, when the calculation module 603 is used to determine the second route path from one or more candidate route paths, it is specifically used for:

[0200] Based on the current routing cost and the historical routing cost, determine the total routing cost of each candidate routing path among the one or more candidate routing paths.

[0201] Based on the total routing cost of each of the above candidate routing paths, determine the candidate routing path with the minimum total routing cost from one or more of the above candidate routing paths;

[0202] The candidate route path with the lowest total routing cost is selected as the second route path.

[0203] Optionally, the aforementioned calculation module 603 is also used for:

[0204] Determine the number Y of call paths corresponding to the first candidate business node, and compare the number Y with the set parameter N.

[0205] If the comparison result indicates that Y is greater than or equal to N, then the value of X is determined to be N;

[0206] If the comparison result indicates that Y is less than N, then the value of X is determined to be Y.

[0207] Optionally, the aforementioned cost calculation metrics include one or more of service quality metrics, resource metrics, and business attribute metrics. The aforementioned service quality metrics include one or more of error rate, latency rate, service availability, network status, and response time. The aforementioned resource metrics are determined based on node configuration data. The aforementioned business attribute metrics include one or more of network request priority and network request complexity.

[0208] Based on the above-mentioned network request processing device, when receiving a network request, this application performs traffic routing on the network request according to the current preferred first routing path, and determines the current routing cost of each call path in the first routing path during the traffic routing process, and then recalculates the current preferred second routing path based on the current routing cost, so as to perform traffic routing on subsequent network requests according to the second routing path.

[0209] The above method ensures that the optimal routing path is determined based on the routing cost of each calling path and the path selection rules. Furthermore, the routing cost of the calling path is determined based on the cost calculation indicators obtained during the traffic routing process. This allows the calculation of routing costs to incorporate multi-dimensional indicator features, so as to obtain the optimal routing path more accurately and improve the reliability of the optimal routing path selection.

[0210] Compared to a fixed route path obtained by assigning routing costs using configuration data of business nodes, this application can dynamically update the routing costs of each call path after executing network request traffic routing, so as to accurately and in real time calculate the optimal routing path and solve the service quality problem caused by unreasonable network traffic routing.

[0211] It should be noted that the functions of each functional module of the network request processing device in this application embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0212] Please see Figure 7This figure is a schematic block diagram of a computer device provided in an embodiment of this application. As shown in the figure, the smart terminal in this embodiment may include: a processor 701, a storage device 702, and a communication interface 703. The processor 701, storage device 702, and communication interface 703 can interact with each other.

[0213] The aforementioned storage device 702 may include volatile memory, such as random-access memory (RAM); the storage device 702 may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; the aforementioned storage device 702 may also include a combination of the above types of memory.

[0214] The processor 701 described above may be a central processing unit (CPU). In one embodiment, the processor 701 may also be a graphics processing unit (GPU). Alternatively, the processor 701 may be a combination of a CPU and a GPU. In one embodiment, the storage device 702 is used to store program instructions, which the processor 701 can invoke to perform the following operations:

[0215] Receive the first network request and determine the starting service node and the target service node corresponding to the first network request;

[0216] Obtain the first routing path of the current record, and perform traffic routing for the first network request according to the first routing path; the first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node, and the path selection rules are associated with the routing cost of each call path in the routing path.

[0217] Obtain the current routing cost of each call path in the first routing path; the current routing cost is a routing cost re-determined based on the cost calculation index obtained in the target stage of the traffic routing process. The target stage includes at least one of the following: the stage in which the master control point in the call path processes the first network request by calling the controlled point, and the processing stage after obtaining the processing result of the first network request.

[0218] Based on the current routing cost, a second routing path that satisfies the path selection rules is determined from the multiple routing paths, so that when a second network request is received, the traffic of the second network request is routed according to the second routing path; the second network request corresponds to the starting service node and the target service node.

[0219] Optionally, when the processor 701 determines a second route path that satisfies the path selection rule from the plurality of route paths based on the current route cost, it specifically performs the following:

[0220] Obtain the setting parameter N; the setting parameter N is used to indicate the number of call paths to select for business nodes when selecting paths, and N is a positive integer;

[0221] Based on the above-mentioned setting parameter N, the above-mentioned current routing cost, and the historical routing costs of each calling path in the third routing path, a second routing path that satisfies the above-mentioned path selection rules is determined from the above-mentioned multiple routing paths; the above-mentioned third routing path is any routing path other than the above-mentioned first routing path among the above-mentioned multiple routing paths.

[0222] Optionally, the aforementioned starting business node is a first-level business node, and the aforementioned target business node is an M-level business node. There are also M-2 intermediate levels between the first level and the M-level, and each intermediate level includes one or more intermediate business nodes, where M is an integer greater than or equal to 3. There is a call path between adjacent business nodes, and the call path connects the main adjustment point and the adjusted point. The main adjustment point is the business node that initiates the call, and the adjusted point is the business node that is called. The level to which the adjusted point belongs is the next level below the level to which the main adjustment point belongs.

[0223] Optionally, when the processor 701 determines a second route path that satisfies the path selection rule from the plurality of route paths based on the set parameter N, the current route cost, and the historical route costs of each called path in the third route path, it specifically performs the following:

[0224] For the first candidate business node, the routing cost of each call path corresponding to the first candidate business node is obtained from the current routing cost and the historical routing cost of each call path in the third routing path.

[0225] Based on the above-mentioned parameter N and the routing cost of each call path corresponding to the first candidate business node, the first X call paths are selected from the call paths corresponding to the first candidate business node in order of routing cost from low to high; X is determined based on the above-mentioned parameter N and the number Y of call paths corresponding to the first candidate business node, where Y is a positive integer.

[0226] Based on the top X call paths corresponding to each of the first candidate business nodes, one or more candidate routing paths are determined from the multiple routing paths, and a second routing path is determined from the one or more candidate routing paths.

[0227] Wherein, the first candidate business node is the starting business node, or any intermediate business node included in any intermediate level; when the level of the first candidate business node is an intermediate level, the first candidate business node is any one of one or more next-level candidate business nodes determined for the second candidate business node; the level to which the first candidate business node belongs is the next level to which the second candidate business node belongs; the next-level candidate business node is the adjustment point on the call path ranked in the top X positions corresponding to the second candidate business node.

[0228] Optionally, when the processor 701 is used to determine the second routing path from one or more candidate routing paths, it is specifically used for:

[0229] Based on the current routing cost and the historical routing cost, determine the total routing cost of each candidate routing path among the one or more candidate routing paths.

[0230] Based on the total routing cost of each of the above candidate routing paths, determine the candidate routing path with the minimum total routing cost from one or more of the above candidate routing paths;

[0231] The candidate route path with the lowest total routing cost is selected as the second route path.

[0232] Optionally, the processor 701 described above is also used for:

[0233] Determine the number Y of call paths corresponding to the first candidate business node, and compare the number Y with the set parameter N.

[0234] If the comparison result indicates that Y is greater than or equal to N, then the value of X is determined to be N;

[0235] If the comparison result indicates that Y is less than N, then the value of X is determined to be Y.

[0236] Optionally, the aforementioned cost calculation metrics include one or more of service quality metrics, resource metrics, and business attribute metrics. The aforementioned service quality metrics include one or more of error rate, latency rate, service availability, network status, and response time. The aforementioned resource metrics are determined based on node configuration data. The aforementioned business attribute metrics include one or more of network request priority and network request complexity.

[0237] Based on the above-mentioned network request processing device, when receiving a network request, this application performs traffic routing on the network request according to the current preferred first routing path, and determines the current routing cost of each call path in the first routing path during the traffic routing process, and then recalculates the current preferred second routing path based on the current routing cost, so as to perform traffic routing on subsequent network requests according to the second routing path.

[0238] The above method ensures that the optimal routing path is determined based on the routing cost of each calling path and the path selection rules. Furthermore, the routing cost of the calling path is determined based on the cost calculation indicators obtained during the traffic routing process. This allows the calculation of routing costs to incorporate multi-dimensional indicator features, so as to obtain the optimal routing path more accurately and improve the reliability of the optimal routing path selection.

[0239] Compared to a fixed route path obtained by assigning routing costs using configuration data of business nodes, this application can dynamically update the routing costs of each call path after executing network request traffic routing, so as to accurately and in real time calculate the optimal routing path and solve the service quality problem caused by unreasonable network traffic routing.

[0240] In specific implementation, the processor 701, storage device 702, and communication interface 703 described in the embodiments of this application can execute the embodiments of this application. Figure 2 or Figure 5 The implementation methods described in the relevant embodiments of the provided network request processing method can also be implemented using the embodiments of this application. Figure 6 The implementation methods described in the relevant embodiments of the provided network request processing device will not be repeated here.

[0241] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of the above units is merely a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0242] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium storing a computer program executed by the aforementioned network request processing device, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the aforementioned... Figure 2 , Figure 4 The methods described in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same methods will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.

[0243] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned... Figure 2 , Figure 4 The methods described in the corresponding embodiments will not be repeated here.

[0244] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0245] The above-disclosed embodiments are merely some of the embodiments of this application, and should not be construed as limiting the scope of this application. Those skilled in the art can understand that implementing all or part of the above embodiments and making equivalent changes in accordance with the claims of this application still fall within the scope of the invention.

Claims

1. A network request processing method, characterized by, The method includes: Receive the first network request and determine the starting service node and the target service node corresponding to the first network request; Obtain the first routing path of the current record, and perform traffic routing for the first network request according to the first routing path; the first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting business node to the target business node, and the path selection rules are associated with the routing cost of each call path in the routing path; Obtain the current routing cost of each call path in the first routing path; the current routing cost is a routing cost re-determined based on the cost calculation metric obtained in the target stage during the traffic routing process, the target stage includes at least one of the following: the stage in which the master regulating point in the call path processes the first network request by calling the regulated point, and the processing stage after obtaining the processing result of the first network request; the cost calculation metric includes a service quality metric, which is a metric generated by the regulated point based on the actual processing situation when processing the first network request. Based on the current routing cost, a second routing path that satisfies the path selection rule is determined from the multiple routing paths, so that when a second network request is received, the traffic of the second network request is routed according to the second routing path; the second network request corresponds to the starting service node and the target service node.

2. The method of claim 1, wherein, The step of determining a second route path that satisfies the path selection rule from the plurality of route paths based on the current route cost includes: Obtain the setting parameter N; the setting parameter N is used to indicate the number of call paths selected for business nodes when selecting paths, and N is a positive integer; Based on the set parameter N, the current routing cost, and the historical routing costs of each calling path in the third routing path, a second routing path that satisfies the path selection rule is determined from the multiple routing paths; the third routing path is any routing path other than the first routing path among the multiple routing paths.

3. The method according to claim 2, characterized in that, The starting business node is a first-level business node, and the target business node is an M-level business node. There are also M-2 intermediate levels between the first level and the M-level, and each intermediate level includes one or more intermediate business nodes, where M is an integer greater than or equal to 3. There is a call path between adjacent business nodes, which connects the main adjustment point and the adjusted point. The main adjustment point is the business node that initiates the call, and the adjusted point is the business node that is called. The level to which the adjusted point belongs is the next level below the level to which the main adjustment point belongs.

4. The method according to claim 3, characterized in that, The step of determining a second route path that satisfies the path selection rule from the multiple route paths based on the set parameter N, the current route cost, and the historical route costs of each called path in the third route path includes: For the first candidate service node, the routing cost of each call path corresponding to the first candidate service node is obtained from the current routing cost and the historical routing cost of each call path in the third routing path. Based on the set parameter N and the routing cost of each call path corresponding to the first candidate service node, the first X call paths are selected from the call paths corresponding to the first candidate service node in order of routing cost from low to high; X is determined based on the set parameter N and the number Y of call paths corresponding to the first candidate service node, where Y is a positive integer. Based on the top X call paths corresponding to each of the first candidate service nodes, one or more candidate routing paths are determined from the multiple routing paths, and a second routing path is determined from the one or more candidate routing paths. Wherein, the first candidate business node is the starting business node, or any intermediate business node included in any intermediate level; when the level of the first candidate business node is an intermediate level, the first candidate business node is any one of one or more next-level candidate business nodes determined for the second candidate business node; the level to which the first candidate business node belongs is the next level below the level to which the second candidate business node belongs; the next-level candidate business node is the adjustment point on the call path ranked in the top X positions corresponding to the second candidate business node.

5. The method according to claim 4, characterized in that, Determining the second routing path from the one or more candidate routing paths includes: Based on the current routing cost and the historical routing cost, determine the total routing cost of each candidate routing path among the one or more candidate routing paths; Based on the total routing cost of each candidate routing path, determine the candidate routing path with the minimum total routing cost from the one or more candidate routing paths; The candidate route path with the lowest total routing cost is determined as the second route path.

6. The method according to claim 4 or 5, characterized in that, The method further includes: Determine the number Y of call paths corresponding to the first candidate service node, and compare the number Y with the set parameter N; If the comparison result indicates that Y is greater than or equal to N, then the value of X is determined to be N; If the comparison result indicates that Y is less than N, then the value of X is determined to be Y.

7. The method according to any one of claims 1-5, characterized in that, The cost calculation metrics include one or more of service quality metrics, resource metrics, and business attribute metrics. The service quality metrics include one or more of error rate, latency rate, service availability, network status, and response time. The resource metrics are determined based on node configuration data. The business attribute metrics include one or more of network request priority and network request complexity.

8. A network request processing apparatus, characterized in that, The device includes: The data acquisition module is used to receive the first network request and determine the starting service node and the target service node corresponding to the first network request. The traffic routing module is used to obtain the first routing path currently recorded and to perform traffic routing for the first network request according to the first routing path; the first routing path is a routing path that meets the path selection rules among multiple routing paths from the starting service node to the target service node, and the path selection rules are associated with the routing cost of each call path in the routing path; The calculation module is used to obtain the current routing cost of each call path in the first routing path; the current routing cost is a routing cost re-determined based on the cost calculation index obtained in the target stage during the traffic routing process, the target stage includes at least one of the following: the stage in which the main regulating point in the call path processes the first network request by calling the regulated point, and the processing stage after obtaining the processing result of the first network request; the cost calculation index includes a service quality index, which is an index generated by the regulated point based on the actual processing situation when processing the first network request; The calculation module is further configured to determine a second routing path that satisfies the path selection rule from the multiple routing paths based on the current routing cost, so that when a second network request is received, the traffic of the second network request is routed according to the second routing path; the second network request corresponds to the starting service node and the target service node.

9. A computer device, characterized in that, include: The system includes a processor, a storage device, and a communication interface, wherein the processor, the communication interface, and the storage device are interconnected, and the storage device stores executable program code. The processor is used to call the executable program code to implement the network request processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that are executed by a processor to implement the network request processing method as described in any one of claims 1-7.

11. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, are used to implement the network request processing method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Service chain mapping method based on hybrid network, intelligent terminal and storage medium

    CN112565082A